Top-Level Header disappears when clicked to open

2 posts, 0 answers
  1. Brew Hutch
    Brew Hutch avatar
    56 posts
    Member since:
    Apr 2010

    Posted 22 Oct 2013 Link to this post

    Hi,

    I've updated DLLs to the latest version 2013.3.1016.40. When clicking the top-level header item, it disappears. I have to click and hold the mouse then the sub items will be displayed. This dose not happen to the previous version. 

    XAML
    <telerik:RadMenu x:Name="radMenu" ClickToOpen="True">
        <telerik:RadMenuItem  Header="File">
            <telerik:RadMenuItem  Header="Open"/>
            <telerik:RadMenuItem  Header="Exit"/>
        </telerik:RadMenuItem>
    </telerik:RadMenu>


    Style
        xmlns:Telerik_Windows_Controls_Chromes="clr-namespace:Telerik.Windows.Controls.Chromes;assembly=Telerik.Windows.Controls"
        xmlns:telerikbase="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls">
     
        <SolidColorBrush x:Key="MenuBackground" Color="#FF494A4D" />
        <LinearGradientBrush x:Key="MenuBorder" EndPoint="1,0.5" StartPoint="0.0,0.5">
            <GradientStop Color="#FF707070" Offset="0"/>
            <GradientStop Color="#FF707070" Offset="1"/>
            <GradientStop Color="#FFA3A3A3" Offset="0.5"/>
        </LinearGradientBrush>
     
        <SolidColorBrush x:Key="MenuForeground_Normal" Color="#FF262626" />
        <SolidColorBrush x:Key="MenuForeground_MouseOver" Color="#FF262626" />
     
        <SolidColorBrush x:Key="MenuBackground_MouseOver" Color="Transparent" />
        <LinearGradientBrush x:Key="MenuBorder_MouseOver" EndPoint="1,0.5" StartPoint="0,0.5">
            <GradientStop Color="#FF707070" Offset="0"/>
            <GradientStop Color="#FF707070" Offset="1"/>
            <GradientStop Color="#FFA3A3A3" Offset="0.5"/>
        </LinearGradientBrush>
     
        <SolidColorBrush x:Key="MenuBackground_Highlighted" Color="Blue" />
        <SolidColorBrush x:Key="MenuForeground_Highlighted" Color="#FF262626" />
     
        <SolidColorBrush x:Key="PopupBorder" Color="#FF595959" />
        <SolidColorBrush x:Key="PopupBackground" Color="White" />
     
     
        <!--SeparatorTemplate  -->
        <ControlTemplate TargetType="telerik:RadMenuItem" x:Key="SeparatorTemplate">
            <Rectangle Fill="{StaticResource PopupBorder}" Height="1" Margin="3" />
        </ControlTemplate>
     
        <!-- TopLevelItem -->
        <ControlTemplate x:Key="TopLevelItemTemplate" TargetType="telerik:RadMenuItem">
            <Grid x:Name="RootElement" Margin="1">
     
                <VisualStateManager.VisualStateGroups>
                    <VisualStateGroup x:Name="CommonStates">
                        <VisualState x:Name="Disabled">
                            <Storyboard>
                                <DoubleAnimation Duration="0" To="0.27" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="RootElement" />
                            </Storyboard>
                        </VisualState>
                        <VisualState x:Name="Normal" />
                        <VisualState x:Name="Highlighted">
                            <Storyboard>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="Foreground">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MenuForeground_MouseOver}" />
                                </ObjectAnimationUsingKeyFrames>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Tick" Storyboard.TargetProperty="Fill">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MenuForeground_MouseOver}" />
                                </ObjectAnimationUsingKeyFrames>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="Visibility">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                        <DiscreteObjectKeyFrame.Value>
                                            <Visibility>Collapsed</Visibility>
                                        </DiscreteObjectKeyFrame.Value>
                                    </DiscreteObjectKeyFrame>
                                </ObjectAnimationUsingKeyFrames>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Highlight" Storyboard.TargetProperty="Visibility">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                        <DiscreteObjectKeyFrame.Value>
                                            <Visibility>Visible</Visibility>
                                        </DiscreteObjectKeyFrame.Value>
                                    </DiscreteObjectKeyFrame>
                                </ObjectAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualState>
                    </VisualStateGroup>
                    <VisualStateGroup x:Name="FocusStates">
                        <VisualState x:Name="Unfocused" />
                        <VisualState x:Name="Focused" />
                    </VisualStateGroup>
                    <VisualStateGroup x:Name="CheckStates">
                        <VisualState x:Name="Checked">
                            <Storyboard>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Tick" Storyboard.TargetProperty="Visibility">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                        <DiscreteObjectKeyFrame.Value>
                                            <Visibility>Visible</Visibility>
                                        </DiscreteObjectKeyFrame.Value>
                                    </DiscreteObjectKeyFrame>
                                </ObjectAnimationUsingKeyFrames>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Icon" Storyboard.TargetProperty="Visibility">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                        <DiscreteObjectKeyFrame.Value>
                                            <Visibility>Collapsed</Visibility>
                                        </DiscreteObjectKeyFrame.Value>
                                    </DiscreteObjectKeyFrame>
                                </ObjectAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualState>
                        <VisualState x:Name="Unchecked" />
                        <VisualState x:Name="HideIcon">
                            <Storyboard>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Icon" Storyboard.TargetProperty="Visibility">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                        <DiscreteObjectKeyFrame.Value>
                                            <Visibility>Collapsed</Visibility>
                                        </DiscreteObjectKeyFrame.Value>
                                    </DiscreteObjectKeyFrame>
                                </ObjectAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualState>
                    </VisualStateGroup>
                </VisualStateManager.VisualStateGroups>
     
     
                <Border x:Name="Background" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" />
                <Border x:Name="Highlight" Visibility="Collapsed" Background="{StaticResource MenuBackground_MouseOver}" BorderBrush="{StaticResource MenuBorder_MouseOver}" BorderThickness="{TemplateBinding BorderThickness}" />
     
                <Border Margin="3 0 0 0">
                    <Grid x:Name="ContentGrid" Margin="{TemplateBinding Padding}">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
     
                        <Path x:Name="Tick" Margin="0 0 4 0" Grid.Column="0" Visibility="Collapsed" VerticalAlignment="Center" FlowDirection="LeftToRight"
                              Fill="{StaticResource MenuForeground_Normal}" Data="M0,3 4,7 8,0 6.3,0 3.8,4.9 2,2.7 z" Width="8" Height="7" />
                        <ContentPresenter x:Name="Icon" Margin="0 -2 2 -2" Grid.Column="0" Content="{TemplateBinding Icon}" ContentTemplate="{TemplateBinding IconTemplate}" />
     
                        <ContentControl x:Name="Header" Grid.Column="1" Foreground="{StaticResource MenuForeground_Normal}" Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
                    </Grid>
                </Border>
            </Grid>
     
        </ControlTemplate>
     
        <!-- TopLevelHeader -->
        <ControlTemplate x:Key="TopLevelHeaderTemplate" TargetType="telerik:RadMenuItem">
            <Grid x:Name="RootElement" Margin="1">
     
                <VisualStateManager.VisualStateGroups>
                    <VisualStateGroup x:Name="CommonStates">
                        <VisualState x:Name="Disabled">
                            <Storyboard>
                                <DoubleAnimation Duration="0" To="0.27" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="RootElement" />
                            </Storyboard>
                        </VisualState>
                        <VisualState x:Name="Normal" />
                        <VisualState x:Name="Highlighted">
                            <Storyboard>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="Foreground">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MenuForeground_MouseOver}" />
                                </ObjectAnimationUsingKeyFrames>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Tick" Storyboard.TargetProperty="Fill">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MenuForeground_MouseOver}" />
                                </ObjectAnimationUsingKeyFrames>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="Visibility">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                        <DiscreteObjectKeyFrame.Value>
                                            <Visibility>Collapsed</Visibility>
                                        </DiscreteObjectKeyFrame.Value>
                                    </DiscreteObjectKeyFrame>
                                </ObjectAnimationUsingKeyFrames>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Highlight" Storyboard.TargetProperty="Visibility">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                        <DiscreteObjectKeyFrame.Value>
                                            <Visibility>Visible</Visibility>
                                        </DiscreteObjectKeyFrame.Value>
                                    </DiscreteObjectKeyFrame>
                                </ObjectAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualState>
                    </VisualStateGroup>
                    <VisualStateGroup x:Name="FocusStates">
                        <VisualState x:Name="Unfocused" />
                        <VisualState x:Name="Focused" />
                    </VisualStateGroup>
                    <VisualStateGroup x:Name="CheckStates">
                        <VisualState x:Name="Checked">
                            <Storyboard>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Tick" Storyboard.TargetProperty="Visibility">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                        <DiscreteObjectKeyFrame.Value>
                                            <Visibility>Visible</Visibility>
                                        </DiscreteObjectKeyFrame.Value>
                                    </DiscreteObjectKeyFrame>
                                </ObjectAnimationUsingKeyFrames>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Icon" Storyboard.TargetProperty="Visibility">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                        <DiscreteObjectKeyFrame.Value>
                                            <Visibility>Collapsed</Visibility>
                                        </DiscreteObjectKeyFrame.Value>
                                    </DiscreteObjectKeyFrame>
                                </ObjectAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualState>
                        <VisualState x:Name="Unchecked" />
                        <VisualState x:Name="HideIcon">
                            <Storyboard>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Icon" Storyboard.TargetProperty="Visibility">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                        <DiscreteObjectKeyFrame.Value>
                                            <Visibility>Visible</Visibility>
                                        </DiscreteObjectKeyFrame.Value>
                                    </DiscreteObjectKeyFrame>
                                </ObjectAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualState>
                    </VisualStateGroup>
                </VisualStateManager.VisualStateGroups>
     
                <Border x:Name="Background" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" />
                <Border x:Name="Highlight" Visibility="Collapsed" Background="{StaticResource MenuBackground_MouseOver}" BorderBrush="{StaticResource MenuBorder_MouseOver}" BorderThickness="{TemplateBinding BorderThickness}" />
     
                <Border Margin="3 0 0 0">
                    <Grid x:Name="ContentGrid" Margin="{TemplateBinding Padding}">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
     
                        <Path x:Name="Tick" Margin="0 0 4 0" Grid.Column="0" Visibility="Collapsed" VerticalAlignment="Center" FlowDirection="LeftToRight"
                              Fill="{StaticResource MenuForeground_Normal}" Data="M0,3 4,7 8,0 6.3,0 3.8,4.9 2,2.7 z" Width="8" Height="7" />
     
                        <ContentPresenter x:Name="Icon" Margin="0 -2 2 -2" Grid.Column="0" Content="{TemplateBinding Icon}" ContentTemplate="{TemplateBinding IconTemplate}"/>
                        <ContentControl x:Name="Header" Grid.Column="1" Foreground="{StaticResource MenuForeground_Normal}" Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
                    </Grid>
                </Border>
     
     
                <Popup x:Name="PART_Popup" IsOpen="{TemplateBinding IsSubmenuOpen}" Focusable="false">
     
     
                    <Border BorderThickness="1" BorderBrush="{StaticResource PopupBorder}" Background="{StaticResource PopupBackground}">
                        <ItemsPresenter Margin="1" />
                    </Border>
                </Popup>
            </Grid>
     
        </ControlTemplate>
     
        <!-- SubMenuItem -->
        <ControlTemplate x:Key="SubMenuItemTemplate" TargetType="telerik:RadMenuItem">
            <Grid x:Name="RootElement">
     
                <VisualStateManager.VisualStateGroups>
                    <VisualStateGroup x:Name="CommonStates">
                        <VisualState x:Name="Disabled">
                            <Storyboard>
                                <DoubleAnimation Duration="0" To="0.27" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="RootElement" />
                            </Storyboard>
                        </VisualState>
                        <VisualState x:Name="Normal" />
                        <VisualState x:Name="Highlighted">
                            <Storyboard>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="Foreground">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MenuForeground_Highlighted}" />
                                </ObjectAnimationUsingKeyFrames>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Tick" Storyboard.TargetProperty="Fill">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MenuForeground_Highlighted}" />
                                </ObjectAnimationUsingKeyFrames>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="Visibility">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                        <DiscreteObjectKeyFrame.Value>
                                            <Visibility>Collapsed</Visibility>
                                        </DiscreteObjectKeyFrame.Value>
                                    </DiscreteObjectKeyFrame>
                                </ObjectAnimationUsingKeyFrames>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Highlight" Storyboard.TargetProperty="Visibility">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                        <DiscreteObjectKeyFrame.Value>
                                            <Visibility>Visible</Visibility>
                                        </DiscreteObjectKeyFrame.Value>
                                    </DiscreteObjectKeyFrame>
                                </ObjectAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualState>
                    </VisualStateGroup>
                    <VisualStateGroup x:Name="FocusStates">
                        <VisualState x:Name="Unfocused" />
                        <VisualState x:Name="Focused" />
                    </VisualStateGroup>
                    <VisualStateGroup x:Name="CheckStates">
                        <VisualState x:Name="Checked">
                            <Storyboard>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Tick" Storyboard.TargetProperty="Visibility">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                        <DiscreteObjectKeyFrame.Value>
                                            <Visibility>Visible</Visibility>
                                        </DiscreteObjectKeyFrame.Value>
                                    </DiscreteObjectKeyFrame>
                                </ObjectAnimationUsingKeyFrames>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Icon" Storyboard.TargetProperty="Visibility">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                        <DiscreteObjectKeyFrame.Value>
                                            <Visibility>Collapsed</Visibility>
                                        </DiscreteObjectKeyFrame.Value>
                                    </DiscreteObjectKeyFrame>
                                </ObjectAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualState>
                        <VisualState x:Name="Unchecked" />
                        <VisualState x:Name="HideIcon">
                            <Storyboard>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Icon" Storyboard.TargetProperty="Visibility">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                        <DiscreteObjectKeyFrame.Value>
                                            <Visibility>Visible</Visibility>
                                        </DiscreteObjectKeyFrame.Value>
                                    </DiscreteObjectKeyFrame>
                                </ObjectAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualState>
                    </VisualStateGroup>
                </VisualStateManager.VisualStateGroups>
     
     
                <Border x:Name="Background" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" />
                <Rectangle x:Name="Highlight" Visibility="Collapsed" Fill="{StaticResource MenuBackground_Highlighted}" />
     
                <Grid x:Name="ContentGrid">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <Grid Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Menu.IconColumnWidth}">
                        <Path x:Name="Tick" Grid.Column="0" Visibility="Collapsed" VerticalAlignment="Center" HorizontalAlignment="Center" FlowDirection="LeftToRight"
                              Fill="{StaticResource MenuForeground_Normal}" Data="M0,3 4,7 8,0 6.3,0 3.8,4.9 2,2.7 z" Width="8" Height="7" />
                        <ContentPresenter x:Name="Icon" Grid.Column="0" Margin="0 -2 2 -2" Content="{TemplateBinding Icon}" ContentTemplate="{TemplateBinding IconTemplate}" />
                    </Grid>
                    <ContentControl x:Name="Header" Grid.Column="1" Margin="{TemplateBinding Padding}" Foreground="{StaticResource MenuForeground_Normal}" Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
                </Grid>
            </Grid>
     
        </ControlTemplate>
     
        <!-- SubMenuHeader -->
        <ControlTemplate x:Key="SubMenuHeaderTemplate" TargetType="telerik:RadMenuItem">
            <Grid x:Name="RootElement">
     
                <VisualStateManager.VisualStateGroups>
                    <VisualStateGroup x:Name="CommonStates">
                        <VisualState x:Name="Highlighted">
                            <Storyboard>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="Foreground">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MenuForeground_Highlighted}" />
                                </ObjectAnimationUsingKeyFrames>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpandIcon" Storyboard.TargetProperty="Fill">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MenuForeground_Highlighted}" />
                                </ObjectAnimationUsingKeyFrames>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="Visibility">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                        <DiscreteObjectKeyFrame.Value>
                                            <Visibility>Collapsed</Visibility>
                                        </DiscreteObjectKeyFrame.Value>
                                    </DiscreteObjectKeyFrame>
                                </ObjectAnimationUsingKeyFrames>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Highlight" Storyboard.TargetProperty="Visibility">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                        <DiscreteObjectKeyFrame.Value>
                                            <Visibility>Visible</Visibility>
                                        </DiscreteObjectKeyFrame.Value>
                                    </DiscreteObjectKeyFrame>
                                </ObjectAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualState>
                        <VisualState x:Name="Disabled">
                            <Storyboard>
                                <DoubleAnimation Duration="0" To="0.27" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="RootElement" />
                            </Storyboard>
                        </VisualState>
                        <VisualState x:Name="Normal" />
                    </VisualStateGroup>
                    <VisualStateGroup x:Name="FocusStates">
                        <VisualState x:Name="Unfocused" />
                        <VisualState x:Name="Focused" />
                    </VisualStateGroup>
                    <VisualStateGroup x:Name="CheckStates">
                        <VisualState x:Name="Checked">
                            <Storyboard>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Icon" Storyboard.TargetProperty="Visibility">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                        <DiscreteObjectKeyFrame.Value>
                                            <Visibility>Collapsed</Visibility>
                                        </DiscreteObjectKeyFrame.Value>
                                    </DiscreteObjectKeyFrame>
                                </ObjectAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualState>
                        <VisualState x:Name="Unchecked" />
                        <VisualState x:Name="HideIcon" />
                    </VisualStateGroup>
                </VisualStateManager.VisualStateGroups>
     
                <Border x:Name="Background" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" />
                <Rectangle x:Name="Highlight" Visibility="Collapsed" Fill="{StaticResource MenuBackground_Highlighted}" />
     
                <Grid>
     
                    <Grid x:Name="ContentGrid">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
     
                        <Grid Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Menu.IconColumnWidth}">
                            <ContentPresenter x:Name="Icon" Margin="0 -2 2 -2" Content="{TemplateBinding Icon}" ContentTemplate="{TemplateBinding IconTemplate}" />
                        </Grid>
                        <ContentControl x:Name="Header" Grid.Column="1" Margin="{TemplateBinding Padding}" Foreground="{StaticResource MenuForeground_Normal}" Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
                        <Path x:Name="ExpandIcon" Grid.Column="2" Margin="6 0" Fill="{StaticResource MenuForeground_Normal}" VerticalAlignment="Center" Width="5" Height="5" Data="M0,0 L5,2.5 0,5Z" />
                    </Grid>
                </Grid>
     
     
                <Popup x:Name="PART_Popup" IsOpen="{TemplateBinding IsSubmenuOpen}" Focusable="false">
     
     
                    <Border BorderThickness="1" BorderBrush="{StaticResource PopupBorder}" Background="{StaticResource PopupBackground}">
                        <ItemsPresenter Margin="1" />
                    </Border>
                </Popup>
            </Grid>
     
        </ControlTemplate>
     
        <Style x:Key="RadMenuItemStyle" TargetType="{x:Type telerik:RadMenuItem}">
            <Setter Property="Padding" Value="6,2"/>
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="BorderBrush" Value="#FF848484"/>
            <Setter Property="BorderThickness" Value="0"/>
            <Setter Property="TopLevelHeaderTemplateKey" Value="{StaticResource TopLevelHeaderTemplate}" />
            <Setter Property="TopLevelItemTemplateKey" Value="{StaticResource TopLevelItemTemplate}" />
            <Setter Property="SubmenuHeaderTemplateKey" Value="{StaticResource SubMenuHeaderTemplate}" />
            <Setter Property="SubmenuItemTemplateKey" Value="{StaticResource SubMenuItemTemplate}" />
     
            <Setter Property="SeparatorTemplateKey" Value="{StaticResource SeparatorTemplate}" />
     
            <Setter Property="Template" Value="{StaticResource SubMenuItemTemplate}" />
     
            <Setter Property="HorizontalContentAlignment" Value="Left"/>
            <Setter Property="VerticalContentAlignment" Value="Center"/>
            <Setter Property="SnapsToDevicePixels" Value="True"/>
            <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
     
            <Style.Triggers>
                <Trigger Property="Role" Value="TopLevelHeader">
                    <Setter Property="Template" Value="{StaticResource TopLevelHeaderTemplate}" />
                </Trigger>
                <Trigger Property="Role" Value="TopLevelItem">
                    <Setter Property="Template" Value="{StaticResource TopLevelItemTemplate}" />
                </Trigger>
                <Trigger Property="Role" Value="SubmenuHeader">
                    <Setter Property="Template" Value="{StaticResource SubMenuHeaderTemplate}" />
                </Trigger>
                <Trigger Property="Role" Value="SubmenuItem">
                    <Setter Property="Template" Value="{StaticResource SubMenuItemTemplate}" />
                </Trigger>
                <Trigger Property="Role" Value="Separator">
                    <Setter Property="Template" Value="{StaticResource SeparatorTemplate}" />
                </Trigger>
            </Style.Triggers>
        </Style>
     
        <!-- RadMenu -->
        <ControlTemplate x:Key="RadMenuControlTemplate" TargetType="telerik:RadMenu">
            <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                <ItemsPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" />
            </Border>
        </ControlTemplate>
     
        <ItemsPanelTemplate x:Key="RadMenuItemsPanelTemplate">
            <telerik:RadWrapPanel />
        </ItemsPanelTemplate>
     
        <Style TargetType="{x:Type telerik:RadMenu}">
            <Setter Property="IconColumnWidth" Value="0" />
            <Setter Property="Padding" Value="0" />
            <Setter Property="BorderThickness" Value="0" />
            <Setter Property="BorderBrush" Value="{StaticResource MenuBorder}" />
            <Setter Property="Background" Value="{StaticResource MenuBackground}" />
            <Setter Property="ItemsPanel" Value="{StaticResource RadMenuItemsPanelTemplate}" />
            <Setter Property="Template" Value="{StaticResource RadMenuControlTemplate}" />
            <Setter Property="HorizontalContentAlignment" Value="Left"/>
            <Setter Property="ItemContainerStyle" Value="{StaticResource RadMenuItemStyle}" />
            <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        </Style>
    </ResourceDictionary>

    Thanks,
    Brew
  2. Rosen Vladimirov
    Admin
    Rosen Vladimirov avatar
    640 posts

    Posted 23 Oct 2013 Link to this post

    Hi Brew,

    The resource dictionary that you are merging is using our old styles - we have changed RadMenuItem's Implicit Style and using the old one is causing the problem. You can take a look at our new Style inside Telerik.Windows.Controls.Navigation.xaml under <RadControls_Installation_Dir>\Themes.Implicit\WPF40\OfficeBlack directory.

    Hopefully this helps. Feel free to contact us in case you have any other problems or concerns.

    Regards,
    Rosen Vladimirov
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top