Possible Duplicate:
Changing the View for a ViewModel
I have a view:
<UserControl ...>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<ComboBox ItemSource="{Binding Items}" />
**<???>**
</Grid>
</UserControl>
I have ViewModel:
public class VM
{
// ...
public List<Entities> Items { get; set;}
public String Title { get; set; }
}
and I have a few subview's like this:
<UserControl ...>
<TextBlock Text="{Binding Title}" />
</UserControl>
When user selecta some value from ComboBox
in main View, I need to place in second column
of main View some of subViews
. If user selects other value in ComboBox
, another subView
sould replace existing subView
.
How can it be done?