Skip to content
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

Closed
benstevens48 opened this issue Apr 22, 2020 · 4 comments
Labels
needs-triage Issue needs to be triaged by the area owners team-Rendering Issue for the Rendering team

Comments

@benstevens48
Copy link

Drag and drop does not work in a flyout with ShouldContrainToRootBounds set to false. The DragOver and Drop events do not fire.

Windows 10 version Saw the problem?
November 2019 Update (18363) Yes
@msft-github-bot msft-github-bot added the needs-triage Issue needs to be triaged by the area owners label Apr 22, 2020
@codendone codendone changed the title Drag and drop does not work in a flyout with ShouldContrainToRootBounds set to false Drag and drop does not work in a flyout with ShouldConstrainToRootBounds set to false Apr 23, 2020
@codendone codendone added the team-Rendering Issue for the Rendering team label Apr 23, 2020
@codendone
Copy link
Contributor

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?

@benstevens48
Copy link
Author

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!

@codendone
Copy link
Contributor

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.

@msft-github-bot msft-github-bot removed the needs-triage Issue needs to be triaged by the area owners label Apr 24, 2020
@FireCubeStudios
Copy link

Hello I am need of drag and drop events to fire now with #9276 there are some usecases with flyouts to be drop targets

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage Issue needs to be triaged by the area owners team-Rendering Issue for the Rendering team
Projects
None yet
Development

No branches or pull requests

4 participants