How to use TreeDataTemplate with Menu #10326
Unanswered
martinrhan
asked this question in
Q&A
Replies: 2 comments 2 replies
-
|
There is no support for TreeDataTemplate in Menu control |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
You can use code like this: <Menu Items="{Binding MenuItems}">
<Menu.ItemContainerTheme>
<ControlTheme TargetType="MenuItem" x:DataType="l:Column" BasedOn="{StaticResource {x:Type MenuItem}}">
<Setter Property="Header" Value="{Binding Header}"/>
<Setter Property="Command" Value="{Binding Command}"/>
<Setter Property="Items" Value="{Binding Items}"/>
</ControlTheme>
</Menu.ItemContainerTheme>
</Menu> |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have such a Menu
The ViewModel is:
But when I run the app, only the top level MenuItem "File" is there, under "File" MenuItem nothing is displayed.
Beta Was this translation helpful? Give feedback.
All reactions