Telerik Forums
UI for WPF Forum
2 answers
126 views
Hi,
I wanted to display a custom template in a custom aggregated grid format for tracker information for entire series. Currently we have two templates - trackerballControl which is panel template and when the update happens in TrackBallInfoControl, it picks up the tracker information template and adds it into template as seperate controls. How can i control this?
I even tried entrying dummy datapointinfo in the context so that it can display empty row but DatapointInfo and all the classes it uses are internal and very hard to do that.
Can anyone help please?


Thanks
Avneesh


Avneesh
Top achievements
Rank 1
 answered on 23 Oct 2013
1 answer
114 views
I have spent a good amount of time looking for a way to do this but I finally had to contact support y'day.  I did not find any hits in the forum archive as well so, cross-posting this solution here for any mortals like me could find it in future.  To their credit, support team was swift in getting the answer!

If you need a way to set RadPane's background differently based on whether it is docked or floating, you will have to do this from the RadPaneGroup that the pane belongs to.  Although, the group can be styled in XAML, I prefer the following because I needed this be done only for the panes that go floating in runtime while all docked panes remain transparent.

XAML:
<telerik:RadDocking PaneStateChange="Dock_PaneStateChanged"/>

CodeBehind:
private void Dock_PaneStateChanged(object sender, Telerik.Windows.RadRoutedEventArgs e)
{
        RadPane pane = e.OriginalSource as RadPane;
 
        if(pane == null) return;
 
        RadPaneGroup pGroup = pane.ParentOfType<RadPaneGroup>();
 
        pGroup.Background = pane.IsFloating? Brushes.DarkMagenta : Brushes.Transparent;
}


Kalin
Telerik team
 answered on 23 Oct 2013
2 answers
436 views
I am attempting to customize the column headers for RadGridView, but am running into a problem where the template generated in Blend is not based on my selected theme. I have assigned the Windows7Theme to the GridViewHeaderCell before editing the template and have also assigned the theme to the RadGridView itself, but the header cells use the office black theme instead. I am following the instructions found here: http://www.telerik.com/help/wpf/gridview-styling-column-headers.html

My goal is to add a button to the header. I do not wish to alter the style/theme other than that. If there is another way to accomplish this, or a way to edit the header cell template that will respect the theme, I would be interested to know how. Thank you!

I am using Visual Studio 2012 and Expression Blend 4.

I have attached a screenshot of the resulting gridview. Here is the XAML:
<Window
    x:Class="WpfApplication1.MainWindow"
    x:Name="TheWindow"
    Title="MainWindow"
    Width="640" Height="480">
    <Window.Resources>
        <Style x:Key="GridViewHeaderCellStyle1" TargetType="{x:Type telerik:GridViewHeaderCell}">
            <!-- Auto-generated template content removed for sake of brevity -->
            <Setter Property="Background">
                <Setter.Value>
            <!-- Note the colors here, they are the office black theme colors that have been hard coded into the template. Remnants of the office black theme are found throughout the auto-generated template -->
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#FF5B5B5B" Offset="1"/>
                        <GradientStop Color="#FF868686"/>
                        <GradientStop Color="#FF4F4F4F" Offset="0.42"/>
                        <GradientStop Color="#FF0E0E0E" Offset="0.43"/>
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
            <Setter Property="BorderBrush" Value="#FF848484"/>
            <Setter Property="BorderThickness" Value="0,0,1,1"/>
            <Setter Property="VerticalContentAlignment" Value="Center"/>
            <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
            <Setter Property="Padding" Value="5,0,3,0"/>
            <Setter Property="DropIndicatorBrush" Value="White"/>
            <Setter Property="DropIndicatorThickness" Value="2"/>
            <Setter Property="Foreground" Value="White"/>
            <Setter Property="SnapsToDevicePixels" Value="True"/>
        </Style>
    </Window.Resources>
 
    <Grid>
     <!-- GridViewHeaderCell used for editing template -->
        <telerik:GridViewHeaderCell telerik:StyleManager.Theme="Windows7" Style="{DynamicResource GridViewHeaderCellStyle1}" />
         
        <telerik:RadGridView AutoGenerateColumns="False">
            <telerik:StyleManager.Theme>
                <telerik:Windows7Theme/>
            </telerik:StyleManager.Theme>
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn Header="ID3" HeaderCellStyle="{DynamicResource GridViewHeaderCellStyle1}" />
            </telerik:RadGridView.Columns>
             
        </telerik:RadGridView>
    </Grid>
