Hide a property from a property grid at runtime.
- From: "Ray Cassick" <rcassickNO-SPAM@xxxxxxxxxxxxxxxx>
- Date: Sat, 13 Jan 2007 22:22:37 -0500
I am looking for a way to hide a property I created on a user control from a
property grid at runtime but allow it to be seen at design time.
Any ideas?
I tried setting the category of the property to 'Design' and that does not
do it.
I tried adding the 'DesignOnly' attribute and that does not do it.
I am about to break out Reflector and have a peek myself to see if I can
find it from the libraries themselves because as best I can tell the
Usercontrol base class does it for the Name, GenerateMember, Locked, and
Modifiers properties. I just want to tack my property in there.
Here is some background. I am designing a control that is going to be
manipulated at BOTH runtime (on a custom design surface) and at design time.
I need a few properties seen in the property grid ONLY at design time and
not when the controls properties are seen in a property grid at runtime.
Its a bit confusing I know but I have seen this be done right before my very
eyes. All the standard Usercontrol properties in the Design category act
this way.
--
Me
Anywhere USA
.
- Follow-Ups:
- Prev by Date: Re: GroupBox client area?
- Next by Date: Re: Hide a property from a property grid at runtime.
- Previous by thread: UserControl and TextChanged event
- Next by thread: Re: Hide a property from a property grid at runtime.
- Index(es):
Relevant Pages
|