Forms, Controls & the Forms DesignerI was just working on a Windows app that contains lots and lots of User Controls all of which inherit from a base User Control. When I opened the controls they displayed blank in the designer. After some digging I realised that two vital pieces were missing:
It seems the Forms Designer creates an instance of the control by calling the parameterless constructor (which seems obvious when you think about it I suppose). The giveaway on the InitializeComponent() call was the comment just above the call injected by default which reads “Required for Windows Form Designer support“. Anyways – hopefully this will save somebody some time.
Leave a Reply
|
Archives
Tag Cloud |