I am trying to create a RadMenu by binding, but the top level items show and not the sub items. Am I missing something here?
<telerikNavigation:RadMenu ItemsSource="{Binding MenuItems}" |
VerticalAlignment="Top" |
> |
<telerikNavigation:RadMenu.ItemTemplate> |
<telerik:HierarchicalDataTemplate ItemsSource="{Binding Items}" > |
<TextBlock Text="{Binding Name}" /> |
</telerik:HierarchicalDataTemplate> |
</telerikNavigation:RadMenu.ItemTemplate> |
</telerikNavigation:RadMenu> |
public class MenuItem |
{ |
public string Name { get; set; } |
public List<MenuItem> Items { get; private set; } |
public MenuItem() |
{ |
this.Items = new List<MenuItem>(); |
} |
} |