Leviafan, вот, накидал:
| Код | <Root> <Node title="File"> <Node title="Save"> <Node title="Save as text"/> <Node title="Save as project"/> </Node> <Node title="Quit"/> </Node> <Node title="About"/> </Root>
|
| Код | <Window.Resources> <XmlDataProvider x:Key="DS1" Source="pack://application:,,,/xxx.xml" XPath="/Root/Node"/> <!-- source поменять на необходимый --> </Window.Resources>
|
| Код | ... <Grid> <Grid.Resources> <HierarchicalDataTemplate x:Key="template" ItemsSource="{Binding XPath=Node}"> <AccessText Text="{Binding XPath=@title}"/> </HierarchicalDataTemplate> </Grid.Resources> <Menu VerticalAlignment="Top" Height="Auto" ItemsSource="{Binding Source={StaticResource DS1}}" ItemTemplate="{StaticResource template}"/> </Grid> ...
|
|