I want to dynamically load user control to a content control,so i used the "Good Old Method" of changing usercontrol based on DataTemplate.
But on setting the ViewModel property i.e binded to ContentControl content property, ContentControl is displaying "text" conatining the respective viewmodel`s name , instead of loading the respective Usercontrol.
Window`s Resources
<dxr:DXRibbonWindow.Resources>
<DataTemplate x:Key="TYRVM" DataType="{x:Type VM:ProductTYRViewModel}">
<views:TYRUserControl/>
</DataTemplate>
<DataTemplate x:Key="THORVM" DataType="{x:Type VM:ProductTHORViewModel}">
<views:THORUserControl/>
</DataTemplate>
<dxr:DXRibbonWindow.Resources>
Window`s code
<ContentControl Name="content" Content="{Binding Path=VMs,Mode=TwoWay}"/>
Now i don`t know what exactly the problem is!!