0

I ran into an error Control's handle must be created first. The code returns the error

  model1.SetView(viewType.Trimetric, true, false);

I already tried model1.CreateControl(); before the code above executed but still same error.

N.TW12
  • 241
  • 2
  • 11

1 Answers1

1

You need to move the SetView() method call in the Form.OnLoad() (WinForms) or Window.OnContentRendered() (WPF) when the Model control is ready to be used.

abenci
  • 8,422
  • 19
  • 69
  • 134