-
Notifications
You must be signed in to change notification settings - Fork 706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ListView items stop responding as Drag and Drop targets #9043
Comments
@jeromelaban I'm not able to repro this with WinUI3 Gallery sample app (ListView with drag and drop sample). Can you give it a try there and provide the specific set of steps you perform to get into this state? |
@ranjeshj did you try with the reproduction sample attached above (I have duplicated the link to it below). We have only seen this in nontrivial cases. https://github.com/microsoft/microsoft-ui-xaml/files/13242965/DragAndDrop-Cleaned.zip In the attached repro:
Expected outcome - item 55 is a valid drop target. |
Thanks. I can repro it with the app. Looks like the drag drop behavior is all custom in the app. Is there a reason for not using the built in ListView's drag drop? Its a bit more complicated with ListView because it virtualizes/recycles items. |
@ranjeshj Yes - we have a complex data layer that sits "behind" this visual representation of the data. The ListView is effectively presenting a view model - the custom logic has to perform the underlying data operations. In this reproduction, I removed the data logic for "simplicity" while keeping the overall structure. We have assumed that the issue is related to virtualization but feels like the events should still be raised... |
@ranjeshj Are there any updates on this? Thanks. |
Describe the bug
List view items are no longer receiving drag events after a few manipulations.
In the repro attached below, there is a long list of items that can be dragged and are re-parented when dropped on top of another item (simulating a file explorer type view where a folder is dragged onto another folder, moving it inside the folder, etc.).
Steps to reproduce the bug
Dragging items within the initial view works as expected, however, when dragging and scrolling other items into view (using the mousewheel, etc.) the new items no longer react as drop targets.
DragAndDrop-Cleaned.zip
Expected behavior
Dropping on items keeps working.
Screenshots
NuGet package version
WinUI 3 - Windows App SDK 1.4.2: 1.4.231008000
Windows version
Windows 11 (22H2): Build 22621
Additional context
No response
The text was updated successfully, but these errors were encountered: