Hi,
I have a databound RadContextMenu (as a DropDownContent of a RadRibbonSplittButton).
The size of the icons I am binding to is 16 x 16, But they appear larger. So I asume, I have to style the Icon in the RadMenuItem and set the Stretch property to "None". But I have no idea how...
Please have a look at the sceenshot and the code snippets.
Thanks for any help!
Thomas
I have a databound RadContextMenu (as a DropDownContent of a RadRibbonSplittButton).
The size of the icons I am binding to is 16 x 16, But they appear larger. So I asume, I have to style the Icon in the RadMenuItem and set the Stretch property to "None". But I have no idea how...
Please have a look at the sceenshot and the code snippets.
Thanks for any help!
Thomas
<telerik:HierarchicalDataTemplate ItemsSource="{Binding SubItems}" x:Name="MenuItemTemplate"> <telerik:ContainerBinding.ContainerBindings> <telerik:ContainerBindingCollection> <telerik:ContainerBinding PropertyName="Icon" Binding="{Binding SmallImage, Converter={StaticResource ImageConverter}, ConverterParameter=IgnoreTargetType}" /> <telerik:ContainerBinding PropertyName="Command" Binding="{Binding Command}" /> <telerik:ContainerBinding PropertyName="CommandParameter" Binding="{Binding CommandParameter, Mode=TwoWay}" /> </telerik:ContainerBindingCollection> </telerik:ContainerBinding.ContainerBindings> <TextBlock Text="{Binding Text}" /> </telerik:HierarchicalDataTemplate>
<DataTemplate x:Name="DropDownButtonWithContextMenuTemplate"> <telerik:RadRibbonDropDownButton Text="{Binding Text}" Size="{Binding Size}" CollapseToSmall="WhenGroupIsSmall" CollapseToMedium="WhenGroupIsMedium" LargeImage="{Binding LargeImage}" SmallImage="{Binding SmallImage}" Command="{Binding Command}" CommandParameter="{Binding CommandParameter}"> <telerik:RadRibbonDropDownButton.DropDownContent> <telerik:RadContextMenu ItemsSource="{Binding Buttons}" ItemTemplate="{StaticResource MenuItemTemplate}"> </telerik:RadContextMenu> </telerik:RadRibbonDropDownButton.DropDownContent> </telerik:RadRibbonDropDownButton> </DataTemplate>