Replies: 2 comments 7 replies
-
Use ContextFlyout instead |
Beta Was this translation helpful? Give feedback.
7 replies
-
Seems like I have to mimic what's done here: Avalonia/src/Avalonia.Controls/ContextMenu.cs Lines 306 to 356 in bb6005b From looking at the ContextMenu implementation it seems like the popup is closed when it's child ContextMenu is closed. Avalonia/src/Avalonia.Controls/ContextMenu.cs Lines 274 to 285 in bb6005b |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Context:
I have a control that renders elements using an
ICustomRenderOperation
. When the user right clicks on one of the elements I want to display a context menu at that location. If a user right clicks above no element nothing is supposed to happen.Problem:
I can't figure out how to manually open and position a context menu.
What I've tried:
I tried embedding a
ContextMenu
in aPopup
but this leads to strange behaviour. (Popup stays open when a MenuItem is clicked, normal ContextMenu would close)Beta Was this translation helpful? Give feedback.
All reactions