You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//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
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Using
ContextFlyout
is often advised over oldContextMenu
, however their behaviour is different:Avalonia/src/Avalonia.Controls/ContextMenu.cs
Lines 320 to 324 in 4007dfa
Avalonia/src/Avalonia.Controls/Flyouts/PopupFlyoutBase.cs
Lines 362 to 368 in 4007dfa
ContextMenu
sets OverlayDismissEventPassThrough totrue
, whereasMenuFlyout
set it tofalse
. 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
andOverlayDismissEventPassThrough
toPopupFlyoutBase
, use them when creating a popup and override their default values forMenuFlyout
to match Context Menus behaviour.Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: