0
votes

I am trying to create a 3D editor and I am using Prism as my application framework. I wanted a Viewport3D to be a region for my views, and individual trees of Visual3D object to be the views themselves.

The standard way of attaching a view-model to the view is using DataContext. However, none of the Visual3D objects have data context. Therefore I do not have a good way of binding to my view-models. Anybody has encountered the problem? Any solutions beside re-architecting my application such that I don't use Visual3D as my views?

Alex.

2

2 Answers

0
votes

Every UserControl has a DataContext property. Derive your 3D objects from the UserControl.

0
votes

You can create your own custom class and DataContext property in it. You will not be able to enjoy the bindings out-of-the-box.