I m using the Custom menu Control example and
I want to know how can we navigate using the Telerik Silverlight Custom Menu Control ?
I also paste the .xaml page code below,
Code :
<UserControl x:Class="OrderManagement.Controls.menu"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:telerikControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
xmlns:local="clr-namespace:OrderManagement.Controls"
mc:Ignorable="d">
<UserControl.Resources>
<!-- Example menu ViewModel -->
<local:MenuViewModel x:Key="MenuItemsSource" >
<local:MenuItemViewModel Content="Patient Management" Type="TopLevel">
<local:MenuItemViewModel Content="FirstColumn" Type="TopLevelSection">
<local:MenuItemViewModel Content="New Patient" Type="Title" />
<local:MenuItemViewModel Content="Home" Type="SpecialLink"/>
<local:MenuItemViewModel Content="Go To Dashboard" Type="SpecialLink" />
</local:MenuItemViewModel>
<local:MenuItemViewModel Content="Separator" IsSeparator="True" Type="TopLevelSection" />
<local:MenuItemViewModel Content="SecondColumn" Type="TopLevelSection">
<local:MenuItemViewModel Content="Exisitng Patient" Type="Title" />
<local:MenuItemViewModel Content="View Patient List" />
<local:MenuItemViewModel Content="Edit Existing Patient" />
<local:MenuItemViewModel Content="All" Type="SpecialLink" />
</local:MenuItemViewModel>
<local:MenuItemViewModel Content="Separator" IsSeparator="True" Type="TopLevelSection" />
<local:MenuItemViewModel Content="ThirdColumn" Type="TopLevelSection">
<local:MenuItemViewModel Content="Patient Management" Type="Title" />
<local:MenuItemViewModel Content="RRO Patient Management is a core module that helps physician to deal with patient." Type="Paragraph" />
<local:MenuItemViewModel Content="Read more" Type="SpecialLink" />
<local:MenuItemViewModel Content="Themes" Type="Title" />
<local:MenuItemViewModel Content="Office, Summer, Vista, Windows7" Type="Paragraph" />
<local:MenuItemViewModel Type="Gallery">
<local:MenuItemViewModel Content="/Menu/Resources/Themes1.png" Type="Image" />
<local:MenuItemViewModel Content="/Menu/Resources/Themes2.png" Type="Image" />
</local:MenuItemViewModel>
<local:MenuItemViewModel Type="Gallery">
<local:MenuItemViewModel Content="/Menu/Resources/Themes3.png" Type="Image" />
<local:MenuItemViewModel Content="/Menu/Resources/Themes4.png" Type="Image" />
</local:MenuItemViewModel>
<local:MenuItemViewModel Content="Read more" Type="SpecialLink" />
</local:MenuItemViewModel>
</local:MenuItemViewModel>
<local:MenuItemViewModel Content="Order Management" Type="TopLevel">
<local:MenuItemViewModel Content="FirstColumn" Type="TopLevelSection">
<local:MenuItemViewModel Content="New Order" Type="Title"/>
<local:MenuItemViewModel Content="Create Order" />
<local:MenuItemViewModel Content="/Menu/Resources/Gallery3D_1.png" Type="Image" />
<local:MenuItemViewModel Content="See 3D charts gallery" Type="SpecialLink" />
</local:MenuItemViewModel>
<local:MenuItemViewModel Content="Separator" IsSeparator="True" Type="TopLevelSection" />
<local:MenuItemViewModel Content="SecondColumn" Type="TopLevelSection">
<local:MenuItemViewModel Content="Existing Order" Type="Title"/>
<local:MenuItemViewModel Content="View Order" />
<local:MenuItemViewModel Content="Go To Dashboard" Type="SpecialLink" />
</local:MenuItemViewModel>
<local:MenuItemViewModel Content="Separator" IsSeparator="True" Type="TopLevelSection" />
<local:MenuItemViewModel Content="ThirdColumn" Type="TopLevelSection">
<local:MenuItemViewModel Content="Order Management" Type="Title" />
<local:MenuItemViewModel Content="This module is responsible t......" Type="Paragraph" />
<local:MenuItemViewModel Content="Read more" Type="SpecialLink" />
<local:MenuItemViewModel Content="See demo" Type="SpecialLink" />
<local:MenuItemViewModel Content="Grouping and Aggregation" Type="Title" />
<local:MenuItemViewModel Content="RadChart is now able to group and aggregate data during data binding, optimizing numerous analyical business scearios." Type="Paragraph" />
<local:MenuItemViewModel Content="Read more" Type="SpecialLink" />
<local:MenuItemViewModel Content="/Menu/Resources/Gallery3D_2.png" Type="Image" />
<local:MenuItemViewModel Content="See demo" Type="SpecialLink" />
</local:MenuItemViewModel>
</local:MenuItemViewModel>
<local:MenuItemViewModel Content="MIS Report" Type="TopLevel">
<local:MenuItemViewModel Content="FirstColumn" Type="TopLevelSection">
<local:MenuItemViewModel Content="Integration Examples" Type="Title" />
<local:ParagraphImageMenuItemViewMode Image="/Menu/Resources/Integration_1.png" Title="Smart Labels" Summary="Intelligently positions the labels to avoid overlapping..." />
<local:ParagraphImageMenuItemViewMode Image="/Menu/Resources/Integration_2.png" Title="Zooming and Scrolling" Summary="The Example demonstrates the built-in zooming and scrolling..." />
<local:ParagraphImageMenuItemViewMode Image="/Menu/Resources/Integration_3.png" Title="Grouping and Aggregation" Summary="RadChart is now able to group and aggregate data..." />
<local:ParagraphImageMenuItemViewMode Image="/Menu/Resources/Integration_4.png" Title="Axis Features" Summary="Telerik Chart control provides a rich API that grants full control..." />
</local:MenuItemViewModel>
<local:MenuItemViewModel Content="Separator" IsSeparator="True" Type="TopLevelSection" />
<local:MenuItemViewModel Content="SecondColumn" Type="TopLevelSection">
<local:MenuItemViewModel Content=" " Type="Title" />
<local:MenuItemViewModel Content="Custom Palette" />
<local:MenuItemViewModel Content="Multiple Y Axis Support" />
<local:MenuItemViewModel Content="Negative Values" />
<local:MenuItemViewModel Content="Live Data" />
<local:MenuItemViewModel Content="Exporting" />
<local:MenuItemViewModel Content="Drill Down Chart" />
<local:MenuItemViewModel Content="Flexible API" />
<local:MenuItemViewModel Content="Meteo Chart" />
<local:MenuItemViewModel Content="Data Binding" />
<local:MenuItemViewModel Content="MVVM Support" />
<local:MenuItemViewModel Content="PointMarks Customization" />
<local:MenuItemViewModel Content="See examples" Type="SpecialLink" />
</local:MenuItemViewModel>
</local:MenuItemViewModel>
</local:MenuViewModel>
<!-- Example layer colors -->
<LinearGradientBrush x:Key="HeaderBackground" EndPoint="0 1">
<GradientStop Offset="0" Color="#868686" />
<GradientStop Offset="1" Color="#0D0D0D" />
</LinearGradientBrush>
<SolidColorBrush x:Key="TitleForeground" Color="#D3D3D3" />
<SolidColorBrush x:Key="SubTitleForeground" Color="#5ABAB6" />
<SolidColorBrush x:Key="ApplicationBackground" Color="#FFE5E5E5" />
<SolidColorBrush x:Key="ApplicationBorderBrush" Color="#FFB5B5B5" />
<!-- Menu colors -->
<LinearGradientBrush x:Key="MenuBackground" EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF666666" Offset="0"/>
<GradientStop Color="#FF919191" Offset="1"/>
</LinearGradientBrush>
<!-- TopLevel MenuItem colors -->
<SolidColorBrush x:Key="MenuDropDownBorder" Color="#8854BBE8" />
<SolidColorBrush x:Key="MenuDropDownFrame" Color="#66333333" />
<SolidColorBrush x:Key="MenuDorpDownInnerBorder" Color="White" />
<SolidColorBrush x:Key="MenuDropDownBackground" Color="#FFF7F7F7" />
<LinearGradientBrush x:Key="MenuItemTopLevelBackground_MouseOver" EndPoint="0 1">
<GradientStop Color="#FF7dccee" Offset="0" />
<GradientStop Color="#FF799fd9" Offset="0.06" />
<GradientStop Color="#FF8ebdea" Offset="0.48" />
<GradientStop Color="#FF348bda" Offset="0.49" />
<GradientStop Color="#FF54bce9" Offset="0.83" />
<GradientStop Color="#FF54bce9" Offset="0.98" />
</LinearGradientBrush>
<!-- TopLevel section -->
<SolidColorBrush x:Key="MenuItemSeparatorDark" Color="#FFE4E4E4" />
<SolidColorBrush x:Key="MenuItemSeparatorLight" Color="White" />
<!-- Title -->
<SolidColorBrush x:Key="MenuItemTitleForeground" Color="#FF0099CC" />
<!-- Paragraph -->
<SolidColorBrush x:Key="MenuItemParagraphForeground" Color="#FF595959" />
<!-- Special Link -->
<SolidColorBrush x:Key="MenuItemSpecialLinkForeground" Color="#FF0066CC" />
<!-- Link MenuItem colors -->
<!-- !! Foreground coloring is hardcoded in the storyboards -->
<ControlTemplate x:Key="MenuItemParagraphControlTemplate" TargetType="telerik:RadMenuItem">
<TextBlock x:Name="TextElement" Text="{Binding Content}" Foreground="{StaticResource MenuItemParagraphForeground}" TextWrapping="Wrap" FontSize="11" />
</ControlTemplate>
<ControlTemplate x:Key="MenuItemTitleControlTemplate" TargetType="telerik:RadMenuItem">
<TextBlock x:Name="TextElement" Text="{Binding Content}" Foreground="{StaticResource MenuItemTitleForeground}" FontSize="16" />
</ControlTemplate>
<ControlTemplate x:Key="MenuItemLinkControlTemplate" TargetType="telerik:RadMenuItem">
<TextBlock x:Name="TextElement" Text="{Binding Content}" TextDecorations="None" Foreground="#FF2C2C2C" FontSize="12">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Unfocused"/>
<VisualState x:Name="Focused">
<Storyboard>
<ColorAnimationUsingKeyFrames Storyboard.TargetName="TextElement" Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)">
<LinearColorKeyFrame KeyTime="00:00:00" Value="#FF0066CC" />
</ColorAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="TextElement" Storyboard.TargetProperty="TextDecorations">
<DiscreteObjectKeyFrame KeyTime="00:00:00" Value="Underline" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</TextBlock>
</ControlTemplate>
<ControlTemplate x:Key="MenuItemSpecialLinkControlTemplate" TargetType="telerik:RadMenuItem">
<TextBlock x:Name="TextElement" TextDecorations="None" Foreground="{StaticResource MenuItemSpecialLinkForeground}" FontSize="11">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Unfocused"/>
<VisualState x:Name="Focused">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="TextElement" Storyboard.TargetProperty="TextDecorations">
<DiscreteObjectKeyFrame KeyTime="00:00:00" Value="Underline" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Run Text="» " />
<Run Text="{Binding Content}" />
</TextBlock>
</ControlTemplate>
<ControlTemplate x:Key="MenuItemTopLevelControlTemplate" TargetType="telerik:RadMenuItem">
<Grid>
<Rectangle x:Name="BackgroundVisual" Fill="{StaticResource MenuItemTopLevelBackground_MouseOver}" Opacity="0" />
<TextBlock x:Name="TextElement" Text="{Binding Content}" TextDecorations="None" Foreground="White" FontWeight="Bold" Margin="20 6 40 6" HorizontalAlignment="Right" VerticalAlignment="Center" FontSize="14" />
<Path x:Name="DropDownArrow" Fill="White" Data="M0,0 L2,0 1,1" Stretch="Uniform" Width="7" Height="5" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="8 0 20 0" />
<Popup x:Name="PART_Popup" HorizontalOffset="-1" VerticalOffset="-1">
<Border Margin="0 1 0 0" BorderBrush="{StaticResource MenuDropDownBorder}" BorderThickness="1" Background="{StaticResource MenuDropDownFrame}" Padding="6">
<Border Background="{StaticResource MenuDropDownBackground}" BorderBrush="{StaticResource MenuDorpDownInnerBorder}" BorderThickness="1">
<ItemsPresenter Margin="8 4" />
</Border>
</Border>
</Popup>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualStateGroup.Transitions>
<VisualTransition GeneratedDuration="0:0:0.2"/>
</VisualStateGroup.Transitions>
<VisualState x:Name="Unfocused" />
<VisualState x:Name="Focused">
<Storyboard>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundVisual" Storyboard.TargetProperty="Opacity">
<LinearDoubleKeyFrame KeyTime="00:00:00.1" Value="1" />
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</Grid>
</ControlTemplate>
<ControlTemplate x:Key="MenuItemTopLevelSectionControlTemplate" TargetType="telerik:RadMenuItem">
<Grid>
<ItemsPresenter />
<Popup x:Name="PART_Popup" HorizontalOffset="-1" VerticalOffset="-1">
<Rectangle />
</Popup>
</Grid>
</ControlTemplate>
<ControlTemplate x:Key="MenuItemTopLevelSectionSeparatorControlTemplate" TargetType="telerik:RadMenuItem">
<Border BorderThickness="1 0 0 0" Background="{StaticResource MenuItemSeparatorLight}" BorderBrush="{StaticResource MenuItemSeparatorDark}" Width="2" Margin="4 32 8 8" />
</ControlTemplate>
<ControlTemplate x:Key="MenuItemGalleryControlTemplate" TargetType="telerik:RadMenuItem">
<Grid>
<ItemsPresenter />
<Popup x:Name="PART_Popup">
<Rectangle />
</Popup>
</Grid>
</ControlTemplate>
<ControlTemplate x:Key="MenuItemImageControlTemplate" TargetType="telerik:RadMenuItem">
<Image Source="{Binding Content}" Cursor="Hand" Stretch="None" HorizontalAlignment="Left" />
</ControlTemplate>
<ControlTemplate x:Key="ParagraphImageMenuItemControlTemplate" TargetType="telerik:RadMenuItem">
<Grid Cursor="Hand">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Image Grid.RowSpan="2" Grid.Column="0" Margin="4" HorizontalAlignment="Left" VerticalAlignment="Top" Stretch="None" Source="{Binding Image}" />
<TextBlock x:Name="TitleElement" Grid.Row="0" Grid.Column="1" Margin="4 4 4 -5" MaxWidth="200" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="13" Text="{Binding Title}" Foreground="Black" />
<TextBlock x:Name="SummaryElement" Grid.Row="1" Grid.Column="1" Margin="4 -5 4 4" MaxWidth="200" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Top" Text="{Binding Summary}" FontSize="11" Foreground="{StaticResource MenuItemParagraphForeground}" />
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Unfocused"/>
<VisualState x:Name="Focused">
<Storyboard>
<ColorAnimationUsingKeyFrames Storyboard.TargetName="TitleElement" Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)">
<LinearColorKeyFrame KeyTime="00:00:00" Value="#FF0066CC" />
</ColorAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="TitleElement" Storyboard.TargetProperty="TextDecorations">
<DiscreteObjectKeyFrame KeyTime="00:00:00" Value="Underline" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</Grid>
</ControlTemplate>
<Style x:Key="MenuStyle" TargetType="telerik:RadMenu">
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="Background" Value="{StaticResource MenuBackground}"/>
<Setter Property="BorderBrush" Value="Black"/>
<Setter Property="BorderThickness" Value="1" />
</Style>
<Style x:Key="MenuItemTopLevelStyle" TargetType="telerik:RadMenuItem">
<Setter Property="Template" Value="{StaticResource MenuItemTopLevelControlTemplate}"/>
<Setter Property="SeparatorTemplateKey" Value="{StaticResource MenuItemTopLevelControlTemplate}"/>
<Setter Property="SubmenuItemTemplateKey" Value="{StaticResource MenuItemTopLevelControlTemplate}"/>
<Setter Property="TopLevelHeaderTemplateKey" Value="{StaticResource MenuItemTopLevelControlTemplate}"/>
<Setter Property="TopLevelItemTemplateKey" Value="{StaticResource MenuItemTopLevelControlTemplate}"/>
<Setter Property="SubmenuHeaderTemplateKey" Value="{StaticResource MenuItemTopLevelControlTemplate}"/>
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="MenuItemTopLevelSectionStyle" TargetType="telerik:RadMenuItem">
<Setter Property="Template" Value="{StaticResource MenuItemTopLevelSectionControlTemplate}"/>
<Setter Property="SeparatorTemplateKey" Value="{StaticResource MenuItemTopLevelSectionSeparatorControlTemplate}"/>
<Setter Property="SubmenuItemTemplateKey" Value="{StaticResource MenuItemTopLevelSectionControlTemplate}"/>
<Setter Property="TopLevelHeaderTemplateKey" Value="{StaticResource MenuItemTopLevelSectionControlTemplate}"/>
<Setter Property="TopLevelItemTemplateKey" Value="{StaticResource MenuItemTopLevelSectionControlTemplate}"/>
<Setter Property="SubmenuHeaderTemplateKey" Value="{StaticResource MenuItemTopLevelSectionControlTemplate}"/>
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<StackPanel Orientation="Vertical" />
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="MenuItemGalleryStyle" TargetType="telerik:RadMenuItem">
<Setter Property="Template" Value="{StaticResource MenuItemGalleryControlTemplate}"/>
<Setter Property="SeparatorTemplateKey" Value="{StaticResource MenuItemGalleryControlTemplate}"/>
<Setter Property="SubmenuItemTemplateKey" Value="{StaticResource MenuItemGalleryControlTemplate}"/>
<Setter Property="TopLevelHeaderTemplateKey" Value="{StaticResource MenuItemGalleryControlTemplate}"/>
<Setter Property="TopLevelItemTemplateKey" Value="{StaticResource MenuItemGalleryControlTemplate}"/>
<Setter Property="SubmenuHeaderTemplateKey" Value="{StaticResource MenuItemGalleryControlTemplate}"/>
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="MenuItemImageStyle" TargetType="telerik:RadMenuItem">
<Setter Property="Template" Value="{StaticResource MenuItemImageControlTemplate}"/>
<Setter Property="SeparatorTemplateKey" Value="{StaticResource MenuItemImageControlTemplate}"/>
<Setter Property="SubmenuItemTemplateKey" Value="{StaticResource MenuItemImageControlTemplate}"/>
<Setter Property="TopLevelHeaderTemplateKey" Value="{StaticResource MenuItemImageControlTemplate}"/>
<Setter Property="TopLevelItemTemplateKey" Value="{StaticResource MenuItemImageControlTemplate}"/>
<Setter Property="SubmenuHeaderTemplateKey" Value="{StaticResource MenuItemImageControlTemplate}"/>
<Setter Property="Margin" Value="4 4 12 4" />
</Style>
<Style x:Key="MenuItemParagraphStyle" TargetType="telerik:RadMenuItem">
<Setter Property="Template" Value="{StaticResource MenuItemParagraphControlTemplate}"/>
<Setter Property="SeparatorTemplateKey" Value="{StaticResource MenuItemParagraphControlTemplate}"/>
<Setter Property="SubmenuItemTemplateKey" Value="{StaticResource MenuItemParagraphControlTemplate}"/>
<Setter Property="TopLevelHeaderTemplateKey" Value="{StaticResource MenuItemParagraphControlTemplate}"/>
<Setter Property="TopLevelItemTemplateKey" Value="{StaticResource MenuItemParagraphControlTemplate}"/>
<Setter Property="SubmenuHeaderTemplateKey" Value="{StaticResource MenuItemParagraphControlTemplate}"/>
<Setter Property="Margin" Value="4" />
<Setter Property="MaxWidth" Value="300" />
<Setter Property="HorizontalAlignment" Value="Left" />
</Style>
<Style x:Key="MenuItemTitleStyle" TargetType="telerik:RadMenuItem">
<Setter Property="Template" Value="{StaticResource MenuItemTitleControlTemplate}"/>
<Setter Property="SeparatorTemplateKey" Value="{StaticResource MenuItemTitleControlTemplate}"/>
<Setter Property="SubmenuItemTemplateKey" Value="{StaticResource MenuItemTitleControlTemplate}"/>
<Setter Property="TopLevelHeaderTemplateKey" Value="{StaticResource MenuItemTitleControlTemplate}"/>
<Setter Property="TopLevelItemTemplateKey" Value="{StaticResource MenuItemTitleControlTemplate}"/>
<Setter Property="SubmenuHeaderTemplateKey" Value="{StaticResource MenuItemTitleControlTemplate}"/>
<Setter Property="Margin" Value="4 3 4 1" />
<Setter Property="MinWidth" Value="150" />
</Style>
<Style x:Key="MenuItemLinkStyle" TargetType="telerik:RadMenuItem">
<Setter Property="Template" Value="{StaticResource MenuItemLinkControlTemplate}" />
<Setter Property="SeparatorTemplateKey" Value="{StaticResource MenuItemLinkControlTemplate}" />
<Setter Property="SubmenuItemTemplateKey" Value="{StaticResource MenuItemLinkControlTemplate}" />
<Setter Property="TopLevelHeaderTemplateKey" Value="{StaticResource MenuItemLinkControlTemplate}" />
<Setter Property="TopLevelItemTemplateKey" Value="{StaticResource MenuItemLinkControlTemplate}" />
<Setter Property="SubmenuHeaderTemplateKey" Value="{StaticResource MenuItemLinkControlTemplate}" />
<Setter Property="Margin" Value="4 3 4 2" />
</Style>
<Style x:Key="MenuItemSpecialLinkStyle" TargetType="telerik:RadMenuItem">
<Setter Property="Template" Value="{StaticResource MenuItemSpecialLinkControlTemplate}" />
<Setter Property="SeparatorTemplateKey" Value="{StaticResource MenuItemSpecialLinkControlTemplate}" />
<Setter Property="SubmenuItemTemplateKey" Value="{StaticResource MenuItemSpecialLinkControlTemplate}" />
<Setter Property="TopLevelHeaderTemplateKey" Value="{StaticResource MenuItemSpecialLinkControlTemplate}" />
<Setter Property="TopLevelItemTemplateKey" Value="{StaticResource MenuItemSpecialLinkControlTemplate}" />
<Setter Property="SubmenuHeaderTemplateKey" Value="{StaticResource MenuItemSpecialLinkControlTemplate}" />
<Setter Property="Margin" Value="4 2 4 6" />
</Style>
<Style x:Key="ParagraphImageMenuItemStyle" TargetType="telerik:RadMenuItem">
<Setter Property="Template" Value="{StaticResource ParagraphImageMenuItemControlTemplate}" />
<Setter Property="SeparatorTemplateKey" Value="{StaticResource ParagraphImageMenuItemControlTemplate}" />
<Setter Property="SubmenuItemTemplateKey" Value="{StaticResource ParagraphImageMenuItemControlTemplate}" />
<Setter Property="TopLevelHeaderTemplateKey" Value="{StaticResource ParagraphImageMenuItemControlTemplate}" />
<Setter Property="TopLevelItemTemplateKey" Value="{StaticResource ParagraphImageMenuItemControlTemplate}" />
<Setter Property="SubmenuHeaderTemplateKey" Value="{StaticResource ParagraphImageMenuItemControlTemplate}" />
<Setter Property="Margin" Value="0 0 0 4" />
</Style>
<local:MenuItemStyleSelector x:Key="MenuItemStyleSelector"
TopLevel="{StaticResource MenuItemTopLevelStyle}"
TopLevelSection="{StaticResource MenuItemTopLevelSectionStyle}"
Title="{StaticResource MenuItemTitleStyle}"
Link="{StaticResource MenuItemLinkStyle}"
SpecialLink="{StaticResource MenuItemSpecialLinkStyle}"
Paragraph="{StaticResource MenuItemParagraphStyle}"
Gallery="{StaticResource MenuItemGalleryStyle}"
Image="{StaticResource MenuItemImageStyle}"
ParagraphImage="{StaticResource ParagraphImageMenuItemStyle}"/>
<telerik:HierarchicalDataTemplate x:Key="MenuItemTemplate" ItemsSource="{Binding}">
<telerik:ContainerBinding.ContainerBindings>
<telerik:ContainerBindingCollection>
<telerik:ContainerBinding PropertyName="Header" Binding="{Binding Content}" />
<telerik:ContainerBinding PropertyName="IsSeparator" Binding="{Binding IsSeparator}" />
<!--
<telerik:ContainerBinding PropertyName="IsChecked" Binding="{Binding IsChecked}" />
<telerik:ContainerBinding PropertyName="IsEnabled" Binding="{Binding IsEnabled}" />
<telerik:ContainerBinding PropertyName="StaysOpenOnClick" Binding="{Binding StaysOpenOnClick}" />
<telerik:ContainerBinding PropertyName="Icon" Binding="{Binding Image}" />
-->
</telerik:ContainerBindingCollection>
</telerik:ContainerBinding.ContainerBindings>
<TextBlock Text="{Binding Content}" />
</telerik:HierarchicalDataTemplate>
</UserControl.Resources>
<Grid Width="700" Height="450" HorizontalAlignment="Center" VerticalAlignment="Center">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid Grid.Row="0" Background="{StaticResource HeaderBackground}" Height="65">
<TextBlock Margin="20 5 0 0" TextOptions.TextHintingMode="Animated" Text="Order Management" FontSize="23" />
<TextBlock Margin="20 6 0 0" TextOptions.TextHintingMode="Animated" Text="Order Management" Foreground="{StaticResource TitleForeground}" FontSize="23" />
<TextBlock Margin="20 36 0 0" TextOptions.TextHintingMode="Animated" Text="Patient's Assessment Order Management" Foreground="{StaticResource SubTitleForeground}" FontSize="13" FontStyle="Italic" />
</Grid>
<telerik:RadMenu Grid.Row="1" Style="{StaticResource MenuStyle}" ItemsSource="{StaticResource MenuItemsSource}" ItemTemplate="{StaticResource MenuItemTemplate}" ItemContainerStyleSelector="{StaticResource MenuItemStyleSelector}" />
<Border Grid.Row="2" BorderThickness="1 0 1 1" BorderBrush="Gray" Background="White" />
</Grid>
</UserControl>
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I am very thankful if you guide me in this regards.
Thanks
I want to know how can we navigate using the Telerik Silverlight Custom Menu Control ?
I also paste the .xaml page code below,
Code :
<UserControl x:Class="OrderManagement.Controls.menu"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:telerikControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
xmlns:local="clr-namespace:OrderManagement.Controls"
mc:Ignorable="d">
<UserControl.Resources>
<!-- Example menu ViewModel -->
<local:MenuViewModel x:Key="MenuItemsSource" >
<local:MenuItemViewModel Content="Patient Management" Type="TopLevel">
<local:MenuItemViewModel Content="FirstColumn" Type="TopLevelSection">
<local:MenuItemViewModel Content="New Patient" Type="Title" />
<local:MenuItemViewModel Content="Home" Type="SpecialLink"/>
<local:MenuItemViewModel Content="Go To Dashboard" Type="SpecialLink" />
</local:MenuItemViewModel>
<local:MenuItemViewModel Content="Separator" IsSeparator="True" Type="TopLevelSection" />
<local:MenuItemViewModel Content="SecondColumn" Type="TopLevelSection">
<local:MenuItemViewModel Content="Exisitng Patient" Type="Title" />
<local:MenuItemViewModel Content="View Patient List" />
<local:MenuItemViewModel Content="Edit Existing Patient" />
<local:MenuItemViewModel Content="All" Type="SpecialLink" />
</local:MenuItemViewModel>
<local:MenuItemViewModel Content="Separator" IsSeparator="True" Type="TopLevelSection" />
<local:MenuItemViewModel Content="ThirdColumn" Type="TopLevelSection">
<local:MenuItemViewModel Content="Patient Management" Type="Title" />
<local:MenuItemViewModel Content="RRO Patient Management is a core module that helps physician to deal with patient." Type="Paragraph" />
<local:MenuItemViewModel Content="Read more" Type="SpecialLink" />
<local:MenuItemViewModel Content="Themes" Type="Title" />
<local:MenuItemViewModel Content="Office, Summer, Vista, Windows7" Type="Paragraph" />
<local:MenuItemViewModel Type="Gallery">
<local:MenuItemViewModel Content="/Menu/Resources/Themes1.png" Type="Image" />
<local:MenuItemViewModel Content="/Menu/Resources/Themes2.png" Type="Image" />
</local:MenuItemViewModel>
<local:MenuItemViewModel Type="Gallery">
<local:MenuItemViewModel Content="/Menu/Resources/Themes3.png" Type="Image" />
<local:MenuItemViewModel Content="/Menu/Resources/Themes4.png" Type="Image" />
</local:MenuItemViewModel>
<local:MenuItemViewModel Content="Read more" Type="SpecialLink" />
</local:MenuItemViewModel>
</local:MenuItemViewModel>
<local:MenuItemViewModel Content="Order Management" Type="TopLevel">
<local:MenuItemViewModel Content="FirstColumn" Type="TopLevelSection">
<local:MenuItemViewModel Content="New Order" Type="Title"/>
<local:MenuItemViewModel Content="Create Order" />
<local:MenuItemViewModel Content="/Menu/Resources/Gallery3D_1.png" Type="Image" />
<local:MenuItemViewModel Content="See 3D charts gallery" Type="SpecialLink" />
</local:MenuItemViewModel>
<local:MenuItemViewModel Content="Separator" IsSeparator="True" Type="TopLevelSection" />
<local:MenuItemViewModel Content="SecondColumn" Type="TopLevelSection">
<local:MenuItemViewModel Content="Existing Order" Type="Title"/>
<local:MenuItemViewModel Content="View Order" />
<local:MenuItemViewModel Content="Go To Dashboard" Type="SpecialLink" />
</local:MenuItemViewModel>
<local:MenuItemViewModel Content="Separator" IsSeparator="True" Type="TopLevelSection" />
<local:MenuItemViewModel Content="ThirdColumn" Type="TopLevelSection">
<local:MenuItemViewModel Content="Order Management" Type="Title" />
<local:MenuItemViewModel Content="This module is responsible t......" Type="Paragraph" />
<local:MenuItemViewModel Content="Read more" Type="SpecialLink" />
<local:MenuItemViewModel Content="See demo" Type="SpecialLink" />
<local:MenuItemViewModel Content="Grouping and Aggregation" Type="Title" />
<local:MenuItemViewModel Content="RadChart is now able to group and aggregate data during data binding, optimizing numerous analyical business scearios." Type="Paragraph" />
<local:MenuItemViewModel Content="Read more" Type="SpecialLink" />
<local:MenuItemViewModel Content="/Menu/Resources/Gallery3D_2.png" Type="Image" />
<local:MenuItemViewModel Content="See demo" Type="SpecialLink" />
</local:MenuItemViewModel>
</local:MenuItemViewModel>
<local:MenuItemViewModel Content="MIS Report" Type="TopLevel">
<local:MenuItemViewModel Content="FirstColumn" Type="TopLevelSection">
<local:MenuItemViewModel Content="Integration Examples" Type="Title" />
<local:ParagraphImageMenuItemViewMode Image="/Menu/Resources/Integration_1.png" Title="Smart Labels" Summary="Intelligently positions the labels to avoid overlapping..." />
<local:ParagraphImageMenuItemViewMode Image="/Menu/Resources/Integration_2.png" Title="Zooming and Scrolling" Summary="The Example demonstrates the built-in zooming and scrolling..." />
<local:ParagraphImageMenuItemViewMode Image="/Menu/Resources/Integration_3.png" Title="Grouping and Aggregation" Summary="RadChart is now able to group and aggregate data..." />
<local:ParagraphImageMenuItemViewMode Image="/Menu/Resources/Integration_4.png" Title="Axis Features" Summary="Telerik Chart control provides a rich API that grants full control..." />
</local:MenuItemViewModel>
<local:MenuItemViewModel Content="Separator" IsSeparator="True" Type="TopLevelSection" />
<local:MenuItemViewModel Content="SecondColumn" Type="TopLevelSection">
<local:MenuItemViewModel Content=" " Type="Title" />
<local:MenuItemViewModel Content="Custom Palette" />
<local:MenuItemViewModel Content="Multiple Y Axis Support" />
<local:MenuItemViewModel Content="Negative Values" />
<local:MenuItemViewModel Content="Live Data" />
<local:MenuItemViewModel Content="Exporting" />
<local:MenuItemViewModel Content="Drill Down Chart" />
<local:MenuItemViewModel Content="Flexible API" />
<local:MenuItemViewModel Content="Meteo Chart" />
<local:MenuItemViewModel Content="Data Binding" />
<local:MenuItemViewModel Content="MVVM Support" />
<local:MenuItemViewModel Content="PointMarks Customization" />
<local:MenuItemViewModel Content="See examples" Type="SpecialLink" />
</local:MenuItemViewModel>
</local:MenuItemViewModel>
</local:MenuViewModel>
<!-- Example layer colors -->
<LinearGradientBrush x:Key="HeaderBackground" EndPoint="0 1">
<GradientStop Offset="0" Color="#868686" />
<GradientStop Offset="1" Color="#0D0D0D" />
</LinearGradientBrush>
<SolidColorBrush x:Key="TitleForeground" Color="#D3D3D3" />
<SolidColorBrush x:Key="SubTitleForeground" Color="#5ABAB6" />
<SolidColorBrush x:Key="ApplicationBackground" Color="#FFE5E5E5" />
<SolidColorBrush x:Key="ApplicationBorderBrush" Color="#FFB5B5B5" />
<!-- Menu colors -->
<LinearGradientBrush x:Key="MenuBackground" EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF666666" Offset="0"/>
<GradientStop Color="#FF919191" Offset="1"/>
</LinearGradientBrush>
<!-- TopLevel MenuItem colors -->
<SolidColorBrush x:Key="MenuDropDownBorder" Color="#8854BBE8" />
<SolidColorBrush x:Key="MenuDropDownFrame" Color="#66333333" />
<SolidColorBrush x:Key="MenuDorpDownInnerBorder" Color="White" />
<SolidColorBrush x:Key="MenuDropDownBackground" Color="#FFF7F7F7" />
<LinearGradientBrush x:Key="MenuItemTopLevelBackground_MouseOver" EndPoint="0 1">
<GradientStop Color="#FF7dccee" Offset="0" />
<GradientStop Color="#FF799fd9" Offset="0.06" />
<GradientStop Color="#FF8ebdea" Offset="0.48" />
<GradientStop Color="#FF348bda" Offset="0.49" />
<GradientStop Color="#FF54bce9" Offset="0.83" />
<GradientStop Color="#FF54bce9" Offset="0.98" />
</LinearGradientBrush>
<!-- TopLevel section -->
<SolidColorBrush x:Key="MenuItemSeparatorDark" Color="#FFE4E4E4" />
<SolidColorBrush x:Key="MenuItemSeparatorLight" Color="White" />
<!-- Title -->
<SolidColorBrush x:Key="MenuItemTitleForeground" Color="#FF0099CC" />
<!-- Paragraph -->
<SolidColorBrush x:Key="MenuItemParagraphForeground" Color="#FF595959" />
<!-- Special Link -->
<SolidColorBrush x:Key="MenuItemSpecialLinkForeground" Color="#FF0066CC" />
<!-- Link MenuItem colors -->
<!-- !! Foreground coloring is hardcoded in the storyboards -->
<ControlTemplate x:Key="MenuItemParagraphControlTemplate" TargetType="telerik:RadMenuItem">
<TextBlock x:Name="TextElement" Text="{Binding Content}" Foreground="{StaticResource MenuItemParagraphForeground}" TextWrapping="Wrap" FontSize="11" />
</ControlTemplate>
<ControlTemplate x:Key="MenuItemTitleControlTemplate" TargetType="telerik:RadMenuItem">
<TextBlock x:Name="TextElement" Text="{Binding Content}" Foreground="{StaticResource MenuItemTitleForeground}" FontSize="16" />
</ControlTemplate>
<ControlTemplate x:Key="MenuItemLinkControlTemplate" TargetType="telerik:RadMenuItem">
<TextBlock x:Name="TextElement" Text="{Binding Content}" TextDecorations="None" Foreground="#FF2C2C2C" FontSize="12">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Unfocused"/>
<VisualState x:Name="Focused">
<Storyboard>
<ColorAnimationUsingKeyFrames Storyboard.TargetName="TextElement" Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)">
<LinearColorKeyFrame KeyTime="00:00:00" Value="#FF0066CC" />
</ColorAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="TextElement" Storyboard.TargetProperty="TextDecorations">
<DiscreteObjectKeyFrame KeyTime="00:00:00" Value="Underline" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</TextBlock>
</ControlTemplate>
<ControlTemplate x:Key="MenuItemSpecialLinkControlTemplate" TargetType="telerik:RadMenuItem">
<TextBlock x:Name="TextElement" TextDecorations="None" Foreground="{StaticResource MenuItemSpecialLinkForeground}" FontSize="11">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Unfocused"/>
<VisualState x:Name="Focused">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="TextElement" Storyboard.TargetProperty="TextDecorations">
<DiscreteObjectKeyFrame KeyTime="00:00:00" Value="Underline" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Run Text="» " />
<Run Text="{Binding Content}" />
</TextBlock>
</ControlTemplate>
<ControlTemplate x:Key="MenuItemTopLevelControlTemplate" TargetType="telerik:RadMenuItem">
<Grid>
<Rectangle x:Name="BackgroundVisual" Fill="{StaticResource MenuItemTopLevelBackground_MouseOver}" Opacity="0" />
<TextBlock x:Name="TextElement" Text="{Binding Content}" TextDecorations="None" Foreground="White" FontWeight="Bold" Margin="20 6 40 6" HorizontalAlignment="Right" VerticalAlignment="Center" FontSize="14" />
<Path x:Name="DropDownArrow" Fill="White" Data="M0,0 L2,0 1,1" Stretch="Uniform" Width="7" Height="5" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="8 0 20 0" />
<Popup x:Name="PART_Popup" HorizontalOffset="-1" VerticalOffset="-1">
<Border Margin="0 1 0 0" BorderBrush="{StaticResource MenuDropDownBorder}" BorderThickness="1" Background="{StaticResource MenuDropDownFrame}" Padding="6">
<Border Background="{StaticResource MenuDropDownBackground}" BorderBrush="{StaticResource MenuDorpDownInnerBorder}" BorderThickness="1">
<ItemsPresenter Margin="8 4" />
</Border>
</Border>
</Popup>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualStateGroup.Transitions>
<VisualTransition GeneratedDuration="0:0:0.2"/>
</VisualStateGroup.Transitions>
<VisualState x:Name="Unfocused" />
<VisualState x:Name="Focused">
<Storyboard>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundVisual" Storyboard.TargetProperty="Opacity">
<LinearDoubleKeyFrame KeyTime="00:00:00.1" Value="1" />
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</Grid>
</ControlTemplate>
<ControlTemplate x:Key="MenuItemTopLevelSectionControlTemplate" TargetType="telerik:RadMenuItem">
<Grid>
<ItemsPresenter />
<Popup x:Name="PART_Popup" HorizontalOffset="-1" VerticalOffset="-1">
<Rectangle />
</Popup>
</Grid>
</ControlTemplate>
<ControlTemplate x:Key="MenuItemTopLevelSectionSeparatorControlTemplate" TargetType="telerik:RadMenuItem">
<Border BorderThickness="1 0 0 0" Background="{StaticResource MenuItemSeparatorLight}" BorderBrush="{StaticResource MenuItemSeparatorDark}" Width="2" Margin="4 32 8 8" />
</ControlTemplate>
<ControlTemplate x:Key="MenuItemGalleryControlTemplate" TargetType="telerik:RadMenuItem">
<Grid>
<ItemsPresenter />
<Popup x:Name="PART_Popup">
<Rectangle />
</Popup>
</Grid>
</ControlTemplate>
<ControlTemplate x:Key="MenuItemImageControlTemplate" TargetType="telerik:RadMenuItem">
<Image Source="{Binding Content}" Cursor="Hand" Stretch="None" HorizontalAlignment="Left" />
</ControlTemplate>
<ControlTemplate x:Key="ParagraphImageMenuItemControlTemplate" TargetType="telerik:RadMenuItem">
<Grid Cursor="Hand">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Image Grid.RowSpan="2" Grid.Column="0" Margin="4" HorizontalAlignment="Left" VerticalAlignment="Top" Stretch="None" Source="{Binding Image}" />
<TextBlock x:Name="TitleElement" Grid.Row="0" Grid.Column="1" Margin="4 4 4 -5" MaxWidth="200" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="13" Text="{Binding Title}" Foreground="Black" />
<TextBlock x:Name="SummaryElement" Grid.Row="1" Grid.Column="1" Margin="4 -5 4 4" MaxWidth="200" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Top" Text="{Binding Summary}" FontSize="11" Foreground="{StaticResource MenuItemParagraphForeground}" />
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Unfocused"/>
<VisualState x:Name="Focused">
<Storyboard>
<ColorAnimationUsingKeyFrames Storyboard.TargetName="TitleElement" Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)">
<LinearColorKeyFrame KeyTime="00:00:00" Value="#FF0066CC" />
</ColorAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="TitleElement" Storyboard.TargetProperty="TextDecorations">
<DiscreteObjectKeyFrame KeyTime="00:00:00" Value="Underline" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</Grid>
</ControlTemplate>
<Style x:Key="MenuStyle" TargetType="telerik:RadMenu">
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="Background" Value="{StaticResource MenuBackground}"/>
<Setter Property="BorderBrush" Value="Black"/>
<Setter Property="BorderThickness" Value="1" />
</Style>
<Style x:Key="MenuItemTopLevelStyle" TargetType="telerik:RadMenuItem">
<Setter Property="Template" Value="{StaticResource MenuItemTopLevelControlTemplate}"/>
<Setter Property="SeparatorTemplateKey" Value="{StaticResource MenuItemTopLevelControlTemplate}"/>
<Setter Property="SubmenuItemTemplateKey" Value="{StaticResource MenuItemTopLevelControlTemplate}"/>
<Setter Property="TopLevelHeaderTemplateKey" Value="{StaticResource MenuItemTopLevelControlTemplate}"/>
<Setter Property="TopLevelItemTemplateKey" Value="{StaticResource MenuItemTopLevelControlTemplate}"/>
<Setter Property="SubmenuHeaderTemplateKey" Value="{StaticResource MenuItemTopLevelControlTemplate}"/>
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="MenuItemTopLevelSectionStyle" TargetType="telerik:RadMenuItem">
<Setter Property="Template" Value="{StaticResource MenuItemTopLevelSectionControlTemplate}"/>
<Setter Property="SeparatorTemplateKey" Value="{StaticResource MenuItemTopLevelSectionSeparatorControlTemplate}"/>
<Setter Property="SubmenuItemTemplateKey" Value="{StaticResource MenuItemTopLevelSectionControlTemplate}"/>
<Setter Property="TopLevelHeaderTemplateKey" Value="{StaticResource MenuItemTopLevelSectionControlTemplate}"/>
<Setter Property="TopLevelItemTemplateKey" Value="{StaticResource MenuItemTopLevelSectionControlTemplate}"/>
<Setter Property="SubmenuHeaderTemplateKey" Value="{StaticResource MenuItemTopLevelSectionControlTemplate}"/>
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<StackPanel Orientation="Vertical" />
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="MenuItemGalleryStyle" TargetType="telerik:RadMenuItem">
<Setter Property="Template" Value="{StaticResource MenuItemGalleryControlTemplate}"/>
<Setter Property="SeparatorTemplateKey" Value="{StaticResource MenuItemGalleryControlTemplate}"/>
<Setter Property="SubmenuItemTemplateKey" Value="{StaticResource MenuItemGalleryControlTemplate}"/>
<Setter Property="TopLevelHeaderTemplateKey" Value="{StaticResource MenuItemGalleryControlTemplate}"/>
<Setter Property="TopLevelItemTemplateKey" Value="{StaticResource MenuItemGalleryControlTemplate}"/>
<Setter Property="SubmenuHeaderTemplateKey" Value="{StaticResource MenuItemGalleryControlTemplate}"/>
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="MenuItemImageStyle" TargetType="telerik:RadMenuItem">
<Setter Property="Template" Value="{StaticResource MenuItemImageControlTemplate}"/>
<Setter Property="SeparatorTemplateKey" Value="{StaticResource MenuItemImageControlTemplate}"/>
<Setter Property="SubmenuItemTemplateKey" Value="{StaticResource MenuItemImageControlTemplate}"/>
<Setter Property="TopLevelHeaderTemplateKey" Value="{StaticResource MenuItemImageControlTemplate}"/>
<Setter Property="TopLevelItemTemplateKey" Value="{StaticResource MenuItemImageControlTemplate}"/>
<Setter Property="SubmenuHeaderTemplateKey" Value="{StaticResource MenuItemImageControlTemplate}"/>
<Setter Property="Margin" Value="4 4 12 4" />
</Style>
<Style x:Key="MenuItemParagraphStyle" TargetType="telerik:RadMenuItem">
<Setter Property="Template" Value="{StaticResource MenuItemParagraphControlTemplate}"/>
<Setter Property="SeparatorTemplateKey" Value="{StaticResource MenuItemParagraphControlTemplate}"/>
<Setter Property="SubmenuItemTemplateKey" Value="{StaticResource MenuItemParagraphControlTemplate}"/>
<Setter Property="TopLevelHeaderTemplateKey" Value="{StaticResource MenuItemParagraphControlTemplate}"/>
<Setter Property="TopLevelItemTemplateKey" Value="{StaticResource MenuItemParagraphControlTemplate}"/>
<Setter Property="SubmenuHeaderTemplateKey" Value="{StaticResource MenuItemParagraphControlTemplate}"/>
<Setter Property="Margin" Value="4" />
<Setter Property="MaxWidth" Value="300" />
<Setter Property="HorizontalAlignment" Value="Left" />
</Style>
<Style x:Key="MenuItemTitleStyle" TargetType="telerik:RadMenuItem">
<Setter Property="Template" Value="{StaticResource MenuItemTitleControlTemplate}"/>
<Setter Property="SeparatorTemplateKey" Value="{StaticResource MenuItemTitleControlTemplate}"/>
<Setter Property="SubmenuItemTemplateKey" Value="{StaticResource MenuItemTitleControlTemplate}"/>
<Setter Property="TopLevelHeaderTemplateKey" Value="{StaticResource MenuItemTitleControlTemplate}"/>
<Setter Property="TopLevelItemTemplateKey" Value="{StaticResource MenuItemTitleControlTemplate}"/>
<Setter Property="SubmenuHeaderTemplateKey" Value="{StaticResource MenuItemTitleControlTemplate}"/>
<Setter Property="Margin" Value="4 3 4 1" />
<Setter Property="MinWidth" Value="150" />
</Style>
<Style x:Key="MenuItemLinkStyle" TargetType="telerik:RadMenuItem">
<Setter Property="Template" Value="{StaticResource MenuItemLinkControlTemplate}" />
<Setter Property="SeparatorTemplateKey" Value="{StaticResource MenuItemLinkControlTemplate}" />
<Setter Property="SubmenuItemTemplateKey" Value="{StaticResource MenuItemLinkControlTemplate}" />
<Setter Property="TopLevelHeaderTemplateKey" Value="{StaticResource MenuItemLinkControlTemplate}" />
<Setter Property="TopLevelItemTemplateKey" Value="{StaticResource MenuItemLinkControlTemplate}" />
<Setter Property="SubmenuHeaderTemplateKey" Value="{StaticResource MenuItemLinkControlTemplate}" />
<Setter Property="Margin" Value="4 3 4 2" />
</Style>
<Style x:Key="MenuItemSpecialLinkStyle" TargetType="telerik:RadMenuItem">
<Setter Property="Template" Value="{StaticResource MenuItemSpecialLinkControlTemplate}" />
<Setter Property="SeparatorTemplateKey" Value="{StaticResource MenuItemSpecialLinkControlTemplate}" />
<Setter Property="SubmenuItemTemplateKey" Value="{StaticResource MenuItemSpecialLinkControlTemplate}" />
<Setter Property="TopLevelHeaderTemplateKey" Value="{StaticResource MenuItemSpecialLinkControlTemplate}" />
<Setter Property="TopLevelItemTemplateKey" Value="{StaticResource MenuItemSpecialLinkControlTemplate}" />
<Setter Property="SubmenuHeaderTemplateKey" Value="{StaticResource MenuItemSpecialLinkControlTemplate}" />
<Setter Property="Margin" Value="4 2 4 6" />
</Style>
<Style x:Key="ParagraphImageMenuItemStyle" TargetType="telerik:RadMenuItem">
<Setter Property="Template" Value="{StaticResource ParagraphImageMenuItemControlTemplate}" />
<Setter Property="SeparatorTemplateKey" Value="{StaticResource ParagraphImageMenuItemControlTemplate}" />
<Setter Property="SubmenuItemTemplateKey" Value="{StaticResource ParagraphImageMenuItemControlTemplate}" />
<Setter Property="TopLevelHeaderTemplateKey" Value="{StaticResource ParagraphImageMenuItemControlTemplate}" />
<Setter Property="TopLevelItemTemplateKey" Value="{StaticResource ParagraphImageMenuItemControlTemplate}" />
<Setter Property="SubmenuHeaderTemplateKey" Value="{StaticResource ParagraphImageMenuItemControlTemplate}" />
<Setter Property="Margin" Value="0 0 0 4" />
</Style>
<local:MenuItemStyleSelector x:Key="MenuItemStyleSelector"
TopLevel="{StaticResource MenuItemTopLevelStyle}"
TopLevelSection="{StaticResource MenuItemTopLevelSectionStyle}"
Title="{StaticResource MenuItemTitleStyle}"
Link="{StaticResource MenuItemLinkStyle}"
SpecialLink="{StaticResource MenuItemSpecialLinkStyle}"
Paragraph="{StaticResource MenuItemParagraphStyle}"
Gallery="{StaticResource MenuItemGalleryStyle}"
Image="{StaticResource MenuItemImageStyle}"
ParagraphImage="{StaticResource ParagraphImageMenuItemStyle}"/>
<telerik:HierarchicalDataTemplate x:Key="MenuItemTemplate" ItemsSource="{Binding}">
<telerik:ContainerBinding.ContainerBindings>
<telerik:ContainerBindingCollection>
<telerik:ContainerBinding PropertyName="Header" Binding="{Binding Content}" />
<telerik:ContainerBinding PropertyName="IsSeparator" Binding="{Binding IsSeparator}" />
<!--
<telerik:ContainerBinding PropertyName="IsChecked" Binding="{Binding IsChecked}" />
<telerik:ContainerBinding PropertyName="IsEnabled" Binding="{Binding IsEnabled}" />
<telerik:ContainerBinding PropertyName="StaysOpenOnClick" Binding="{Binding StaysOpenOnClick}" />
<telerik:ContainerBinding PropertyName="Icon" Binding="{Binding Image}" />
-->
</telerik:ContainerBindingCollection>
</telerik:ContainerBinding.ContainerBindings>
<TextBlock Text="{Binding Content}" />
</telerik:HierarchicalDataTemplate>
</UserControl.Resources>
<Grid Width="700" Height="450" HorizontalAlignment="Center" VerticalAlignment="Center">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid Grid.Row="0" Background="{StaticResource HeaderBackground}" Height="65">
<TextBlock Margin="20 5 0 0" TextOptions.TextHintingMode="Animated" Text="Order Management" FontSize="23" />
<TextBlock Margin="20 6 0 0" TextOptions.TextHintingMode="Animated" Text="Order Management" Foreground="{StaticResource TitleForeground}" FontSize="23" />
<TextBlock Margin="20 36 0 0" TextOptions.TextHintingMode="Animated" Text="Patient's Assessment Order Management" Foreground="{StaticResource SubTitleForeground}" FontSize="13" FontStyle="Italic" />
</Grid>
<telerik:RadMenu Grid.Row="1" Style="{StaticResource MenuStyle}" ItemsSource="{StaticResource MenuItemsSource}" ItemTemplate="{StaticResource MenuItemTemplate}" ItemContainerStyleSelector="{StaticResource MenuItemStyleSelector}" />
<Border Grid.Row="2" BorderThickness="1 0 1 1" BorderBrush="Gray" Background="White" />
</Grid>
</UserControl>
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I am very thankful if you guide me in this regards.
Thanks