-
|
I have a datagrid with a context menu defined like this: This context menu applies to the entire datagrid, including the header. |
Beta Was this translation helpful? Give feedback.
Answered by
wgraaf
Apr 8, 2024
Replies: 1 comment 1 reply
-
|
You can possibly use a style to target the header control. Something like this: <Style Selector="DataGridHeader">
<Setter Property="ContextMenu">
<ContextMenu>
<MenuItem/>
</ContextMenu>
</Setter>
</Style>I have not tested it, but I can't see a reason it wont work. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That works! (after changing the selector to "DataGridColumnHeader":