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

MenuFlyout not constraining to root bounds when part of a CommandBar's secondary commands #10088

Open
hlowrain opened this issue Oct 20, 2024 · 1 comment
Labels
bug Something isn't working needs-triage Issue needs to be triaged by the area owners

Comments

@hlowrain
Copy link

hlowrain commented Oct 20, 2024

Describe the bug

When you add a MenuFlyout to an AppBarButton that's part of the secondary commands of a CommandBar, the flyout won't be constrained to the root bounds even if ShouldConstrainToRootBounds is set to true.

Steps to reproduce the bug

  1. Create a CommandBar
  2. Add an AppBarButton to its SecondaryCommands
  3. Add a MenuFlyout with items to the AppBarButton
  4. Set ShouldConstrainToRootBounds of the MenuFlyout to true
  5. Start the app, make sure its not maximized, then open the flyout

Expected behavior

Flyout should be within the app window

Screenshots

Image
Image

NuGet package version

None

Windows version

Windows 11 (22H2): Build 22621

Additional context

Setting the "Placement" property of the Flyout also doesnt work as expected :/

I was initially trying to figure out why my flyout was overlapping its AppBarButton only on Windows 10. When you open a flyout while the app is maximized, expected behavior is for it to display somewhere outside the button (i.e to the left or top), but on Windows 10, it covers part of the button. And only happens when it's the secondary command of a CommandBar.

@hlowrain hlowrain added the bug Something isn't working label Oct 20, 2024
Copy link

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage Issue needs to be triaged by the area owners
Projects
None yet
Development

No branches or pull requests

1 participant