tomasslavicek

TreeView WPF

Feb 11th, 2018
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 0.61 KB | None | 0 0
  1. <TreeView Grid.Row="1" Background="{StaticResource DarkBrush}" ItemsSource="{Binding Block.InnerBlocks}">
  2.     <TreeView.Resources>
  3.         <HierarchicalDataTemplate DataType="{x:Type models:CodeBlock}" ItemsSource="{Binding InnerBlocks}">
  4.             <StackPanel HorizontalAlignment="Stretch" Margin="0 0 0 6">
  5.                 <TextBlock Text="{Binding BlockName}" Style="{StaticResource TitleTreeStyle}" />
  6.                 <TextBlock Text="{Binding InnerBlocksName}" Style="{StaticResource TitleNumberStyle}" />
  7.             </StackPanel>
  8.         </HierarchicalDataTemplate>
  9.     </TreeView.Resources>
  10. </TreeView>
Advertisement
Add Comment
Please, Sign In to add comment