Hi,
I have a control with a property that I do not wish to be visible at design
time. There is a DesignTimeVisible attribute, but that works only on
classes - can't apply it to a property, which is what I really want.
So its ok for the property to be accessed at run time - just don't want it
visible at design time.
Can this be done?
Thanks
Jeff Gaines - 21 May 2004 19:51 GMT
>Hi,
>I have a control with a property that I do not wish to be visible at design
[quoted text clipped - 7 lines]
>
>Thanks
You need to use a designer - I use the following to hide the
BackgroundImage property at design time.
namespace JGControlLib
{
[Designer(typeof(JGMaskedTextBoxDesigner))]
public class JGMaskedTextBox :
System.Windows.Forms.UserControl
{
//.... all the class stuff
}
}
public class JGMaskedTextBoxDesigner : ControlDesigner
{
protected override void
PreFilterProperties(System.Collections.IDictionary properties)
{
properties.Remove("BackgroundImage");
}
}

Signature
Jeff Gaines - Damerham Hampshire UK
Floyd Burger - 22 May 2004 00:54 GMT
The BrowsableAttribute is probably what you're looking for.

Signature
Floyd Burger
> Hi,
> I have a control with a property that I do not wish to be visible at design
[quoted text clipped - 7 lines]
>
> Thanks
Marina - 24 May 2004 18:00 GMT
Yes, that was the one. Thanks!
> The BrowsableAttribute is probably what you're looking for.
>
[quoted text clipped - 10 lines]
> >
> > Thanks