Hello,
When reorder is enabled via IsItemsReorderEnabled ListView calls CollectionChanged event for underlying ObservableCollection.
But in some cases it reports wrong new index and though visually item order is as expected underlying ObservableCollection gets wrong order.
To reproduce the issue bind just 2 strings to the ListView, say Item1 and Item2.
Drag first string (Item1) under second (Item2), ListView will look like this:
Item2
Item1
But ObservableCollection still has this:
Item1 (wrong!)
Item2 (wrong!)
If you subscribe to CollectionChanged event you will see that reported new item index is wrong, it should be 1 but in fact it is 0, as if the item was moved from 0 to 0.
Now start over, then drag second item (Item2) on top of first item (Item1), ListView will look like this:
Item2
Item1
And ObservableCollection properly updated to:
Item2 (correct)
Item1 (correct)
It looks like when an item is moved down its index is less by 1 than it should be.
Please check.
Yours faithfully
Vitaly Knyazev