Hi. I was wondering if there is a simple way to implement an itemtemplateselector property for the RadialMenuItem?
I have the following:
<XamRadialMenu>
<ig:RadialMenuItem Visibility="{Binding HasContextualItems, Converter={StaticResource BoolToHiddenVisibility}}" IsEnabled="{Binding HasContextualItems}" ToolTip="{Binding ContextualMenuHeader}" Header="{Binding ContextualMenuHeader}" Command="{Binding OpenCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}}" OuterRingButtonFill="{Binding ContextualMenuBrush}" OuterRingButtonHotTrackFill="{Binding ContextualMenuHotTrackBrush}" ItemsSource="{Binding ContextualMenuItems}" AutoUpdateRecentItem="False"> // Here instead of explicitly using one itemContainderTemplate i'd like to use a selector <ig:RadialMenuItem.ItemContainerTemplate> <DataTemplate DataType="local:ContextualMenuItem"> <ig:RadialMenuItem CheckBehavior="CheckBox" Header="{Binding Header}" ToolTip="{Binding Header}" Command="{Binding Command}" CommandParameter="{Binding RelativeSource={RelativeSource Self}}" OuterRingButtonFill="{Binding Brush}" OuterRingButtonHotTrackFill="{Binding HotTrackBrush}" ItemsSource="{Binding Items}" AutoUpdateRecentItem="False" Visibility="{Binding UseMtvPresetListDataTemplate, Converter={StaticResource InvBoolToVisibility}}"> <ig:RadialMenuItem.ItemContainerTemplate> <DataTemplate DataType="local:ContextualMenuItem"> <ig:RadialMenuItem CheckBehavior="CheckBox" Header="{Binding Header}" ToolTip="{Binding Header}" Command="{Binding Command}" CommandParameter="{Binding RelativeSource={RelativeSource Self}}" /> </DataTemplate> </ig:RadialMenuItem.ItemContainerTemplate> </ig:RadialMenuItem> </DataTemplate> </ig:RadialMenuItem.ItemContainerTemplate> </ig:RadialMenuItem>
Thanks for the help!
Nathan
Hello Nathan,
Thank you for posting. After investigating itemtemplateselector property for the RadialMenuItem and doing some research, itemtemplateselector in built support for RadialMenuItem has been determined to be a new feature idea. You can suggest new feature ideas for future versions (or vote for existing ones) at <ideas.infragistics.com>.
Best thing I can probably recommend to try is that you builds the DataTemplates externally and gives them an x:Key. Doing that, you can get those templates programmatically and assign them. Completely spit-balling though, don't really know if that would work out of the box, for us in-built support of that in a new feature idea.
Sincerely,Divya JainAssociate Software Developer
Ok I'll see what I can do.Thanks for the quick reply!