This question is locked. New answers and comments are not allowed.
Hi there,
I've extracted and modified all the control templates for RadMenuItem using the Windows 8 theme as the original version.
I've been able to re-style the SubMenuHeader and related pop-up, but I've hit a stumbling block - the parent context menu has IconColumWidth set to the standard value, so that icons are shown, however the items in the popup sub-menu do not have icons at all so the icon column should be collapsed.
However, I can't see any way to set the icon column width on the popup independently of the parent menu, due to this XAML in the popup template:
The problem is that the grid width is binding to the icon column width on the parent menu, which is displaying icons, but I don't want this width on the sub-menu items.
Is this a known problem? Do you have a workaround at the moment? I need to be able to control the icon column width independently at any level of the menu hierarchy.
Thanks!
Sam
I've extracted and modified all the control templates for RadMenuItem using the Windows 8 theme as the original version.
I've been able to re-style the SubMenuHeader and related pop-up, but I've hit a stumbling block - the parent context menu has IconColumWidth set to the standard value, so that icons are shown, however the items in the popup sub-menu do not have icons at all so the icon column should be collapsed.
However, I can't see any way to set the icon column width on the popup independently of the parent menu, due to this XAML in the popup template:
<Popup x:Name="PART_Popup" HorizontalOffset="-1" VerticalOffset="-2"> <Grid x:Name="PopupContentElement" Margin="3, 0"> <telerikChromes:ShadowChrome telerik:StyleManager.Theme="{StaticResource Theme}" /> <Border BorderThickness="1" BorderBrush="{StaticResource LightColorBrush}" Background="{StaticResource MainColorBrush}"> <Grid> <Grid Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Menu.IconColumnWidth}" HorizontalAlignment="Left"> <Rectangle Fill="{StaticResource MainColorBrush}" Margin="0, 0, 2, 0" /> </Grid> <ItemsPresenter Margin="0, 1" /> </Grid> </Border> </Grid></Popup>The problem is that the grid width is binding to the icon column width on the parent menu, which is displaying icons, but I don't want this width on the sub-menu items.
Is this a known problem? Do you have a workaround at the moment? I need to be able to control the icon column width independently at any level of the menu hierarchy.
Thanks!
Sam