G
Guest
I have a user control that inherits from another user control. The base user
control works fine in the designer, I can see all of the controls, etc...
However when I open the derived control in the designer, all I see is a grey
square with no controls. I have tried attaching to the IDE with another
instance's debugger, but no exceptions are being thrown when the control is
open.
Here is how the constructors are setup:
Base Control:
public class MyBase : System.Windows.Forms.UserControl
{
[Browsable(false)]
protected AnotherObject _oObject;
[Browsable(false)]
public AnotherObject oObject
{
get{ return _oObject; }
set{ _oObject= value; }
}
public MyBase()
{
_oObject= new AnotherObject ();
}
public MyBase (AnotherObject oObject)
{
InitializeComponent();
_oObject= oObject;
}
}
Derived Control:
public class MyDerived: MyBase
{
public MyDerived(AnotherObject oObject) : base(oObject)
{
InitializeComponent();
}
public MyDerived() : base()
{
}
}
Please help!
control works fine in the designer, I can see all of the controls, etc...
However when I open the derived control in the designer, all I see is a grey
square with no controls. I have tried attaching to the IDE with another
instance's debugger, but no exceptions are being thrown when the control is
open.
Here is how the constructors are setup:
Base Control:
public class MyBase : System.Windows.Forms.UserControl
{
[Browsable(false)]
protected AnotherObject _oObject;
[Browsable(false)]
public AnotherObject oObject
{
get{ return _oObject; }
set{ _oObject= value; }
}
public MyBase()
{
_oObject= new AnotherObject ();
}
public MyBase (AnotherObject oObject)
{
InitializeComponent();
_oObject= oObject;
}
}
Derived Control:
public class MyDerived: MyBase
{
public MyDerived(AnotherObject oObject) : base(oObject)
{
InitializeComponent();
}
public MyDerived() : base()
{
}
}
Please help!