I've inherited some code and I'm just confused enough to wonder about what I'm doing anymore... I have a menu object which has a n-level tree of menu options that I'd like to bind as the datasource for my RadMenu. I seem to have it working properly except for the fact that I have a RadMenuItem inside another RadMenuItem because I can't figure out how else to get the click event. I'm not an expert withi this so your patience is appreciated.
I have a HierarchicalDataTemplate as follows:
<
rad:HierarchicalDataTemplate x:Key="MenuItemDT" ItemsSource="{Binding Items}" >
<menu:RadMenuItem Click="ctxMnuItem_Click" Header="{Binding Caption}" Icon="{Binding ImagePath, Converter={StaticResource
assetconv}}">
</menu:RadMenuItem>
</rad:HierarchicalDataTemplate>
And my RadMenu is defined as follows:
<menu:RadMenu x:Name="mnuCtx">
<menu:RadMenuItem ItemTemplate="{StaticResource MenuItemDT}" ItemsSource="{Binding ContextMenu.Items}">
<menu:RadMenuItem.Icon>
<Path Stretch="Fill" Fill="Black" Height="4" Width="8" Data="F1 M 531.107,321.943L 541.537,321.943L 536.322,328.042L
531.107,321.943 Z" >
</Path>
</menu:RadMenuItem.Icon>
</menu:RadMenuItem>
</menu:RadMenu>
When I run my project, everything loads and runs fine except my RadMenuItems contain RadMenuItems. I thought about putting a "HeaderedContentControl" into "MenuItemDT" but then I don't have a place to assign my click event...