Hi IG Support,
I have attached a sample XamMenu bound to a 3-tier collection. I am trying to use nested HierarchicalItemTemplates to display all three levels in the menu, however, only the first level is displayed. If you run the sample, I expect "DHL" to expand to show the next level, but it does not. Can someone take a quick look and point out my error in the markup?
Thanks!
Francis
PS - The irony is, I probably created just such a sample when I was in Dev Support. :)
Thank you, Petar, for the swift reply. Nice talking with you again, too. :)
The markup works now. I probably coded one of these among my old samples, but oh, how quickly I forget!
Regards,Francis
Hello Francis,
Really nice to see you. I looked into your project and you seem to have set the hierarchical ItemsSources a level lower each. Here is how it should be:
<ig:XamMenu x:Name="PluginSelector" MenuOrientation="Vertical" ExpandOnHover="True" ItemsSource="{Binding Source={StaticResource PVM},Path=Carriers}"> <ig:XamMenu.HierarchicalItemTemplate> <ig:HierarchicalDataTemplate ItemsSource="{Binding Path=Services}"> <DataTemplate> <TextBlock Text="{Binding Name}"/> </DataTemplate> <ig:HierarchicalDataTemplate.HierarchicalItemTemplate> <ig:HierarchicalDataTemplate ItemsSource="{Binding Path=Rates}" > <!--temsSource="{Binding Path=Services}">--> <DataTemplate> <TextBlock Text="{Binding ServiceName}"/> </DataTemplate> <ig:HierarchicalDataTemplate.ItemTemplate> <DataTemplate> <Button Content="{Binding RateName}" Command="{Binding Path=LoadPluginCommand, Source={StaticResource PVM}}" CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=UserControl}}" BorderThickness="0" Background="White" /> </DataTemplate> </ig:HierarchicalDataTemplate.ItemTemplate> </ig:HierarchicalDataTemplate> </ig:HierarchicalDataTemplate.HierarchicalItemTemplate> </ig:HierarchicalDataTemplate> </ig:XamMenu.HierarchicalItemTemplate> </ig:XamMenu>
Let me know, if I can help with anything else.