I have this ListViewItem trigger:
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsMouseOver}" Value="True" />
<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsSelected}" Value="True" />
</MultiDataTrigger.Conditions>
<Setter Property="Foreground" Value="Gray"/>
<Setter Property="Background" Value="White"/>
<Setter Property="Height" Value="50"/>
</MultiDataTrigger>
When I am selecting my ListViewItem, this item becomes larger so I can show another elements.
Now I want to implement a behavior that after each click on a ListViewItem this item will change from selected to not selected, so after each click my ListViewItem changes its height to 50 and after another click back to 22 (the default size).
I subscribed to an PreviewMouseLeftButtonDown event:
private void listView_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
}
My question is: what do I need to write into this event handler?