How to get Flyout's owner Control? #17806
-
I have many SplitButtons on my interface, and the Flyout menu of each SplitButton is the same, but it does a different action after clicking, so my code is as follows:
MenuItem Command="{Binding OpenCommand}" CommandParameter="{Binding ...}" |
Beta Was this translation helpful? Give feedback.
Answered by
msneijders
Dec 22, 2024
Replies: 1 comment 1 reply
-
This should work: ...
<MenuItem Command="{Binding OpenCommand}" CommandParameter="{Binding $parent[SplitButton]}">
... See docs: Binding to an ancestor. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
nasterhe
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This should work:
See docs: Binding to an ancestor.