Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <TreeView ItemsSource="{Binding FirstGeneration}">
- <TreeView.Resources>
- <DataTemplate DataType="{x:Type local:AccountNodeVM}">
- <TreeViewItem Header ="{Binding Name}" />
- </DataTemplate>
- <HierarchicalDataTemplate DataType="{x:Type local:CategoryNodeVM}" ItemsSource="{Binding SubCategories}">
- <TreeViewItem Header="{Binding Name}" ItemsSource="{Binding Accounts}" />
- </HierarchicalDataTemplate>
- </TreeView.Resources>
- <TreeView.ItemContainerStyle>
- <Style TargetType="{x:Type TreeViewItem}">
- <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
- <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
- <Setter Property="FontWeight" Value="Normal" />
- </Style>
- </TreeView.ItemContainerStyle>
- </TreeView>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement