xBimTeam / XbimWindowsUI

The home of XbimXplorer and WPF components for your desktop BIM applications.
Other
252 stars 149 forks source link

Making DrawingControl3D dynamically #122

Open TasigurIshtar opened 5 years ago

TasigurIshtar commented 5 years ago

Hello guys, I made small project based on your XbimWindowsUI. Final purpose should be to allow enduser to load and show multiple IFC files. Three scenarios:

  1. I have DrawingControl3D dragged inside of wpf MainForm
  2. I created an UserControl, then I put DrawingControl3D inside od it. Next I draged my userControl into MainForm.
  3. Step two, but instead of draging userControl into MainForm I wanted to inject it during the runtime. Probably somehow like grid.Children.Add(myUserControl)

Compile -> run -> load model -> show model ...works fine in first two scenarios. In the third scenario after loading of model -> program is crushing on line: myUserControl.DrawingControl.Model = loadedModel;

Finaly I am not sure if this is because of the component or because of my lack of knowledge of wpf. Any advice would be helpful.

Thanks for your time.

andyward commented 5 years ago

You'll have to provide some details on the exact error message you're seeing when you assign loadedModel

The best way to help get this looked would be so push some sample code out on Github so we can take a look at what you're doing.

TasigurIshtar commented 5 years ago

Hello, Thanks for your quick response.

I have attached small demo, where the problem is illustrated. https://github.com/TasigurIshtar/XBimTests p.s. It’s my first GitHub repo attempt, so please let me know if something is missing.