I am trying to figure out the best way to embed a user control in my current view ( which is not the root ).
Let's say we have an 'AddressView' (and AddressViewModel ). On this view, I want to embed a reusable control , that I can also pass parameters to.
Our XAML might look like this:
<Grid x:Name="LayoutRoot" Margin="2">
<!-- Address View -->
<ContentControl x:Name="StateDropDownUserControl" />
StateDropDownUserControl, is a property on my
AddressViewModel class and it is of type StateSelectorViewModel. Now CM will load the view associate with
for me, but how do I pass parameters and data context to it?
( i.e. IncludeOnly48ContigousStates = true ).
Is this the correct way to do this kind of embedding user controls ?
Thanks in advance!