or
<
telerik:RadDocking
PaneStateChange
=
"Dock_PaneStateChanged"
/>
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;
}
<
Window
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
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
>
<
telerik:RadMenu
x:Name
=
"radMenu"
ClickToOpen
=
"True"
>
<
telerik:RadMenuItem
Header
=
"File"
>
<
telerik:RadMenuItem
Header
=
"Open"
/>
<
telerik:RadMenuItem
Header
=
"Exit"
/>
</
telerik:RadMenuItem
>
</
telerik:RadMenu
>
<
ResourceDictionary
xmlns
=
"http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
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
>