I have created a custom user control, and I want to add a new property that contains a few bool values. I don't know how to explain it best so I will explain what I am trying to achieve
On the user control there are a few buttons visible.
Since this is a custom user control, a developer that drags it on a form cannot access the buttons, he can only see them and only access the custom control itself.
But, to enable him to put some buttons visible false, I want to make a property on the custom control that can do this.
Now, suppose I have 10 buttons, I don't want 10 bool properties to make each button visible or not.
I would like just one property, that folds open, and then shows 10 sub-properties of type boolean (and with the text of the button)
This way it will be easier for me when I need to add or remove buttons on the custom control.
It would work like for example the Size
property.
If you fold that open, you get 2 numeric sub-properties, width
and height
Another good example is the padding
property, when this folds open you get 5 sub properties of type numeric
I want it to work like that, but with bool properties in stead of numeric properties.
I have been googling this but cannot find how to do it, propably because I don't know the correct term
of how this kind of property is called.
So can someone please help me in the right direction of how to do this.