</Window>

Yoan
Telerik team
 answered on 23 Oct 2013
1 answer
118 views


Hi,

I wants to assign tooltip to the RadRichTextBox Text, is there any way to do this.

Please help.  & thanks

Regards
Ajita
Petya
Telerik team
 answered on 23 Oct 2013
3 answers
85 views
Get the following when open the File tab
Pavel R. Pavlov
Telerik team
 answered on 23 Oct 2013
1 answer
96 views
Hi,
I have exported two files in  xaml format.Now i want to merge those two files in one.how can it will possible?
Here my code example:
string _xaml1=exported xaml;
string _xaml2=exported xaml data;
  XamlFormatProvider _provider = new XamlFormatProvider();
                Telerik.Windows.Documents.Model.RadDocument _t = new RadDocument();

XamlFormatProvider xamlProvider = new XamlFormatProvider();
                  _t = _provider.Import(_xaml1);
                   _n = _provider.Import(_xaml2);
                                        foreach (Telerik.Windows.Documents.Model.Section section in _n.Sections)
                                        {
                                            Section copySection = section.CreateDeepCopy() as Section;
                                            _n.Sections.Remove(section);
                                            _t.Sections.Add(copySection);
                                        }
    BUT HERE I am getting error while using import method.
Please give me any idea for that.
Thanks,
Petya
Telerik team
 answered on 23 Oct 2013
1 answer
130 views
Hi,
I have exported two files in  xaml format.Now i want to merge those two files in one.how can it will possible?
Here my code example:
string _xaml1=exported xaml;
string _xaml2=exported xaml data;
  XamlFormatProvider _provider = new XamlFormatProvider();
                Telerik.Windows.Documents.Model.RadDocument _t = new RadDocument();

XamlFormatProvider xamlProvider = new XamlFormatProvider();
                  _t = _provider.Import(_xaml1);
                   _n = _provider.Import(_xaml2);
                                        foreach (Telerik.Windows.Documents.Model.Section section in _n.Sections)
                                        {
                                            Section copySection = section.CreateDeepCopy() as Section;
                                            _n.Sections.Remove(section);
                                            _t.Sections.Add(copySection);
                                        }
    BUT HERE I am getting error while using import method.
Please give me any idea for that.
Thanks,
Petya
Telerik team
 answered on 23 Oct 2013
1 answer
66 views
I can set up the editot eh way I ant in XAML, but I want to change the icons for the undo buttons. I select the editor, then choose edit current, edit a copy. I make my changes and they look fine, but when I build the applidation, only the editor shell shows up and none of the buttons or tools are there. If I remove the Style setting everything works, but with the default icons.
Todor
Telerik team
 answered on 23 Oct 2013
1 answer
124 views
Hi,

Is there any way we can begin a connection manipulation from code?

Specifics:

We want to have a context menu item on a RadDiagramShape, that when clicked gets the associated Connection, sets the connection's Source to null and effectively puts the connection into attaching / moving mode, so that the connection source end point effectively snaps to the mouse position and allows the user to reattch it to another RadDiagramShape / node.

We can easily get the relevant connection but how do we begin this user manipulation?

Gary.
Pavel R. Pavlov
Telerik team
 answered on 23 Oct 2013
1 answer
144 views
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
Rosen Vladimirov
Telerik team
 answered on 23 Oct 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?