I have a MainView.xaml, binding to a MainViewModel just fine.
What I wanted to try out was splitting a lot of controls I have on my main form into UserControls.
You don't need to use a Conductor
here. That's basically used for navigation scenarios. Just make two public properties on your MainViewModel
one for RightSideControlViewModel
called RightSide and one for LeftSideControlViewModel
, called LeftSide. Then, instead of instantiating your UserControls directly in your MainView, create two ContentControls
, one with x:Name="LeftSide"
and the other with x:name="RightSide"
This is a view-model-first way of accomplishing it. If you want to do it view-first, keep the user control definitions in your MainView, but change the Bind.Model so that it points to the new properties you created, like Bind.Model="{Binding LeftSide}"
Basically, the way you have things defines....the bindings just aren't pointing at the right objects, more or less. You've got the Conductor in there, which you don't need to accomplish this. You may want to keep it if you intend to have some sort of navigation architecture. Remember that when you call ActivateItem on a Conductor, you are basically changing its ActiveItem property; only one model with be active at a time. In the case above you activate both items, but only the second one remains active. Furthermore, in your view, nothing is bound to ActiveItem.
I hope this makes sense!