Hi all,
I want a treeview with several level, but each time a different number of level.
I do :
In xaml :
<TreeView Name="TreeViewTask" ItemsSource="{Binding}" DataContext="{Binding}"><TreeView.ItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding Path=Value}"><TextBlock FontWeight="Bold" Text="{Binding Path=Key}" />
<HierarchicalDataTemplate.ItemTemplate><DataTemplate><TextBlock Text="{Binding}"/></DataTemplate></HierarchicalDataTemplate.ItemTemplate></HierarchicalDataTemplate></TreeView.ItemTemplate></TreeView>
And the code behind :
TreeViewTask.DataContext = currentProg.Tests;
Where Tests is a dictionary of string / Object
Is it possible to make a treeview with several level in this way? (I don't know the number of level)
Thanks for your help !