<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
		xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows">

    <!-- RadPanelBarItem Top Level Control Template -->
    <ControlTemplate TargetType="telerik:RadPanelBarItem" x:Name="PanelBarItemTopLevelTemplate">

        <Grid x:Name="RootElement">

            <Grid.Resources>

                <LinearGradientBrush x:Name="ItemBackground"
                                                 EndPoint="0.5,1"
                                                 StartPoint="0.5,0">
                    <GradientStop Color="#FFDDE1EC"/>
                    <GradientStop Color="#FFD1DAEB" Offset="1"/>
                    <GradientStop Color="#FFB1C0D7" Offset="0.504"/>
                    <GradientStop Color="#FF9EADCA" Offset="0.531"/>
                </LinearGradientBrush>

                <LinearGradientBrush x:Name="HeaderBackground"
                                                 EndPoint="0.5,1"
                                                 StartPoint="0.5,0">
                    <GradientStop Color="#FFDDE1EC"/>
                    <GradientStop Color="#FFD1DAEB" Offset="1"/>
                    <GradientStop Color="#FFB1C0D7" Offset="0.504"/>
                    <GradientStop Color="#FF9EADCA" Offset="0.531"/>
                </LinearGradientBrush>

            </Grid.Resources>

            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>

            <vsm:VisualStateManager.VisualStateGroups>

                <vsm:VisualStateGroup x:Name="CommonStates">
                    <vsm:VisualState x:Name="Normal">
                        <Storyboard/>
                    </vsm:VisualState>
                    <vsm:VisualState x:Name="Disabled">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisual" Storyboard.TargetProperty="Visibility" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </vsm:VisualState>
                    <vsm:VisualState x:Name="MouseOver">
                        <Storyboard>
                            <DoubleAnimation
											Storyboard.TargetProperty="Opacity"
											Storyboard.TargetName="MouseOverVisual"
											To="0.5" Duration="0:0:0.2"
										 />
                        </Storyboard>
                    </vsm:VisualState>
                    <vsm:VisualState x:Name="MouseOut">
                        <Storyboard>
                            <DoubleAnimation
											Storyboard.TargetProperty="Opacity"
											Storyboard.TargetName="MouseOverVisual"
											To="0.0" Duration="0:0:0.2"
										 />
                        </Storyboard>
                    </vsm:VisualState>
                </vsm:VisualStateGroup>
                <vsm:VisualStateGroup x:Name="SelectionStates">
                    <vsm:VisualState x:Name="Unselected">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectionVisual" Storyboard.TargetProperty="Visibility" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </vsm:VisualState>
                    <vsm:VisualState x:Name="Selected">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectionVisual" Storyboard.TargetProperty="Visibility" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </vsm:VisualState>
                </vsm:VisualStateGroup>
                <vsm:VisualStateGroup x:Name="ExpandStates">
                    <vsm:VisualState x:Name="Expanded">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ItemsContainer" Storyboard.TargetProperty="Visibility" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimation
											Storyboard.TargetProperty="Opacity"
											Storyboard.TargetName="ExpandedVisual"
											To="0.5" Duration="0:0:0.2"
										 />
                            <DoubleAnimation Storyboard.TargetName="ItemsContainer"
											 Storyboard.TargetProperty="Opacity"
											 From="0.0" To="1.0" Duration="0:0:0.2" />
                        </Storyboard>
                    </vsm:VisualState>
                    <vsm:VisualState x:Name="Collapsed">
                        <Storyboard>
                        </Storyboard>
                    </vsm:VisualState>
                </vsm:VisualStateGroup>
                <vsm:VisualStateGroup x:Name="FocusStates">
                    <vsm:VisualState x:Name="Focused">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Visibility" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </vsm:VisualState>
                    <vsm:VisualState x:Name="Unfocused">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Visibility" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </vsm:VisualState>
                </vsm:VisualStateGroup>

            </vsm:VisualStateManager.VisualStateGroups>

            <Border BorderBrush="#FFFFFFFF" BorderThickness="0,1,0,0">
                <Border BorderBrush="#FFCBCDCC" BorderThickness="0,0,0,1">

                    <Grid x:Name="HeaderRow" Background="Transparent">

                        <Grid.ColumnDefinitions>
                            <!-- indent -->
                            <ColumnDefinition Width="Auto"/>

                            <!-- collapse/expand -->
                            <ColumnDefinition Width="Auto"/>

                            <!-- left image -->
                            <ColumnDefinition Width="Auto"/>

                            <!-- selection, text, edit element -->
                            <ColumnDefinition Width="*" />

                            <!-- empty -->
                            <ColumnDefinition Width="Auto" />

                        </Grid.ColumnDefinitions>

                        <!-- Hover -->
                        <Rectangle Grid.Column="0"
                                       Grid.ColumnSpan="5"
                                       x:Name="MouseOverVisual"
                                       RadiusX="2"
                                       RadiusY="2"
                                       Opacity="0">
                            <Rectangle.Fill>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FFE7F4F7"/>
                                    <GradientStop Color="#FFBDF0FF" Offset="1"/>
                                    <GradientStop Color="#FFC4ECFF" Offset="0.504"/>
                                    <GradientStop Color="#FFADD8FD" Offset="0.513"/>
                                </LinearGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>

                        <!-- Expanded Visual -->
                        <Rectangle Grid.Column="0"
                                       Grid.ColumnSpan="5"
                                       x:Name="ExpandedVisual"
                                       RadiusX="2"
                                       RadiusY="2"
                                       Opacity="0">
                            <Rectangle.Fill>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FFE7F4F7"/>
                                    <GradientStop Color="#FFBDF0FF" Offset="1"/>
                                    <GradientStop Color="#FFC4ECFF" Offset="0.504"/>
                                    <GradientStop Color="#FFADD8FD" Offset="0.513"/>
                                </LinearGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>

                        <!-- Selection -->
                        <Rectangle Grid.Column="0"
                                       Grid.ColumnSpan="5"
                                       x:Name="SelectionVisual"
                                       RadiusX="2"
                                       RadiusY="2"
                                       Visibility="Collapsed">
                            <Rectangle.Fill>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FFD7F6FD"/>
                                    <GradientStop Color="#FFADEBF8" Offset="1"/>
                                    <GradientStop Color="#FF99CDE5" Offset="0.504"/>
                                    <GradientStop Color="#FF78A9D4" Offset="0.504"/>
                                </LinearGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>

                        <ContentControl x:Name="Header"
                                        Content="{TemplateBinding Header}"
                                        Grid.Column="0"
                                        FontSize="12"
                                        Foreground="{TemplateBinding Foreground}"
								        HorizontalAlignment="Left" 
								        VerticalAlignment="Center"
								        Padding="{TemplateBinding Padding}" />


                        <!-- Disabled -->
                        <Rectangle x:Name="DisabledVisual"
                                       Grid.Column="0"
                                       Grid.ColumnSpan="5"
                                       Fill="White"
                                       Opacity="0.7"
                                       IsHitTestVisible="true" 
                                       Visibility="Collapsed"/>

                        <!-- Focus -->
                        <Rectangle x:Name="FocusVisual"
							           Visibility="Collapsed"
							           Grid.Column="0"
							           Grid.ColumnSpan="5"
							           Stroke="Black"
							           RadiusX="2"
							           RadiusY="2"
							           StrokeDashArray="1,2" 
							           IsHitTestVisible="False"/>

                    </Grid>

                </Border>
            </Border>

            <Grid Grid.Row="1">
                <ScrollViewer IsTabStop="False"
                              BorderThickness="0"
                              Visibility="Collapsed"
                              x:Name="ItemsContainer"
                              Background="{TemplateBinding Background}"
                              HorizontalScrollBarVisibility="Auto"
                              VerticalScrollBarVisibility="Auto">

                    <ItemsPresenter />

                </ScrollViewer>
            </Grid>

        </Grid>

    </ControlTemplate>

    <!-- RadPanelBarItem Second Level Control Template -->
    <ControlTemplate TargetType="telerik:RadPanelBarItem" x:Name="PanelBarItemSecondLevelTemplate">

        <Grid x:Name="RootElement">

            <Grid.Resources>

                <LinearGradientBrush EndPoint="0.5,1" x:Name="ItemBackground" StartPoint="0.5,0">
                    <GradientStop Color="#FFE7ECF0"/>
                    <GradientStop Color="#FFFEFEFE" Offset="1"/>
                </LinearGradientBrush>

                <LinearGradientBrush EndPoint="0.5,1" x:Name="HeaderBackground" StartPoint="0.5,0">
                    <GradientStop Color="#FFE7ECF0"/>
                    <GradientStop Color="#FFFEFEFE" Offset="1"/>
                </LinearGradientBrush>

            </Grid.Resources>

            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>

            <vsm:VisualStateManager.VisualStateGroups>

                <vsm:VisualStateGroup x:Name="CommonStates">
                    <vsm:VisualState x:Name="Normal">
                        <Storyboard/>
                    </vsm:VisualState>
                    <vsm:VisualState x:Name="Disabled">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisual" Storyboard.TargetProperty="Visibility" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </vsm:VisualState>
                    <vsm:VisualState x:Name="MouseOver">
                        <Storyboard>
                            <DoubleAnimation
											Storyboard.TargetProperty="Opacity"
											Storyboard.TargetName="MouseOverVisual"
											To="1.0" Duration="0:0:0.2"
										 />
                        </Storyboard>
                    </vsm:VisualState>
                    <vsm:VisualState x:Name="MouseOut">
                        <Storyboard>
                            <DoubleAnimation
											Storyboard.TargetProperty="Opacity"
											Storyboard.TargetName="MouseOverVisual"
											To="0.0" Duration="0:0:0.2"
										 />
                        </Storyboard>
                    </vsm:VisualState>
                </vsm:VisualStateGroup>
                <vsm:VisualStateGroup x:Name="SelectionStates">
                    <vsm:VisualState x:Name="Unselected">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectionVisual" Storyboard.TargetProperty="Visibility" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </vsm:VisualState>
                    <vsm:VisualState x:Name="Selected">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectionVisual" Storyboard.TargetProperty="Visibility" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </vsm:VisualState>
                </vsm:VisualStateGroup>
                <vsm:VisualStateGroup x:Name="ExpandStates">
                    <vsm:VisualState x:Name="Expanded">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ItemsContainer" Storyboard.TargetProperty="Visibility" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimation
											Storyboard.TargetProperty="Opacity"
											Storyboard.TargetName="ExpandedVisual"
											To="0.5" Duration="0:0:0.2"
										 />
                            <DoubleAnimation Storyboard.TargetName="ItemsContainer"
											 Storyboard.TargetProperty="Opacity"
											 From="0.0" To="1.0" Duration="0:0:0.2" />
                        </Storyboard>
                    </vsm:VisualState>
                    <vsm:VisualState x:Name="Collapsed">
                        <Storyboard>
                        </Storyboard>
                    </vsm:VisualState>
                </vsm:VisualStateGroup>
                <vsm:VisualStateGroup x:Name="FocusStates">
                    <vsm:VisualState x:Name="Focused">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Visibility" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </vsm:VisualState>
                    <vsm:VisualState x:Name="Unfocused">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Visibility" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </vsm:VisualState>
                </vsm:VisualStateGroup>

            </vsm:VisualStateManager.VisualStateGroups>

            <Border BorderBrush="#FFFFFFFF" BorderThickness="0,1,0,0">
                <Border BorderBrush="#FFCBCDCC" BorderThickness="0,0,0,1">

                    <Grid x:Name="HeaderRow" Background="Transparent">

                        <Grid.ColumnDefinitions>
                            <!-- indent -->
                            <ColumnDefinition Width="Auto"/>

                            <!-- collapse/expand -->
                            <ColumnDefinition Width="Auto"/>

                            <!-- left image -->
                            <ColumnDefinition Width="Auto"/>

                            <!-- selection, text, edit element -->
                            <ColumnDefinition Width="*" />

                            <!-- empty -->
                            <ColumnDefinition Width="Auto" />

                        </Grid.ColumnDefinitions>

                        <!-- Hover -->
                        <Rectangle Grid.Column="0"
                                       Grid.ColumnSpan="5"
                                       x:Name="MouseOverVisual"
                                       RadiusX="2"
                                       RadiusY="2"
                                       Opacity="0">

                            <Rectangle.Fill>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FFC7D5F0"/>
                                    <GradientStop Color="#FFE0F4FB" Offset="1"/>
                                </LinearGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>

                        <!-- Expanded Visual -->
                        <Rectangle Grid.Column="0"
                                       Grid.ColumnSpan="5"
                                       x:Name="ExpandedVisual"
                                       RadiusX="2"
                                       RadiusY="2"
                                       Opacity="0">
                            <Rectangle.Fill>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FFE7F4F7"/>
                                    <GradientStop Color="#FFBDF0FF" Offset="1"/>
                                    <GradientStop Color="#FFC4ECFF" Offset="0.504"/>
                                    <GradientStop Color="#FFADD8FD" Offset="0.513"/>
                                </LinearGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>

                        <!-- Selection -->
                        <Rectangle Grid.Column="0"
                                       Grid.ColumnSpan="5"
                                       x:Name="SelectionVisual"
                                       RadiusX="2"
                                       RadiusY="2"
                                       Visibility="Collapsed">
                            <Rectangle.Fill>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FFC7D5F0"/>
                                    <GradientStop Color="#FFE0F4FB" Offset="1"/>
                                </LinearGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>

                        <!-- Header -->
                        <ContentControl x:Name="Header"
                                        Content="{TemplateBinding Header}"
                                        Grid.Column="0"
                                        FontSize="12"
                                        Foreground="{TemplateBinding Foreground}"
								        HorizontalAlignment="Left" 
								        VerticalAlignment="Center"
								        Padding="20,5,0,5" />


                        <!-- Disabled -->
                        <Rectangle x:Name="DisabledVisual"
                                       Grid.Column="0"
                                       Grid.ColumnSpan="5"
                                       Fill="White"
                                       Opacity="0.7"
                                       IsHitTestVisible="true" 
                                       Visibility="Collapsed"/>

                        <!-- Focus -->
                        <Rectangle x:Name="FocusVisual"
							           Visibility="Collapsed"
							           Grid.Column="0"
							           Grid.ColumnSpan="5"
							           Stroke="Black"
							           RadiusX="2"
							           RadiusY="2"
							           StrokeDashArray="1,2" 
							           IsHitTestVisible="False"/>

                    </Grid>

                </Border>
            </Border>

            <!-- Content -->
            <Grid Grid.Row="1">
                <ScrollViewer IsTabStop="False"
                              BorderThickness="0"
                              Visibility="Collapsed"
                              x:Name="ItemsContainer"
                              Background="{TemplateBinding Background}"
                              HorizontalScrollBarVisibility="Auto"
                              VerticalScrollBarVisibility="Auto">

                    <ItemsPresenter />

                </ScrollViewer>
            </Grid>

        </Grid>

    </ControlTemplate>

    <Style TargetType="telerik:RadPanelBarItem">
        <Setter Property="BorderBrush" Value="Gray" />
        <Setter Property="BorderThickness" Value="0,0,0,1" />
        <Setter Property="IsEnabled" Value="True" />
        <Setter Property="IsTabStop" Value="True" />
        <Setter Property="Padding" Value="12,5,0,5" />
        <Setter Property="Foreground" Value="#FF000000" />
        <Setter Property="Template" Value="{StaticResource PanelBarItemTopLevelTemplate}" />
    </Style>
</ResourceDictionary>