Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2014
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. <TreeView ItemsSource="{Binding FirstGeneration}">
  2. <TreeView.Resources>
  3. <DataTemplate DataType="{x:Type local:AccountNodeVM}">
  4. <TreeViewItem Header ="{Binding Name}" />
  5. </DataTemplate>
  6.  
  7. <HierarchicalDataTemplate DataType="{x:Type local:CategoryNodeVM}" ItemsSource="{Binding SubCategories}">
  8. <TreeViewItem Header="{Binding Name}" ItemsSource="{Binding Accounts}" />
  9. </HierarchicalDataTemplate>
  10. </TreeView.Resources>
  11.  
  12. <TreeView.ItemContainerStyle>
  13. <Style TargetType="{x:Type TreeViewItem}">
  14. <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
  15. <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
  16. <Setter Property="FontWeight" Value="Normal" />
  17. </Style>
  18. </TreeView.ItemContainerStyle>
  19. </TreeView>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement