Hi. I have a custom control with SplitContainer within. My custom control has own designer where design mode is enabled for SplitContainer:
[Designer(typeof(TestUserControlDesigner))]
public partial class TestUserControl : UserControl
{
public TestUserControl()
{
InitializeComponent();
}
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public SplitContainer SplitContainer
{
get
{
return this.splitContainer1;
}
}
}
public class TestUserControlDesigner : ParentControlDesigner
{
public override void Initialize(IComponent component)
{
base.Initialize(component);
TestUserControl testControl = component as TestUserControl;
EnableDesignMode(testControl.SplitContainer, "SplitContainer");
}
}
I dragsome control in Panel1andclick in panel area soadded control to lose focus then Build Solution. Afterthatdesigner doesn't track changes anymore. Need toreopen form designer window to start working again.If control stay focused and soution is build all work fine. Problem exists not just for new added controls. In reopened form change location of some control, click in panel area and rebuild - crash again. But if I click on some other control after changes are made and build all is fine.
Thanks in advance.