Question How To Limit User Control Parent

StoneCodeMonkey

Well-known member
Joined
Apr 17, 2009
Messages
56
Programming Experience
5-10
Hello,

Can I limit what type of element can host my user controls? For instance, I have a base user control that I place child user controls in. I would like to keep these child controls from being hosted in any element other than my base control.

Regards,

Update:Ok. How about limiting the type of element that can be a child of my user control? I am creating controls for a basic SCADA application, such as gauges and dials. So, for instance, I have a basic analog gauge that I want to be able to add elements to that enhance its function and visual appeal. These child elements wouldn't make sense on their own, so having the parent be able to limit the type of child would be useful. Also, the child would only be useful hosted by the right parent, so it will need to be able to detect its parent type.

Of course, these controls are for the designer and my attempt here is appropriate behavior within the IDE.

Regards
 
Last edited:

Latest posts

Back
Top