-
Notifications
You must be signed in to change notification settings - Fork 693
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
Drag and drop does not work in a flyout with ShouldConstrainToRootBounds set to false #2323
Comments
Yes, this is not supported with the current implementation of ShouldConstrainToRootBounds=false popups. Originally that support was only used for tooltips and MenuFlyout, neither of which should be a drop target (and should usually auto-hide before any potential drag-n-drop operation). With the expanded use and exposure of the ShouldConstrainToRootBounds property, this is a limitation which you could hit. This isn't likely to be something we'll fix any time soon. I expect the implementation of ShouldConstrainToRootBounds will eventually be changed in WinUI, but not until sometime after 3.0. Hopefully setting ShouldConstrainToRootBounds=true is sufficient for you for now? |
Yes, at the moment it's just a nice-to-have feature for me. But it's not a totally outrageous thing to try to do. Basically I'm using the flyout as a menu with a list of items, but the user can reorder the items, for which I'm using the drag-and-drop functionality as it's convenient. I could rewrite my code not to use drag and drop, but that would be a bit time consuming, especially writing an alternative for the dragging UI preview, so I'll just keep ShouldConstrainToRootBounds as true for now. I have to say it's really great that ShouldConstrainToRootBounds was added. As a direct result of that, I've been able to add a rich context menu to my app which makes certain actions much quicker to get to. Luckily, I don't need the user to reorder these! |
Thanks for logging this. The current thinking is that eventually we'd like to have ShouldConstrainToRootBounds=false popups use a XAML Island behind the scenes, at which point drag-n-drop should work as long as it works for islands. Since we're not likely to get to this for a while, I'd like to close this. But we definitely should support this eventually. |
Hello I am need of drag and drop events to fire now with #9276 there are some usecases with flyouts to be drop targets |
Drag and drop does not work in a flyout with ShouldContrainToRootBounds set to false. The DragOver and Drop events do not fire.
The text was updated successfully, but these errors were encountered: