You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To Reproduce
Steps to reproduce the behavior in the Showcase project:
Go to ListBox > Bound (the default view when starting the project)
In the LeftBoundListBox, select item 2
Hold shift, and select item 10
Range 2 to 10 is selected, as expected
Select a single item within the previous range by clicking without holding shift, e.g item 5
Only item 5 is selected, as expected
Hold shift and click an item with index higher than previously selected item, e.g item 7
Range 2 to 7 is selected, which wasn't expected
Note: this does not occur when setting dd:DragDrop.DragSourceIgnore="True" on the ListBox.
Expected behavior
Only the items in the selected range should be selected.
Findings
A similar issue occurs "backwards":
select item 10 first
hold shift and select item 2
select a single item 7
hold shift and select item 5
range 10 to 5 will be selected
SelectionChanged event is raised multiple times when going from selected range to single selection
When selecting the single item between the two range selections, the SelectionChanged event on the ListBox is raised multiple times, each time removing a single item from SelectedItems, until only the single item is selected.
To view this, add the following handler to LeftBoundListBox: ListBoxSamples.xaml:
To Reproduce
Steps to reproduce the behavior in the Showcase project:
Note: this does not occur when setting
dd:DragDrop.DragSourceIgnore="True"
on the ListBox.Expected behavior
Only the items in the selected range should be selected.
Findings
A similar issue occurs "backwards":
SelectionChanged event is raised multiple times when going from selected range to single selection
ListBoxSamples.xaml:
Demo of the sequence
Desktop (please complete the following information):
Additional context
Tested with VS 2019 and VS 2022 Preview 4.1:
The text was updated successfully, but these errors were encountered: