Reputation: 491
A very simple example. I have two classes:
public class BaseControl : UserControl { }
public partial class MyControl : BaseControl
{
public MyControl()
{
InitializeComponent();
}
}
I can open BaseControl in designer mode, but MyControl can not (VS 2008). I CAN NOT just inherit class MyControl from class UserControl. Is there any way to solve this problem?
Upvotes: 1
Views: 424
Reputation: 11964
You need to decorate your class MyControl with the [Designer(typeof(MyControlDesigner))]
attribute
and write MyControlDesigner
class that inherited IDesigner
Upvotes: 0
Reputation: 16698
Make sure you have classes defined this way:
public class BaseControl : UserControl
{
public BaseControl()
{
InitializeComponent();
}
}
public partial class MyControl : BaseControl
{
public MyControl()
{
InitializeComponent();
}
}
Upvotes: 1