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

Allow overriding Flyout's popup IsLightDismissEnabled and OverlayDismissEventPassThrough properties #15371

Closed
BAndysc opened this issue Apr 15, 2024 · 2 comments

Comments

@BAndysc
Copy link
Contributor

BAndysc commented Apr 15, 2024

Is your feature request related to a problem? Please describe.

Using ContextFlyout is often advised over old ContextMenu, however their behaviour is different:

_popup = new Popup
{
IsLightDismissEnabled = true,
OverlayDismissEventPassThrough = true,
};

var popup = new Popup
{
WindowManagerAddShadowHint = false,
IsLightDismissEnabled = true,
//Note: This is required to prevent Button.Flyout from opening the flyout again after dismiss.
OverlayDismissEventPassThrough = false
};

ContextMenu sets OverlayDismissEventPassThrough to true, whereas MenuFlyout set it to false. Because of that MenuFlyout behaves a bit different than context menu - the user need to close the menu, before a new one can be opened, requiring two clicks vs one click in case of ContextMenu.

Describe the solution you'd like

Add StyledProperties IsLightDismissEnabled and OverlayDismissEventPassThrough to PopupFlyoutBase, use them when creating a popup and override their default values for MenuFlyout to match Context Menus behaviour.

Describe alternatives you've considered

No response

Additional context

No response

@maxkatz6
Copy link
Member

There were some issues with this property explained in this PR #8448
Might need to be revisited.

@maxkatz6
Copy link
Member

maxkatz6 commented May 9, 2024

Fixed by #15517

@maxkatz6 maxkatz6 closed this as completed May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants