WinForms UserControl inheritance in .Net Compact Framework
The full .Net framework has an inherited UserControl but this option isn't offered by Visual Studio when creating a new control in a Compact Framework project.
Manually changing the ancestor cla开发者_JAVA百科ss of a user control to another user control results in an exception being thrown by the designer when subsequently trying to open it.
Anyone know if user control inheritance is possible?
I have some notes on CF UserControls in this blog entry. The short of it is "Unless you plan to be a control vendor don't bother wasting your time even trying to get designer support working."
I've had success running inherited controls but absolutely none within the designer. I've had to set the parent as Control to use the designer and then set it to my parent control prior to deploying (after closing the designer).
精彩评论