This question is locked. New answers and comments are not allowed.
I have a RadMenu that I need some of the drop downs to have icons, and others to have no icons. I have made two styles, one for each, and it seems to work rather well (mostly) for static menu items, but I have some items that are generated dynamically and I can't figure out how to set the "no-icon" style on those items.
By "no-icon" I mean no icon column at all. Below is the code for the sub items that I need to set the style on. The only thing that I can think of is that the generated ones have an icon column because they are sub menu items and I believe if they had children themselves they wouldn't have an icon column. If that's the case, what is the best way to make the styles so I can control which ones have an icon column?
By "no-icon" I mean no icon column at all. Below is the code for the sub items that I need to set the style on. The only thing that I can think of is that the generated ones have an icon column because they are sub menu items and I believe if they had children themselves they wouldn't have an icon column. If that's the case, what is the best way to make the styles so I can control which ones have an icon column?
<
telerik:RadMenuItem
FontSize
=
"10.667"
FontWeight
=
"Bold"
Header
=
"Projects"
Style
=
"{StaticResource RadMenuItemStyle}"
ItemsSource
=
"{Binding Path=Projects}"
>
<
i:Interaction.Triggers
>
<
i:EventTrigger
EventName
=
"Click"
>
<
i:InvokeCommandAction
Command
=
"{Binding RadMenuItemClickCommand}"
CommandParameter
=
"{Binding Path=Projects}"
/>
</
i:EventTrigger
>
</
i:Interaction.Triggers
>
<
telerik:RadMenuItem.ItemTemplate
>
<
telerik:HierarchicalDataTemplate
>
<
telerik:ContainerBinding.ContainerBindings
>
<
telerik:ContainerBindingCollection
>
<
telerik:ContainerBinding
PropertyName
=
"IsCurrent"
Binding
=
"{Binding Selected, Mode=TwoWay}"
/>
</
telerik:ContainerBindingCollection
>
</
telerik:ContainerBinding.ContainerBindings
>
<
TextBlock
Text
=
"{Binding Path=Name}"
Foreground
=
"Black"
/>
</
telerik:HierarchicalDataTemplate
>
</
telerik:RadMenuItem.ItemTemplate
>
</
telerik:RadMenuItem
>