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

Prevent Show of ContextMenu based on a bool value #159

Open
WoistdasNiveau opened this issue Jan 11, 2025 · 1 comment
Open

Prevent Show of ContextMenu based on a bool value #159

WoistdasNiveau opened this issue Jan 11, 2025 · 1 comment

Comments

@WoistdasNiveau
Copy link

Is your feature request related to a problem? Please describe.
I want so be able to not show the Context Menu at all the na specific bool value is set to true such that right Click shows either default behavior or nothing, however, i could to find a way in the Documentation and the disabled property does not work.

Describe the solution you'd like
If boolean value is set to true right click should either show the default behavior or do nothing at all.

@stavroskasidis
Copy link
Owner

Hello.

You could use the OnAppearing event of the ContextMenu and set the PreventShow property in the MenuAppearingEventArgs to true to prevent the menu from appearing or you could not render the ContextMenuTrigger at all when the condition you need is met.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants