I want to be able to de-select an item in the ListBox if the user clicks the same item again. There is the SelectionChanged event that everyone uses with ListBoxes, but this obviously will not fire when the selection is unchanged.
There is also no Click event, something people recommend. Visual Studio C# 2015 does not contain such event.
I have tried using MouseLeftButtonDown event, but once the ListBox has been populated with ListBoxItems, this event does not fire anymore. In addition, I thought about attaching Mouse events to the ListBoxItems, but this does not seem practicable, as I would have to attach n number of new events every time I populate the ListBox.
Does anyone have a XAML solution to this inquiry?
