Normal ListView in UWP (with SelectionMode="Single") selects item when you click it and deselects item when you Ctrl + click it.
I want to change the deselect functionality so that you do not need to press Ctrl to deselect item. Just click selected item again to remove selection.
It seems that when setting SelectionMode="Multiple", clicking item again deselects it like I wanted but I do not want to get multiple items selected.
UPDATE
This is how im doing right now. So I'm listening SelectionChanged event, and when event is fired, im getting the selected item from ListView selectedItem property.
<ListView ItemsSource="{x:Bind ViewModel.Cars}" SelectedItem="{Binding SelectedCar, Mode=TwoWay}" SelectionMode="Single">
<interactivity:Interaction.Behaviors>
<core:EventTriggerBehavior EventName="SelectionChanged">
<core:InvokeCommandAction Command="{Binding CarSelectedCommand}" />
</core:EventTriggerBehavior>
</interactivity:Interaction.Behaviors>
<ListView.ItemTemplate>
<DataTemplate x:DataType="model:ICar">
<StackPanel>
<TextBlock Text="{x:Bind Name}"/>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>