I have a nested Dictionary with 5 levels.
I would like to show it in the TreeView but I only get the first layer.
<telerik:RadTreeView x:Name="myTreeView"
MinWidth="200px"
ItemsSource="{Binding Areas}"
ItemTemplate="{StaticResource BuildingHDT}"
ItemContainerStyle="{StaticResource ItemContainerStyle}"
MaxHeight="{Binding ElementName=host, Path=ActualHeight}"
Grid.IsSharedSizeScope="True"
HorizontalContentAlignment="Stretch"
IsVirtualizing="True"
TextSearch.TextPath="Value.Name"
extension:ContextMenuBehavior.ContextMenu="{Binding ElementName=TreeContextMenu}">
<telerik:RadContextMenu.ContextMenu>
<telerik:RadContextMenu x:Name="TreeContextMenu"/>
</telerik:RadContextMenu.ContextMenu>
<telerik:EventToCommandBehavior.EventBindings>
<telerik:EventBinding Command="{Binding OpenSelectedItem}"
EventName="MouseLeftButtonDown"
RaiseOnHandledEvents="True"
PassEventArgsToCommand="True" />
</telerik:EventToCommandBehavior.EventBindings>
</telerik:RadTreeView>
<HierarchicalDataTemplate x:Key="QualifierHDT"
DataType="{x:Type models:Qualifier}"
ItemsSource="{Binding Qualifier}">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Value.Name}" />
<TextBlock Text="{Binding Value.AnnotationCount}" Margin="5 0 0 0" />
</StackPanel>
</HierarchicalDataTemplate>
<HierarchicalDataTemplate x:Key="ComponentHDT"
DataType="{x:Type models:Component}"
ItemsSource="{Binding Component}"
ItemTemplate="{StaticResource QualifierHDT}">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Key}" />
<TextBlock Text="{Binding Value.AnnotationCount}" Margin="5 0 0 0" />
</StackPanel>
</HierarchicalDataTemplate>
<HierarchicalDataTemplate x:Key="SystemCollectionHDT"
DataType="{x:Type models:SystemCollection}"
ItemsSource="{Binding SystemCollection}"
ItemTemplate="{StaticResource ComponentHDT}">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Value.Name}" />
<TextBlock Text="{Binding Value.AnnotationCount}" Margin="5 0 0 0" />
</StackPanel>
</HierarchicalDataTemplate>
<HierarchicalDataTemplate x:Key="BuildingHDT"
DataType="{x:Type models:Building}"
ItemsSource="{Binding Buildings}"
ItemTemplate="{StaticResource SystemCollectionHDT}">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Value.Name}" />
<TextBlock Text="{Binding Value.AnnotationCount}" Margin="5 0 0 0" />
</StackPanel>
</HierarchicalDataTemplate>