ListView View
is a DependencyProperty of type ViewBase
. So, what you can do is create your own custom views and can set it via DataTrigger on combobox selected item.
Microsoft already has sample available for it online which you can download from here.
OR
May be you can define two separate ListView's in resources as two seperate DataTemplates.
<Window.Resources>
<DataTemplate x:Key="GridViewTemplate">
<ListView/> <!-- GridView -->
</DataTemplate>
<DataTemplate x:Key="CardViewTemplate">
<ListView/> <!-- CardView -->
</DataTemplate>
</Window.Resources>
and have one ContentControl
in place and you can swap its Content based on selected value in combobox.
<ContentControl>
<ContentControl.Style>
<Style TargetType="ContentControl">
<Setter Property="Content"
Value="{StaticResource GridViewTemplate}"/>
<Style.Triggers>
<DataTrigger Binding="{Binding SelectedValue}" Value="Value2">
<Setter Property="Content"
Value="{StaticResource CardViewTemplate}"/>
</DataTrigger>
</Style.Triggers>
</Style>
</ContentControl.Style>
</ContentControl>