|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Designer Error when Inheriting from a Custom Base ControlTextBoxBase class that is inherited from System.Windows.Forms.TextBox. I then try to create a TextBoxInherited that is inherited from my new TextBoxBase. The project compile and run fine BUT when viewing the TextBoxInherited in the designer I receive the following message: ERROR: The designer could not be shown for this file because none of the classes within it can be designed. The designer inspected the following classes in the file: TextBoxInherited --- The base class 'CuiNetCF.Windows.Forms.TextBoxBase' could not be loaded. Ensure the assembly has been referenced and that all projects have been built. This message goes away if I include a reference the project, but it doesn't seem right that I would need to add a reference to the same project! What am I missing??? [TextBoxBase.cs] namespace CuiNetCF.Windows.Forms { public partial class TextBoxBase : System.Windows.Forms.TextBox { public TextBoxBase() { //Maintained by the designer InitializeComponent(); } } } [TextBoxInherited.cs] namespace CuiNetCF.Windows.Forms { public partial class TextBoxInherited : TextBoxBase { public TextBoxInherited() { //Maintained by the designer InitializeComponent(); } } } Here are the steps that I do to create this problem: 1.) Create a new windows project. 2.) Add a new Custom Control called TextBoxBase.cs. 3.) Change the TextBoxBase class to inherit from TextBox. 4.) Add a new Custom Control called TextBoxInherited.cs. 5.) Change the TextBoxInherited class to inherfit from TextBoxBase. 6.) Try to view the TextBoxInherited class in the designer. Does this error out for anybody else??? |
|||||||||||||||||||||||