How to use ContextMenu?
#15165
-
I put ContextMenu in Canvas:
But it open when clicked on the controls in Canvas (TextBlock, Lines, etc). But if I click in the free area in Canvas, it don't open. I try put it in the Window, but it still open when clicked on the controls, but not on free area. I want the context menu to open everywhere in the Canvas. |
Beta Was this translation helpful? Give feedback.
Answered by
jp2masa
Mar 28, 2024
Replies: 1 comment 1 reply
-
You have to set |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
alvahtin
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You have to set
Background="Transparent"
or any other color on theCanvas
. It isnull
by default, which means that it's not hit test visible.