how can i add properties to my usercontrol that appear in the properties window as a collapsible group (like font) with sub properties?
thanks
Printable View
how can i add properties to my usercontrol that appear in the properties window as a collapsible group (like font) with sub properties?
thanks
First, you should understand how properties work in VB.Net. What you're doing is basically creating a set of properties but in order to get them to show up during design view you have to add some attributes to the properties. I can't remember them off the tpop of my head but you should be able to look them up or i'm sure someone else will chime in with them.
They are called "Expandable Properties". I have some code in this forum where I was helped creating them but it was under VS 2003.
It's the TypeConverter applied to the property's type via the TypeConverter attribute that controls that.
http://msdn2.microsoft.com/en-us/library/aa302334.aspx
Remember this: whenever you want to control the design-time behaviour of a class you're talking about attributes.