SingletonSean / wpf-tutorials

Source code for SingletonSean WPF tutorials on YouTube.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Items not always removed

RPMallett opened this issue · comments

commented

The drag and drop demo was very useful, thanks!

In DragDropDemo, I found that if I was quick enough doing the drag and drop, the item was sometimes not removed, as below. I initially discovered this in my own app where the two listviews were closer to each other and the issue happened frequently. I think it has something to do with testing the HitTest result in TodoItemList_DragLeave, but I'm not sure as this is new to me!

image

I've noticed the same issue as well, but I'm not sure what may be causing the bug.
Some things I've noticed:

  • The issue seems to be linked to HitTestResult returning a value instead of null when exiting the listview

  • It seems to only happen on the top and left border of the first listview:
    MsRlo0iWpF

  • It doesn't seem to happen if I add an extra column exactly as wide as the other two (add a ColumnDefinition Width="*")
    U3cAd2qSgn

TBH, I've tried a bunch of things and still have no idea what the hell is happening