C# wpf - There are blue, yellow, and red cities in the ListBoxes (Pandemic Game). This is the red ListBox xaml:
<ListBox x:Name="gLBxOriginalRedCities" Margin="5,0,5,0" Foreground="#ffffff" Background="#ff0000" MouseDoubleClick="gLBxOriginalRedCities_MouseDoubleClick"
A MouseDoubleClick jumps to the correct code in xaml.cs.
I've added MouseDown="gLBxOriginalRedCities_MouseDown".
<ListBox x:Name="gLBxOriginalRedCities" Margin="5,0,5,0" Foreground="#ffffff" Background="#ff0000" MouseDown="gLBxOriginalRedCities_MouseDown" MouseDoubleClick="gLBxOriginalRedCities_MouseDoubleClick"
When I click a city in "gLBxOriginalRedCities" the code does not jump to
private void gLBxOriginalRedCities_MouseDown(object sender, MouseButtonEventArgs e) { gLBxOriginalBlueCities.UnselectAll(); gLBxOriginalYellowCities.UnselectAll(); }
How do I detect a ListBox mouse click, and then unselect the other ListBox items?