In my application I want to allow the users to change the design of some user controls. I've found a solution here, which seems to work fine. But I'm rather sure that most of the stuff can be done with the ControlDesigner in the .net class library (System.Windows.Forms.Design.ControlDesigner) My very first attempt runs in a null pointer exception.
private ControlDesigner layoutDesigner = new ControlDesigner();
// when a control is clicked, I try to enable the designer for this control
private void MbView_Click(object sender, EventArgs e)
{
selectedView = (ModbusView)sender;
layoutDesigner.Initialize(selectedView);
}
I'm afraid there's something more to do.