I have a user control that I would like to use in two different contexts. The user control needs its DataContext set to an instance of an appropriate ViewModel that has been created by the parent view/viewmodel.
I was hoping for something like:
<local:Child DataContext="{Binding ChildViewModel}"/>
where ChildViewModel is a inpc-styled property of the ViewModel that the page is bound to.
That doesn't seem to work. Is it possible to assign the DataContext by using Binding?