I'm trying to set a part of a View dynamically based on a value selected. I've already managed to set the View and ViewModel with xaml like this:
<DataTemplate DataType="{x:Type vm:MyViewModel}">
<v:MyUserControl />
</DataTemplate>
...
<ContentControl Content="{Binding MyViewModel}" />
But this doesn't seem very flexible as I have to add new types to the View every time I get new values to the list.
I think something more dynamic should be possible with Catel (3.9). Like the one in this question: How Instantiate Control Programmatically in Catel
I already tried binding to the ViewModel but Catel doesn't seem to recognize the UserControls and doesn't instantiate the View. Are there any other ways to do this?