0

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.

jokn
  • 44
  • 7

1 Answers1

0

There was a complete misunderstanding on my part regarding the ControDesigner class. Finally I fond the solution in this post within the different solutions from Reza.

jokn
  • 44
  • 7