Making DrawingControl3D dynamically
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:
- I have DrawingControl3D dragged inside of wpf MainForm
- I created an UserControl, then I put DrawingControl3D inside od it. Next I draged my userControl into MainForm.
- 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.
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.
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.