<ResourceDictionary
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:c="http://schemas.telerik.com/2008/xaml/compile"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="c"
        xmlns:dock="clr-namespace:Telerik.Windows.Controls.Docking;assembly=Telerik.Windows.Controls.Docking"
        xmlns:telerikNavigationPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls.Navigation"
        xmlns:local="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Docking"
        xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
        xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:telerikTabControl="clr-namespace:Telerik.Windows.Controls.TabControl;assembly=Telerik.Windows.Controls.Navigation"
        xmlns:telerikAnimation="clr-namespace:Telerik.Windows.Controls.Animation;assembly=Telerik.Windows.Controls">
    <ResourceDictionary.MergedDictionaries>
        <telerik:Windows8TouchResourceDictionary/>
    </ResourceDictionary.MergedDictionaries>
    <sys:TimeSpan x:Key="AutoHideInAnimationDuration">0:0:0.360</sys:TimeSpan>
    <sys:TimeSpan x:Key="AutoHideOutAnimationDuration">0:0:0.400</sys:TimeSpan>
    <telerik:InvertedBooleanConverter x:Key="InvertedBooleanConverter"/>
    <telerik:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
    <telerik:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverter"/>
    <ControlTemplate x:Key="RadButtonCloseControlTemplate" TargetType="telerik:RadButton">
        <Grid x:Name="LayoutRoot" Opacity="0.7" Background="Transparent">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimation Duration="0:0:0" To="0.3" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Opacity"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Opacity"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed"/>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Ellipse Stretch="Fill" Stroke="{telerik:Windows8TouchResource ResourceKey=MainBrush}" StrokeThickness="2" Width="30" Height="30"/>
            <Path
                    Data="F1M12.488,5.1L10.967,3.579L8,6.545L5.034,3.579L3.512,5.1L6.479,8.066L3.512,11.033L5.034,12.555L8,9.588L10.967,12.554L12.488,11.033L9.521,8.066z"
                    Stretch="Fill"
                    Fill="{telerik:Windows8TouchResource ResourceKey=MainBrush}"
                    Height="16"
                    Width="16"/>
        </Grid>
    </ControlTemplate>
    <Style x:Key="RadButtonCloseStyle" TargetType="telerik:RadButton">
        <Setter Property="Template" Value="{StaticResource RadButtonCloseControlTemplate}"/>
        <Setter Property="Margin" Value="3 0"/>
        <Setter Property="IsTabStop" Value="False"/>
    </Style>
    <ControlTemplate x:Key="RepeatButtonScrollLeftControlTemplate" TargetType="RepeatButton">
        <Border x:Name="LayoutRoot" Opacity="0.7" Background="Transparent" Width="16" Height="16">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimation Duration="0:0:0" To="0.3" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Opacity"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Opacity"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed"/>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Path Width="4" Height="7" Data="M4,0 L0,3.5 L4,7" Fill="{telerik:Windows8TouchResource ResourceKey=MediumBrush}"/>
        </Border>
    </ControlTemplate>
    <Style x:Key="RepeatButtonScrollLeftStyle" TargetType="RepeatButton">
        <Setter Property="Template" Value="{StaticResource RepeatButtonScrollLeftControlTemplate}"/>
    </Style>
    <ControlTemplate x:Key="RepeatButtonScrollRightControlTemplate" TargetType="RepeatButton">
        <Border x:Name="LayoutRoot" Opacity="0.7" Background="Transparent" Width="16" Height="16">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimation Duration="0:0:0" To="0.3" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Opacity"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Opacity"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed"/>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Path Width="4" Height="7" Data="M0,0 L4,3.5 L0,7" Fill="{telerik:Windows8TouchResource ResourceKey=MediumBrush}"/>
        </Border>
    </ControlTemplate>
    <Style x:Key="RepeatButtonScrollRightStyle" TargetType="RepeatButton">
        <Setter Property="Template" Value="{StaticResource RepeatButtonScrollRightControlTemplate}"/>
    </Style>
    <ControlTemplate x:Key="DropDownButtonDropDownControlTemplate" TargetType="telerik:RadDropDownButton">
        <Grid x:Name="LayoutRoot" Opacity="0.7" Background="Transparent">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimation Duration="0:0:0" To="0.3" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Opacity"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Opacity"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed"/>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Ellipse Stretch="Fill" Stroke="{telerik:Windows8TouchResource ResourceKey=MainBrush}" StrokeThickness="2" Width="30" Height="30"/>
            <Path Width="10" Height="7" Stretch="Fill" Data="M0,0 L3.5,4 L7,0" Fill="{telerik:Windows8TouchResource ResourceKey=MainBrush}"/>
        </Grid>
    </ControlTemplate>
    <Style x:Key="DropDownButtonDropDownStyle" TargetType="telerik:RadDropDownButton">
        <Setter Property="Template" Value="{StaticResource DropDownButtonDropDownControlTemplate}"/>
        <Setter Property="Margin" Value="3 0"/>
    </Style>
    <ControlTemplate x:Key="RadButtonDocumentCloseControlTemplate" TargetType="telerik:RadButton">
        <Grid x:Name="LayoutRoot" Opacity="0.7" Background="Transparent">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimation Duration="0:0:0" To="0.3" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Opacity"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Opacity"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed"/>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Ellipse Stretch="Fill" Stroke="{TemplateBinding Background}" StrokeThickness="2" Width="30" Height="30"/>
            <Path
                    Data="F1M12.488,5.1L10.967,3.579L8,6.545L5.034,3.579L3.512,5.1L6.479,8.066L3.512,11.033L5.034,12.555L8,9.588L10.967,12.554L12.488,11.033L9.521,8.066z"
                    Stretch="Fill"
                    Fill="{TemplateBinding Background}"
                    Height="16"
                    Width="16"/>
        </Grid>
    </ControlTemplate>
    <Style x:Key="RadButtonDocumentCloseStyle" TargetType="telerik:RadButton">
        <Setter Property="Template" Value="{StaticResource RadButtonDocumentCloseControlTemplate}"/>
        <Setter Property="Background" Value="{telerik:Windows8TouchResource ResourceKey=MediumBrush}"/>
        <Setter Property="IsTabStop" Value="False"/>
    </Style>
    <ControlTemplate x:Key="DropDownButtonDocumentDropDownControlTemplate" TargetType="telerik:RadDropDownButton">
        <Grid x:Name="LayoutRoot" Opacity="0.7" Background="Transparent">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimation Duration="0:0:0" To="0.3" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Opacity"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Opacity"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed"/>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Ellipse Stretch="Fill" Stroke="{telerik:Windows8TouchResource ResourceKey=MainBrush}" StrokeThickness="2" Width="30" Height="30"/>
            <Path Width="10" Height="7" Stretch="Fill" Data="M0,0 L3.5,4 L7,0" Fill="{telerik:Windows8TouchResource ResourceKey=MediumBrush}"/>
            <Popup x:Name="DropDownPopup" AllowsTransparency="True" StaysOpen="False" Focusable="False" Placement="Bottom">
                <Grid>
                    <Border x:Name="DropDownPopupBorder"
                            BorderThickness="0 1 0 0"
                            MinWidth="3"
                            MinHeight="3"
                            Background="{telerik:Windows8TouchResource ResourceKey=MainBrush}"
                            BorderBrush="{telerik:Windows8TouchResource ResourceKey=LowBrush}"
                            Width="{TemplateBinding DropDownWidth}"
                            Height="{TemplateBinding DropDownHeight}"
                            MaxWidth="{TemplateBinding DropDownMaxWidth}"
                            MaxHeight="{TemplateBinding DropDownMaxHeight}">
                        <ContentControl x:Name="DropDownPopupContent"
                                Content="{TemplateBinding DropDownContent}"
                                HorizontalContentAlignment="Stretch"
                                VerticalContentAlignment="Stretch"
                                ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                                HorizontalAlignment="Stretch"
                                VerticalAlignment="Stretch"
                                DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}"
                                ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                                ContentStringFormat="{TemplateBinding ContentStringFormat}"/>
                    </Border>
                </Grid>
            </Popup>
        </Grid>
    </ControlTemplate>
    <Style x:Key="DropDownButtonDocumentDropDownStyle" TargetType="telerik:RadDropDownButton">
        <Setter Property="Template" Value="{StaticResource DropDownButtonDocumentDropDownControlTemplate}"/>
        <Setter Property="Margin" Value="3 0 4 3"/>
    </Style>
    <ControlTemplate x:Key="RadButtonPinControlTemplate" TargetType="telerik:RadButton">
        <Grid x:Name="LayoutRoot" Opacity="0.7" Background="Transparent">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimation Duration="0:0:0" To="0.3" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Opacity"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Opacity"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed"/>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Ellipse Stretch="Fill" Stroke="{telerik:Windows8TouchResource ResourceKey=MainBrush}" StrokeThickness="2" Width="30" Height="30"/>
            <Path
                    Data="M4,2 C4,2 4,4 4,4 C4,4 8.2,4 9,4 L9,3 C9,2.3 8.3,2 7.5,2 z M3,0 L4,0 L4,1 L8,1 C9.1,1 10,1.8 10,3 L10,4 C10,5 9,6 8,6 L4,6 L4,7 L3,7 L3,4 L0,4 L0,3 L3,3 z"
                    Fill="{telerik:Windows8TouchResource ResourceKey=MainBrush}"
                    RenderTransformOrigin="0.5,0.5"
                    Stretch="Fill"
                    StrokeThickness="0"
                    Width="16"
                    Height="12">
                <Path.RenderTransform>
                    <RotateTransform Angle="-90"/>
                </Path.RenderTransform>
            </Path>
        </Grid>
    </ControlTemplate>
    <Style x:Key="RadButtonPinStyle" TargetType="telerik:RadButton">
        <Setter Property="Template" Value="{StaticResource RadButtonPinControlTemplate}"/>
        <Setter Property="Margin" Value="3 0"/>
    </Style>
    <ControlTemplate x:Key="RadButtonUnpinControlTemplate" TargetType="telerik:RadButton">
        <Grid x:Name="LayoutRoot" Opacity="0.7" Background="Transparent">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimation Duration="0:0:0" To="0.3" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Opacity"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Opacity"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed"/>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Ellipse Stretch="Fill" Stroke="{telerik:Windows8TouchResource ResourceKey=MainBrush}" StrokeThickness="2" Width="30" Height="30"/>
            <Path
                    Fill="{telerik:Windows8TouchResource ResourceKey=MainBrush}"
                    Stretch="Fill"
                    StrokeThickness="0"
                    Width="16"
                    Height="12"
                    Data="M4,2 C4,2 4,4 4,4 C4,4 8.2,4 9,4 L9,3 C9,2.3 8.3,2 7.5,2 z M3,0 L4,0 L4,1 L8,1 C9.1,1 10,1.8 10,3 L10,4 C10,5 9,6 8,6 L4,6 L4,7 L3,7 L3,4 L0,4 L0,3 L3,3 z"/>
        </Grid>
    </ControlTemplate>
    <Style x:Key="RadButtonUnpinStyle" TargetType="telerik:RadButton">
        <Setter Property="Template" Value="{StaticResource RadButtonUnpinControlTemplate}"/>
        <Setter Property="Margin" Value="3 0"/>
    </Style>
    <ControlTemplate x:Key="PopupContentTemplate" TargetType="ContentControl">
        <Border x:Name="Root"
                Background="{telerik:Windows8TouchResource ResourceKey=MainBrush}"
                BorderThickness="1"
                BorderBrush="{telerik:Windows8TouchResource ResourceKey=LowBrush}">
            <ContentPresenter/>
        </Border>
    </ControlTemplate>
    <ControlTemplate x:Key="AutoHideAreaTopTemplate" TargetType="dock:AutoHideArea">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <ItemsPresenter x:Name="ItemsPresenterElement"/>
            <Popup x:Name="ContentPopup" Grid.Row="1" IsOpen="False" AllowsTransparency="True">
                <Grid>
                    <Grid x:Name="PopupChild" MinWidth="50" MinHeight="50">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <ContentControl x:Name="ContentBackground"
                                Grid.Row="0"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{TemplateBinding Background}"
                                Template="{StaticResource PopupContentTemplate}">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="*"/>
                                </Grid.RowDefinitions>
                                <dock:PaneHeader x:Name="HeaderElement"
                                        Visibility="{Binding SelectedPane.PaneHeaderVisibility, RelativeSource={RelativeSource TemplatedParent}}"
                                        Grid.Row="0"
                                        MinHeight="40"
                                        SelectedPane="{TemplateBinding SelectedPane}"/>
                                <ContentPresenter x:Name="ContentElement" Grid.Row="1" ContentTemplate="{TemplateBinding SelectedContentTemplate}"/>
                            </Grid>
                        </ContentControl>
                        <dock:RadGridResizer x:Name="Resizer" Background="#01010101" Placement="Bottom" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Grid.Row="1" Height="8" Cursor="SizeNS"/>
                    </Grid>
                </Grid>
            </Popup>
        </Grid>
    </ControlTemplate>
    <ControlTemplate x:Key="AutoHideAreaBottomTemplate" TargetType="dock:AutoHideArea">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <ItemsPresenter x:Name="ItemsPresenterElement"/>
            <Popup x:Name="ContentPopup" IsOpen="False" AllowsTransparency="True" Placement="Top">
                <Grid>
                    <Grid x:Name="PopupChild" MinWidth="50" MinHeight="50">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <dock:RadGridResizer x:Name="Resizer" Grid.Row="0" Height="8" Placement="Top" HorizontalAlignment="Stretch" VerticalAlignment="Top" Background="#01010101" Cursor="SizeNS"/>
                        <ContentControl x:Name="ContentBackground"
                                Grid.Row="1"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{TemplateBinding Background}"
                                Template="{StaticResource PopupContentTemplate}">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="*"/>
                                </Grid.RowDefinitions>
                                <dock:PaneHeader x:Name="HeaderElement"
                                        Visibility="{Binding SelectedPane.PaneHeaderVisibility, RelativeSource={RelativeSource TemplatedParent}}"
                                        Grid.Row="0"
                                        MinHeight="40"
                                        SelectedPane="{TemplateBinding SelectedPane}"/>
                                <ContentPresenter x:Name="ContentElement" Grid.Row="1" ContentTemplate="{TemplateBinding SelectedContentTemplate}"/>
                            </Grid>
                        </ContentControl>
                    </Grid>
                </Grid>
            </Popup>
        </Grid>
    </ControlTemplate>
    <ControlTemplate x:Key="AutoHideAreaRightTemplate" TargetType="dock:AutoHideArea">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <ItemsPresenter x:Name="ItemsPresenterElement" Grid.Column="1"/>
            <Popup x:Name="ContentPopup" Grid.Column="1" IsOpen="False" Placement="Left" AllowsTransparency="True">
                <Grid>
                    <Grid x:Name="PopupChild" MinWidth="50" MinHeight="50">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <ContentControl x:Name="ContentBackground"
                                Grid.Column="1"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{TemplateBinding Background}"
                                Template="{StaticResource PopupContentTemplate}">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="*"/>
                                </Grid.RowDefinitions>
                                <dock:PaneHeader x:Name="HeaderElement"
                                        Visibility="{Binding SelectedPane.PaneHeaderVisibility, RelativeSource={RelativeSource TemplatedParent}}"
                                        Grid.Row="0"
                                        MinHeight="40"
                                        SelectedPane="{TemplateBinding SelectedPane}"/>
                                <ContentPresenter x:Name="ContentElement" Grid.Row="1" ContentTemplate="{TemplateBinding SelectedContentTemplate}"/>
                            </Grid>
                        </ContentControl>
                        <dock:RadGridResizer x:Name="Resizer" Grid.Column="0" Width="8" Background="#01010101" Placement="Left" HorizontalAlignment="Left" VerticalAlignment="Stretch" Cursor="SizeWE"/>
                    </Grid>
                </Grid>
            </Popup>
        </Grid>
    </ControlTemplate>
    <ControlTemplate x:Key="AutoHideAreaLeftTemplate" TargetType="dock:AutoHideArea">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ItemsPresenter x:Name="ItemsPresenterElement"/>
            <Popup x:Name="ContentPopup" Grid.Column="1" IsOpen="False" Placement="Right" AllowsTransparency="True">
                <Grid>
                    <Grid x:Name="PopupChild" MinWidth="50" MinHeight="50">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <ContentControl x:Name="ContentBackground"
                                Grid.Column="0"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{TemplateBinding Background}"
                                Template="{StaticResource PopupContentTemplate}">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="*"/>
                                </Grid.RowDefinitions>
                                <dock:PaneHeader x:Name="HeaderElement"
                                        Visibility="{Binding SelectedPane.PaneHeaderVisibility, RelativeSource={RelativeSource TemplatedParent}}"
                                        Grid.Row="0"
                                        MinHeight="40"
                                        SelectedPane="{TemplateBinding SelectedPane}"/>
                                <ContentPresenter x:Name="ContentElement" Grid.Row="1" ContentTemplate="{TemplateBinding SelectedContentTemplate}"/>
                            </Grid>
                        </ContentControl>
                        <dock:RadGridResizer x:Name="Resizer" Grid.Column="1" Width="8" Background="#01010101" Placement="Right" HorizontalAlignment="Right" VerticalAlignment="Stretch" Cursor="SizeWE"/>
                    </Grid>
                </Grid>
            </Popup>
        </Grid>
    </ControlTemplate>
    <ItemsPanelTemplate x:Key="AutoHideAreaItemsPanelTemplate">
        <telerikNavigationPrimitives:TabStripPanel x:Name="TabStripPanel"/>
    </ItemsPanelTemplate>
    <Style x:Key="AutoHideAreaStyle" TargetType="dock:AutoHideArea">
        <Setter Property="IsEnabled" Value="True"/>
        <Setter Property="IsTabStop" Value="True"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="BorderBrush" Value="{x:Null}"/>
        <Setter Property="Background" Value="{x:Null}"/>
        <Setter Property="ReorderTabRows" Value="False"/>
        <Setter Property="FontSize" Value="{telerik:Windows8TouchResource ResourceKey=FontSizeL}"/>
        <Setter Property="Template" Value="{StaticResource AutoHideAreaTopTemplate}"/>
        <Setter Property="TopTemplate" Value="{StaticResource AutoHideAreaTopTemplate}"/>
        <Setter Property="BottomTemplate" Value="{StaticResource AutoHideAreaBottomTemplate}"/>
        <Setter Property="RightTemplate" Value="{StaticResource AutoHideAreaRightTemplate}"/>
        <Setter Property="LeftTemplate" Value="{StaticResource AutoHideAreaLeftTemplate}"/>
        <Setter Property="ItemsPanel" Value="{StaticResource AutoHideAreaItemsPanelTemplate}"/>
    </Style>
    <Style TargetType="dock:AutoHideArea" BasedOn="{StaticResource AutoHideAreaStyle}"/>
    <ControlTemplate x:Key="TabItemContentPresenterControlTemplate" TargetType="telerikNavigationPrimitives:TabItemContentPresenter">
        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
            <ContentPresenter
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    RecognizesAccessKey="True"/>
        </Border>
    </ControlTemplate>
    <Style x:Key="TabItemContentPresenterStyle" TargetType="telerikNavigationPrimitives:TabItemContentPresenter">
        <Setter Property="Template" Value="{StaticResource TabItemContentPresenterControlTemplate}"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="FontSize" Value="{telerik:Windows8TouchResource ResourceKey=FontSizeXL}"/>
        <Setter Property="FontFamily" Value="{telerik:Windows8TouchResource ResourceKey=FontFamilyLight}"/>
        <Setter Property="Foreground" Value="{telerik:Windows8TouchResource ResourceKey=InvertedForegroundBrush}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <ControlTemplate x:Key="RadPaneTemplate" TargetType="local:RadPane">
        <Grid x:Name="wrapper">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimation To="0.3" Storyboard.TargetName="HeaderElement" Storyboard.TargetProperty="Opacity"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="(UIElement.Opacity)"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Selected">
                        <Storyboard>
                            <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetName="SelectedVisual" Storyboard.TargetProperty="(UIElement.Opacity)"/>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderElement" Storyboard.TargetProperty="(TextBlock.Foreground)">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Windows8TouchResource ResourceKey=InvertedForegroundBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="PinnedStates">
                    <VisualState x:Name="Unpinned">
                        <Storyboard>
                            <DoubleAnimation To="1" Duration="0" Storyboard.TargetName="PinnedVisual" Storyboard.TargetProperty="Opacity"/>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="wrapper" Storyboard.TargetProperty="Margin">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>1</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pinned"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="PlacementStates">
                    <VisualState x:Name="HorizontalLeft"/>
                    <VisualState x:Name="HorizontalRight"/>
                    <VisualState x:Name="HorizontalTop"/>
                    <VisualState x:Name="HorizontalBottom"/>
                    <VisualState x:Name="VerticalLeft">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalTransform" Storyboard.TargetProperty="LayoutTransform">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <RotateTransform Angle="-90"/>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverTransform" Storyboard.TargetProperty="LayoutTransform">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <RotateTransform Angle="-90"/>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedTransform" Storyboard.TargetProperty="LayoutTransform">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <RotateTransform Angle="-90"/>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="VerticalRight">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalTransform" Storyboard.TargetProperty="LayoutTransform">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <RotateTransform Angle="-90"/>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverTransform" Storyboard.TargetProperty="LayoutTransform">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <RotateTransform Angle="-90"/>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedTransform" Storyboard.TargetProperty="LayoutTransform">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <RotateTransform Angle="-90"/>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="VerticalTop"/>
                    <VisualState x:Name="VerticalBottom"/>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <telerikPrimitives:LayoutTransformControl RenderTransformOrigin=".5 .5" x:Name="NormalTransform">
                <Border x:Name="NormalVisual" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}"/>
            </telerikPrimitives:LayoutTransformControl>
            <Border x:Name="PinnedVisual" BorderThickness="1" BorderBrush="{telerik:Windows8TouchResource ResourceKey=LowBrush}" Opacity="0"/>
            <telerikPrimitives:LayoutTransformControl RenderTransformOrigin=".5 .5" x:Name="MouseOverTransform">
                <Border x:Name="MouseOverVisual"
                        Opacity="0"
                        Background="{telerik:Windows8TouchResource ResourceKey=InvertedGradientBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        BorderBrush="{TemplateBinding BorderBrush}"/>
            </telerikPrimitives:LayoutTransformControl>
            <telerikPrimitives:LayoutTransformControl RenderTransformOrigin=".5 .5" x:Name="SelectedTransform">
                <Border x:Name="SelectedVisual"
                        Opacity="0"
                        Background="{telerik:Windows8TouchResource ResourceKey=AccentBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        BorderBrush="{TemplateBinding BorderBrush}"/>
            </telerikPrimitives:LayoutTransformControl>
            <telerikNavigationPrimitives:TabItemContentPresenter x:Name="HeaderElement"
                    Foreground="{TemplateBinding Foreground}"
                    FontSize="{TemplateBinding FontSize}"
                    Content="{TemplateBinding Header}"
                    ContentTemplate="{TemplateBinding HeaderTemplate}"
                    Padding="{TemplateBinding Padding}"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    Style="{StaticResource TabItemContentPresenterStyle}"/>
        </Grid>
    </ControlTemplate>
    <ControlTemplate x:Key="RadPaneBaseTemplate" TargetType="local:RadPane">
        <Grid x:Name="wrapper" Margin="0 0 -1 0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimation To="0.3" Storyboard.TargetName="HeaderElement" Storyboard.TargetProperty="Opacity"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="(UIElement.Opacity)"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Selected">
                        <Storyboard>
                            <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetName="SelectedVisual" Storyboard.TargetProperty="(UIElement.Opacity)"/>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderElement" Storyboard.TargetProperty="(TextBlock.Foreground)">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Windows8TouchResource ResourceKey=InvertedForegroundBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="PinnedStates">
                    <VisualState x:Name="Unpinned">
                        <Storyboard>
                            <DoubleAnimation To="1" Duration="0" Storyboard.TargetName="PinnedVisual" Storyboard.TargetProperty="Opacity"/>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="wrapper" Storyboard.TargetProperty="Margin">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>1</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pinned"/>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" Grid.ColumnSpan="2"/>
            <Border x:Name="PinnedVisual" BorderThickness="1" BorderBrush="{telerik:Windows8TouchResource ResourceKey=LowBrush}" Opacity="0" Grid.ColumnSpan="2"/>
            <Border x:Name="MouseOverVisual" Opacity="0" Background="{telerik:Windows8TouchResource ResourceKey=InvertedGradientBrush}" Margin="1" Grid.ColumnSpan="2"/>
            <Border x:Name="SelectedVisual" Opacity="0" Background="{telerik:Windows8TouchResource ResourceKey=AccentBrush}" Grid.ColumnSpan="2"/>
            <telerikNavigationPrimitives:TabItemContentPresenter x:Name="HeaderElement"
                    Foreground="{TemplateBinding Foreground}"
                    FontSize="{TemplateBinding FontSize}"
                    Content="{TemplateBinding Header}"
                    ContentTemplate="{TemplateBinding HeaderTemplate}"
                    Padding="{TemplateBinding Padding}"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    Style="{StaticResource TabItemContentPresenterStyle}"/>
        </Grid>
    </ControlTemplate>
    <ControlTemplate x:Key="RadPaneDocumentHostTemplate" TargetType="local:RadPane">
        <Grid x:Name="wrapper" Margin="0 0 -1 0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimation To="0.3" Storyboard.TargetName="HeaderElement" Storyboard.TargetProperty="Opacity"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="(UIElement.Opacity)"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Selected">
                        <Storyboard>
                            <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetName="SelectedVisual" Storyboard.TargetProperty="(UIElement.Opacity)"/>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderElement" Storyboard.TargetProperty="(TextBlock.Foreground)">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Windows8TouchResource ResourceKey=InvertedForegroundBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadPaneCloseButton" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Windows8TouchResource ResourceKey=MainBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="PinnedStates">
                    <VisualState x:Name="Unpinned">
                        <Storyboard>
                            <DoubleAnimation To="1" Duration="0" Storyboard.TargetName="PinnedVisual" Storyboard.TargetProperty="Opacity"/>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RadPaneCloseButton" Storyboard.TargetProperty="Visibility" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="wrapper" Storyboard.TargetProperty="Margin">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>1</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pinned"/>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" Grid.ColumnSpan="2"/>
            <Border x:Name="PinnedVisual" BorderThickness="1" BorderBrush="{telerik:Windows8TouchResource ResourceKey=LowBrush}" Opacity="0" Grid.ColumnSpan="2"/>
            <Border x:Name="MouseOverVisual" Opacity="0" Background="{telerik:Windows8TouchResource ResourceKey=InvertedGradientBrush}" Margin="1" Grid.ColumnSpan="2"/>
            <Border x:Name="SelectedVisual" Opacity="0" Background="{telerik:Windows8TouchResource ResourceKey=AccentBrush}" Grid.ColumnSpan="2"/>
            <telerik:RadButton x:Name="RadPaneCloseButton"
                    Grid.Column="1"
                    IsBackgroundVisible="False"
                    Margin="0 0 7 0"
                    Style="{StaticResource RadButtonDocumentCloseStyle}"
                    VerticalAlignment="Center"
                    Command="local:RadDockingCommands.Close"
                    Visibility="{Binding IsEnabled, RelativeSource={RelativeSource Self}, Converter={StaticResource BooleanToVisibilityConverter}}"/>
            <telerikNavigationPrimitives:TabItemContentPresenter x:Name="HeaderElement"
                    Foreground="{TemplateBinding Foreground}"
                    FontSize="{TemplateBinding FontSize}"
                    Content="{TemplateBinding Header}"
                    ContentTemplate="{TemplateBinding HeaderTemplate}"
                    Padding="{TemplateBinding Padding}"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    Style="{StaticResource TabItemContentPresenterStyle}"/>
        </Grid>
    </ControlTemplate>
    <DataTemplate x:Key="RadPaneContextMenuTemplate">
        <telerikNavigation:RadContextMenu InheritDataContext="False">
            <telerikNavigation:RadMenuItem IsChecked="{Binding IsFloatingOnly}" Command="local:RadDockingCommands.Floating" CommandParameter="{Binding}" CommandTarget="{Binding}"/>
            <telerikNavigation:RadMenuItem IsChecked="{Binding IsDockableOptionChecked}" Command="local:RadDockingCommands.Dockable" CommandParameter="{Binding}" CommandTarget="{Binding}"/>
            <telerikNavigation:RadMenuItem IsChecked="{Binding IsInDocumentHost}" Command="local:RadDockingCommands.TabbedDocument" CommandParameter="{Binding}" CommandTarget="{Binding}"/>
            <telerikNavigation:RadMenuItem
                    IsChecked="{Binding IsPinned, Converter={StaticResource InvertedBooleanConverter}}"
                    Command="local:RadDockingCommands.Pin"
                    CommandParameter="{Binding}"
                    CommandTarget="{Binding}"/>
            <telerikNavigation:RadMenuItem IsChecked="{Binding IsHidden}" Command="local:RadDockingCommands.Close" CommandParameter="{Binding}" CommandTarget="{Binding}"/>
        </telerikNavigation:RadContextMenu>
    </DataTemplate>
    <ControlTemplate x:Key="DraggedElementVisualCueTemplate">
        <Grid>
            <Border Margin="0 0 0 4" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
            <Border Margin="0 0 0 10" Padding="{TemplateBinding BorderThickness}">
                <Grid>
                    <TextBlock
                            Text="{Binding Title}"
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                </Grid>
            </Border>
            <Grid.Effect>
                <DropShadowEffect Opacity="0.3" BlurRadius="10" Direction="280" ShadowDepth="3"/>
            </Grid.Effect>
        </Grid>
    </ControlTemplate>
    <Style TargetType="dock:DraggedElementVisualCue">
        <Setter Property="Foreground" Value="{telerik:Windows8TouchResource ResourceKey=InvertedForegroundBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik:Windows8TouchResource ResourceKey=AccentBrush}"/>
        <Setter Property="Background" Value="{telerik:Windows8TouchResource ResourceKey=AccentBrush}"/>
        <Setter Property="FontFamily" Value="{telerik:Windows8TouchResource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik:Windows8TouchResource ResourceKey=FontSizeXL}"/>
        <Setter Property="Padding" Value="6 2"/>
        <Setter Property="Template" Value="{StaticResource DraggedElementVisualCueTemplate}"/>
    </Style>
    <Style x:Key="RadPaneStyle" TargetType="local:RadPane">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Padding" Value="6 4 6 3"/>
        <Setter Property="Margin" Value="0"/>
        <Setter Property="MinHeight" Value="40"/>
        <Setter Property="MinWidth" Value="40"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="BorderBrush" Value="{telerik:Windows8TouchResource ResourceKey=MediumBrush}"/>
        <Setter Property="Background" Value="{telerik:Windows8TouchResource ResourceKey=MainGradientBrush}"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Foreground" Value="{telerik:Windows8TouchResource ResourceKey=MainForegroundBrush}"/>
        <Setter Property="FontFamily" Value="{telerik:Windows8TouchResource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik:Windows8TouchResource ResourceKey=FontSizeXL}"/>
        <Setter Property="Template" Value="{StaticResource RadPaneBaseTemplate}"/>
        <Setter Property="LeftTemplate" Value="{StaticResource RadPaneTemplate}"/>
        <Setter Property="TopTemplate" Value="{StaticResource RadPaneBaseTemplate}"/>
        <Setter Property="RightTemplate" Value="{StaticResource RadPaneTemplate}"/>
        <Setter Property="BottomTemplate" Value="{StaticResource RadPaneBaseTemplate}"/>
        <Setter Property="DocumentHostTemplate" Value="{StaticResource RadPaneDocumentHostTemplate}"/>
        <Setter Property="ContextMenuTemplate" Value="{StaticResource RadPaneContextMenuTemplate}"/>
    </Style>
    <Style x:Key="GridResizerPreviewStyle" TargetType="Control">
        <Setter Property="Background" Value="{telerik:Windows8TouchResource ResourceKey=MediumBrush}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="BorderBrush" Value="{x:Null}"/>
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
        <Setter Property="VerticalAlignment" Value="Stretch"/>
        <Setter Property="MinWidth" Value="4"/>
        <Setter Property="MinHeight" Value="4"/>
        <Setter Property="Opacity" Value="0.5"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Control">
                    <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="RadGridResizerControlTemplate" TargetType="dock:RadGridResizer">
        <Grid x:Name="Root">
            <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}"/>
        </Grid>
    </ControlTemplate>
    <Style x:Key="RadGridResizerStyle" TargetType="dock:RadGridResizer">
        <Setter Property="IsTabStop" Value="True"/>
        <Setter Property="Background" Value="{telerik:Windows8TouchResource ResourceKey=MainBrush}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="BorderBrush" Value="{x:Null}"/>
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
        <Setter Property="VerticalAlignment" Value="Stretch"/>
        <Setter Property="PreviewStyle" Value="{StaticResource GridResizerPreviewStyle}"/>
        <Setter Property="MinWidth" Value="2"/>
        <Setter Property="MinHeight" Value="2"/>
        <Setter Property="Template" Value="{StaticResource RadGridResizerControlTemplate}"/>
        <Setter Property="Panel.ZIndex" Value="100"/>
        <Style.Triggers>
            <Trigger Property="Placement" Value="Top">
                <Setter Property="Cursor" Value="SizeNS"/>
            </Trigger>
            <Trigger Property="Placement" Value="Right">
                <Setter Property="Cursor" Value="SizeWE"/>
            </Trigger>
            <Trigger Property="Placement" Value="Bottom">
                <Setter Property="Cursor" Value="SizeNS"/>
            </Trigger>
            <Trigger Property="Placement" Value="Left">
                <Setter Property="Cursor" Value="SizeWE"/>
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="RadSplitContainerStyle" TargetType="local:RadSplitContainer">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:RadSplitContainer">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="ResizerStates">
                                <VisualState x:Name="ResizerLeft">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DockResizer" Storyboard.TargetProperty="Visibility" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation BeginTime="00:00:00" From="8" To="8" Storyboard.TargetName="DockResizer" Storyboard.TargetProperty="MinWidth"/>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="border" Storyboard.TargetProperty="Margin" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Thickness>8 0 0 0</Thickness>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ResizerTop">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DockResizer" Storyboard.TargetProperty="Visibility" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DockResizer" Storyboard.TargetProperty="VerticalAlignment" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <VerticalAlignment>Top</VerticalAlignment>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DockResizer" Storyboard.TargetProperty="HorizontalAlignment" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <HorizontalAlignment>Stretch</HorizontalAlignment>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DockResizer" Storyboard.TargetProperty="Placement" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Dock>Top</Dock>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation BeginTime="00:00:00" From="8" To="8" Storyboard.TargetName="DockResizer" Storyboard.TargetProperty="MinHeight"/>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="border" Storyboard.TargetProperty="Margin" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Thickness>0 8 0 0</Thickness>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ResizerRight">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DockResizer" Storyboard.TargetProperty="Visibility" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation BeginTime="00:00:00" From="8" To="8" Storyboard.TargetName="DockResizer" Storyboard.TargetProperty="MinWidth"/>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="border" Storyboard.TargetProperty="Margin" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Thickness>0 0 8 0</Thickness>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DockResizer" Storyboard.TargetProperty="HorizontalAlignment" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <HorizontalAlignment>Right</HorizontalAlignment>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DockResizer" Storyboard.TargetProperty="Placement" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Dock>Right</Dock>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ResizerBottom">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DockResizer" Storyboard.TargetProperty="Visibility" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DockResizer" Storyboard.TargetProperty="VerticalAlignment" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <VerticalAlignment>Bottom</VerticalAlignment>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DockResizer" Storyboard.TargetProperty="HorizontalAlignment" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <HorizontalAlignment>Stretch</HorizontalAlignment>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DockResizer" Storyboard.TargetProperty="Placement" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Dock>Bottom</Dock>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation BeginTime="00:00:00" From="8" To="8" Storyboard.TargetName="DockResizer" Storyboard.TargetProperty="MinHeight"/>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="border" Storyboard.TargetProperty="Margin" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Thickness>0 0 0 8</Thickness>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="HideResizer"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="border"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Padding="{TemplateBinding Padding}">
                            <ItemsPresenter/>
                        </Border>
                        <dock:RadGridResizer x:Name="DockResizer" Placement="Left" ShowsPreview="True" Visibility="Collapsed" VerticalAlignment="Stretch" HorizontalAlignment="Left"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="MinWidth" Value="15"/>
        <Setter Property="MinHeight" Value="15"/>
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <local:ProportionalStackPanel/>
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="PaneHeaderControlTemplate" TargetType="dock:PaneHeader">
        <Border x:Name="LayoutRoot" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommandsMenuStates">
                    <VisualState x:Name="CommandsMenuNormalState"/>
                    <VisualState x:Name="CommandsMenuHiddenState">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderDropDownMenu" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="PinnedStates">
                    <VisualState x:Name="Unpinned">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderUnPinButton" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderPinButton" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pinned"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="HighlightStates">
                    <VisualState x:Name="NotHighlighted"/>
                    <VisualState x:Name="Highlighted"/>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid x:Name="Content">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="4"/>
                </Grid.ColumnDefinitions>
                <ContentControl x:Name="TitleElement"
                        Foreground="{TemplateBinding Foreground}"
                        HorizontalContentAlignment="Stretch"
                        Margin="{TemplateBinding Padding}"
                        VerticalAlignment="{TemplateBinding VerticalAlignment}"
                        Content="{Binding SelectedPane.Title, RelativeSource={RelativeSource TemplatedParent}}"
                        ContentTemplate="{Binding SelectedPane.TitleTemplate, RelativeSource={RelativeSource TemplatedParent}}"
                        FontFamily="{TemplateBinding FontFamily}"
                        FontSize="{TemplateBinding FontSize}"
                        IsTabStop="False"/>
                <telerik:RadDropDownButton x:Name="HeaderDropDownMenu"
                        Grid.Column="1"
                        Command="local:RadDockingCommands.ContextMenuOpen"
                        CommandParameter="{TemplateBinding SelectedPane}"
                        Style="{StaticResource DropDownButtonDropDownStyle}"
                        IsTabStop="{TemplateBinding IsTabStop}"/>
                <Grid Grid.Column="2" Visibility="{Binding SelectedPane.PinButtonVisibility, RelativeSource={RelativeSource TemplatedParent}}">
                    <telerik:RadButton x:Name="HeaderPinButton"
                            Command="local:RadDockingCommands.Pin"
                            CommandParameter="{TemplateBinding SelectedPane}"
                            Style="{StaticResource RadButtonPinStyle}"
                            IsTabStop="{TemplateBinding IsTabStop}"/>
                    <telerik:RadButton x:Name="HeaderUnPinButton"
                            Visibility="Collapsed"
                            Command="local:RadDockingCommands.Pin"
                            CommandParameter="{TemplateBinding SelectedPane}"
                            Style="{StaticResource RadButtonUnpinStyle}"
                            IsTabStop="{TemplateBinding IsTabStop}"/>
                </Grid>
                <telerik:RadButton x:Name="HeaderCloseButton"
                        Grid.Column="3"
                        Command="local:RadDockingCommands.Close"
                        CommandParameter="{TemplateBinding SelectedPane}"
                        Style="{StaticResource RadButtonCloseStyle}"
                        IsTabStop="{TemplateBinding IsTabStop}"/>
            </Grid>
        </Border>
    </ControlTemplate>
    <Style x:Key="PaneHeaderStyle" TargetType="dock:PaneHeader">
        <Setter Property="Template" Value="{StaticResource PaneHeaderControlTemplate}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="BorderBrush" Value="{x:Null}"/>
        <Setter Property="Background" Value="{telerik:Windows8TouchResource ResourceKey=AccentBrush}"/>
        <Setter Property="Foreground" Value="{telerik:Windows8TouchResource ResourceKey=InvertedForegroundBrush}"/>
        <Setter Property="FontSize" Value="{telerik:Windows8TouchResource ResourceKey=FontSizeXL}"/>
        <Setter Property="FontFamily" Value="{telerik:Windows8TouchResource ResourceKey=FontFamilyLight}"/>
        <Setter Property="Padding" Value="10 0"/>
        <Setter Property="MinHeight" Value="40"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="dock:InputBindingsManager.InputBindings">
            <Setter.Value>
                <InputBindingCollection>
                    <MouseBinding Command="local:RadDockingCommands.PaneHeaderMenuOpen">
                        <MouseBinding.Gesture>
                            <MouseGesture MouseAction="RightClick"/>
                        </MouseBinding.Gesture>
                    </MouseBinding>
                </InputBindingCollection>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="RadPaneGroupDocumentHostControlTemplate" TargetType="local:RadPaneGroup">
        <Grid>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Disabled"/>
                    <VisualState x:Name="Normal"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusStates">
                    <VisualState x:Name="Focused"/>
                    <VisualState x:Name="Unfocused"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="AutoCollapseStates">
                    <VisualState x:Name="SingleItem"/>
                    <VisualState x:Name="TwoOrMoreItems"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="PaneHeaderVisibilityStates">
                    <VisualState x:Name="PaneHeaderHidden"/>
                    <VisualState x:Name="PaneHeaderVisible"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="ResizerStates">
                    <VisualState x:Name="ResizerLeft">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DockResizer" Storyboard.TargetProperty="Visibility" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DockResizer" Storyboard.TargetProperty="(Grid.RowSpan)" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>3</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DockResizer" Storyboard.TargetProperty="Placement" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Dock>Left</Dock>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimation BeginTime="00:00:00" From="8" To="8" Storyboard.TargetName="DockResizer" Storyboard.TargetProperty="MinWidth"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="ResizerTop">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DockResizer" Storyboard.TargetProperty="Visibility" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DockResizer" Storyboard.TargetProperty="(Grid.ColumnSpan)" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>2</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DockResizer" Storyboard.TargetProperty="Placement" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Dock>Top</Dock>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimation BeginTime="00:00:00" From="8" To="8" Storyboard.TargetName="DockResizer" Storyboard.TargetProperty="MinHeight"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="HideResizer"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="DropDownDisplayStates">
                    <VisualState x:Name="DropDownButtonCollapsed"/>
                    <VisualState x:Name="DropDownButtonVisible">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownButtonElement" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <dock:RadGridResizer x:Name="DockResizer" Placement="Left" ShowsPreview="True" Visibility="Collapsed"/>
            <Grid x:Name="ItemsContainer" Grid.Row="1" Grid.Column="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <RepeatButton x:Name="LeftScrollButtonElement" Visibility="{Binding ComputedHorizontalScrollBarVisibility, ElementName=ScrollViewerElement}" Style="{StaticResource RepeatButtonScrollLeftStyle}"/>
                <ScrollViewer x:Name="ScrollViewerElement" Grid.Column="1" HorizontalScrollBarVisibility="{Binding (ScrollViewer.HorizontalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}">
                    <ScrollViewer.Template>
                        <ControlTemplate TargetType="ScrollViewer">
                            <ScrollContentPresenter x:Name="ScrollContentPresenter"/>
                        </ControlTemplate>
                    </ScrollViewer.Template>
                    <ItemsPresenter x:Name="ItemsPresenterElement"/>
                </ScrollViewer>
                <RepeatButton x:Name="RightScrollButtonElement"
                        Grid.Column="2"
                        Visibility="{Binding ComputedHorizontalScrollBarVisibility, ElementName=ScrollViewerElement}"
                        Style="{StaticResource RepeatButtonScrollRightStyle}"/>
                <telerik:RadDropDownButton x:Name="DropDownButtonElement"
                        Grid.Column="3"
                        Visibility="Collapsed"
                        IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                        DropDownPlacement="Bottom"
                        DropDownButtonPosition="Left"
                        Style="{StaticResource DropDownButtonDocumentDropDownStyle}"
                        Focusable="False">
                    <telerik:RadDropDownButton.DropDownContent>
                        <telerikTabControl:DropDownMenu x:Name="DropDownMenuElement"
                                StaysOpen="False"
                                IconColumnWidth="0"
                                Placement="Bottom"
                                ItemTemplate="{TemplateBinding ItemDropDownContentTemplate}"
                                ItemTemplateSelector="{TemplateBinding ItemDropDownContentTemplateSelector}"
                                DisplayMemberPath="{TemplateBinding DropDownDisplayMemberPath}"/>
                    </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadButton x:Name="CloseButton"
                        Grid.Column="4"
                        Command="local:RadDockingCommands.Close"
                        Style="{StaticResource RadButtonDocumentCloseStyle}"
                        Visibility="{Binding IsEnabled, RelativeSource={RelativeSource Self}, Converter={StaticResource BooleanToVisibilityConverter}}"/>
            </Grid>
            <Grid Grid.Row="2" Grid.Column="1" Background="{TemplateBinding Background}" Margin="0 -1 0 0">
                <Rectangle Stroke="{telerik:Windows8TouchResource ResourceKey=LowBrush}" StrokeThickness="1"/>
                <Rectangle Stroke="{telerik:Windows8TouchResource ResourceKey=AccentBrush}" StrokeThickness="1" Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedPane.IsActive, Converter={StaticResource BooleanToVisibilityConverter}}"/>
                <Rectangle Margin="1" StrokeThickness="3" Stroke="{telerik:Windows8TouchResource ResourceKey=AccentBrush}" Opacity="0.3"/>
                <Grid Margin="5">
                    <ContentPresenter x:Name="ContentElement"
                            Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsContentPreserved, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                            ContentTemplate="{TemplateBinding SelectedContentTemplate}"
                            ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"/>
                    <Grid x:Name="ContentElementsPanel" Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsContentPreserved, Converter={StaticResource BooleanToVisibilityConverter}}"/>
                </Grid>
            </Grid>
        </Grid>
    </ControlTemplate>
    <ControlTemplate x:Key="RadPaneGroupDefaultControlTemplate" TargetType="local:RadPaneGroup">
        <Grid>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Disabled"/>
                    <VisualState x:Name="Normal"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusStates">
                    <VisualState x:Name="Focused"/>
                    <VisualState x:Name="Unfocused"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="AutoCollapseStates">
                    <VisualState x:Name="SingleItem">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ItemsContainer" Storyboard.TargetProperty="Visibility" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="TwoOrMoreItems"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="PaneHeaderVisibilityStates">
                    <VisualState x:Name="PaneHeaderHidden">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderContainer" Storyboard.TargetProperty="Visibility" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="PaneHeaderVisible"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="ResizerStates">
                    <VisualState x:Name="ResizerLeft">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DockResizer" Storyboard.TargetProperty="Visibility" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DockResizer" Storyboard.TargetProperty="(Grid.RowSpan)" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>4</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DockResizer" Storyboard.TargetProperty="Placement" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Dock>Left</Dock>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimation BeginTime="00:00:00" From="8" To="8" Storyboard.TargetName="DockResizer" Storyboard.TargetProperty="MinWidth"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="ResizerTop">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DockResizer" Storyboard.TargetProperty="Visibility" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DockResizer" Storyboard.TargetProperty="(Grid.ColumnSpan)" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>2</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DockResizer" Storyboard.TargetProperty="Placement" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Dock>Top</Dock>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimation BeginTime="00:00:00" From="8" To="8" Storyboard.TargetName="DockResizer" Storyboard.TargetProperty="MinHeight"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="HideResizer"/>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="ItemsContainer" Grid.Row="3" Grid.Column="1" Margin="0 -1 0 0">
                <ItemsPresenter x:Name="ItemsPresenterElement"/>
            </Border>
            <Rectangle Fill="{TemplateBinding Background}" StrokeThickness="1" Stroke="{telerik:Windows8TouchResource ResourceKey=LowBrush}" Grid.Row="2" Grid.Column="1"/>
            <Border x:Name="HeaderContainer" Grid.Row="1" Grid.Column="1">
                <dock:PaneHeader x:Name="HeaderElement" SelectedPane="{TemplateBinding SelectedPane}" Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedItem.PaneHeaderVisibility}"/>
            </Border>
            <Grid Grid.Row="2" Grid.Column="1">
                <ContentPresenter x:Name="ContentElement"
                        Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsContentPreserved, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                        ContentTemplate="{TemplateBinding SelectedContentTemplate}"
                        ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"/>
                <Grid x:Name="ContentElementsPanel" Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsContentPreserved, Converter={StaticResource BooleanToVisibilityConverter}}"/>
            </Grid>
            <Rectangle
                    StrokeThickness="1"
                    Stroke="{telerik:Windows8TouchResource ResourceKey=AccentBrush}"
                    Grid.Row="1"
                    Grid.Column="1"
                    Grid.RowSpan="2"
                    Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedPane.IsActive, Converter={StaticResource BooleanToVisibilityConverter}}"/>
            <dock:RadGridResizer x:Name="DockResizer" Placement="Left" ShowsPreview="True" Visibility="Collapsed"/>
        </Grid>
    </ControlTemplate>
    <ControlTemplate x:Key="RadPaneGroupTopControlTemplate" TargetType="local:RadPaneGroup">
        <Grid>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Disabled"/>
                    <VisualState x:Name="Normal"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusStates">
                    <VisualState x:Name="Focused"/>
                    <VisualState x:Name="Unfocused"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="AutoCollapseStates">
                    <VisualState x:Name="SingleItem"/>
                    <VisualState x:Name="TwoOrMoreItems"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="PaneHeaderVisibilityStates">
                    <VisualState x:Name="PaneHeaderHidden"/>
                    <VisualState x:Name="PaneHeaderVisible"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="ResizerStates">
                    <VisualState x:Name="ResizerLeft">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DockResizer" Storyboard.TargetProperty="Visibility" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DockResizer" Storyboard.TargetProperty="(Grid.RowSpan)" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>3</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DockResizer" Storyboard.TargetProperty="Placement" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Dock>Left</Dock>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimation BeginTime="00:00:00" From="8" To="8" Storyboard.TargetName="DockResizer" Storyboard.TargetProperty="MinWidth"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="ResizerTop">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DockResizer" Storyboard.TargetProperty="Visibility" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DockResizer" Storyboard.TargetProperty="(Grid.ColumnSpan)" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>2</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DockResizer" Storyboard.TargetProperty="Placement" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Dock>Top</Dock>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimation BeginTime="00:00:00" To="4" Storyboard.TargetName="DockResizer" Storyboard.TargetProperty="MinHeight"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="HideResizer"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="DropDownDisplayStates">
                    <VisualState x:Name="DropDownButtonCollapsed"/>
                    <VisualState x:Name="DropDownButtonVisible">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownButtonElement" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <dock:RadGridResizer x:Name="DockResizer" Placement="Left" ShowsPreview="True" Visibility="Collapsed"/>
            <Grid x:Name="ItemsContainer" Grid.Row="1" Grid.Column="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <RepeatButton x:Name="LeftScrollButtonElement" Visibility="{Binding ComputedHorizontalScrollBarVisibility, ElementName=ScrollViewerElement}" Style="{StaticResource RepeatButtonScrollLeftStyle}"/>
                <ScrollViewer x:Name="ScrollViewerElement" Grid.Column="1" HorizontalScrollBarVisibility="{Binding (ScrollViewer.HorizontalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}">
                    <ScrollViewer.Template>
                        <ControlTemplate TargetType="ScrollViewer">
                            <ScrollContentPresenter x:Name="ScrollContentPresenter"/>
                        </ControlTemplate>
                    </ScrollViewer.Template>
                    <ItemsPresenter x:Name="ItemsPresenterElement"/>
                </ScrollViewer>
                <RepeatButton x:Name="RightScrollButtonElement"
                        Grid.Column="2"
                        Visibility="{Binding ComputedHorizontalScrollBarVisibility, ElementName=ScrollViewerElement}"
                        Style="{StaticResource RepeatButtonScrollRightStyle}"/>
                <telerik:RadDropDownButton x:Name="DropDownButtonElement"
                        Grid.Column="3"
                        Visibility="Collapsed"
                        IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                        DropDownPlacement="Bottom"
                        DropDownButtonPosition="Left"
                        Style="{StaticResource DropDownButtonDocumentDropDownStyle}"
                        Focusable="False">
                    <telerik:RadDropDownButton.DropDownContent>
                        <telerikTabControl:DropDownMenu x:Name="DropDownMenuElement"
                                StaysOpen="False"
                                IconColumnWidth="0"
                                Placement="Bottom"
                                ItemTemplate="{TemplateBinding ItemDropDownContentTemplate}"
                                ItemTemplateSelector="{TemplateBinding ItemDropDownContentTemplateSelector}"
                                DisplayMemberPath="{TemplateBinding DropDownDisplayMemberPath}"/>
                    </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
                <telerik:RadButton x:Name="CloseButton"
                        Grid.Column="4"
                        Command="local:RadDockingCommands.Close"
                        Style="{StaticResource RadButtonDocumentCloseStyle}"
                        Visibility="{Binding IsEnabled, RelativeSource={RelativeSource Self}, Converter={StaticResource BooleanToVisibilityConverter}}"/>
            </Grid>
            <Grid Grid.Row="2" Grid.Column="1" Background="{TemplateBinding Background}" Margin="0 -1 0 0">
                <Rectangle Stroke="{telerik:Windows8TouchResource ResourceKey=LowBrush}" StrokeThickness="1"/>
                <Rectangle Stroke="{telerik:Windows8TouchResource ResourceKey=AccentBrush}" StrokeThickness="1" Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedPane.IsActive, Converter={StaticResource BooleanToVisibilityConverter}}"/>
                <Grid Margin="5">
                    <ContentPresenter x:Name="ContentElement"
                            Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsContentPreserved, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                            ContentTemplate="{TemplateBinding SelectedContentTemplate}"
                            ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"/>
                    <Grid x:Name="ContentElementsPanel" Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsContentPreserved, Converter={StaticResource BooleanToVisibilityConverter}}"/>
                </Grid>
            </Grid>
        </Grid>
    </ControlTemplate>
    <ItemsPanelTemplate x:Key="RadPaneGroupItemsPanelTemplate">
        <telerikNavigationPrimitives:TabStripPanel/>
    </ItemsPanelTemplate>
    <Style x:Key="RadPaneGroupStyle" TargetType="local:RadPaneGroup">
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Template" Value="{StaticResource RadPaneGroupDefaultControlTemplate}"/>
        <Setter Property="BottomTemplate" Value="{StaticResource RadPaneGroupDefaultControlTemplate}"/>
        <Setter Property="TopTemplate" Value="{StaticResource RadPaneGroupTopControlTemplate}"/>
        <Setter Property="DocumentHostTemplate" Value="{StaticResource RadPaneGroupDocumentHostControlTemplate}"/>
        <Setter Property="LeftTemplate" Value="{StaticResource RadPaneGroupDefaultControlTemplate}"/>
        <Setter Property="RightTemplate" Value="{StaticResource RadPaneGroupDefaultControlTemplate}"/>
        <Setter Property="ItemsPanel" Value="{StaticResource RadPaneGroupItemsPanelTemplate}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="BorderBrush" Value="{x:Null}"/>
        <Setter Property="Background" Value="{telerik:Windows8TouchResource ResourceKey=MainBrush}"/>
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
        <Setter Property="VerticalAlignment" Value="Stretch"/>
        <Setter Property="Align" Value="Left"/>
        <Setter Property="TabStripPlacement" Value="Bottom"/>
        <Setter Property="AllTabsEqualHeight" Value="True"/>
        <Setter Property="BackgroundVisibility" Value="Visible"/>
        <Setter Property="MinWidth" Value="15"/>
        <Setter Property="MinHeight" Value="15"/>
        <Setter Property="Padding" Value="2"/>
        <Setter Property="FontSize" Value="{telerik:Windows8TouchResource ResourceKey=FontSizeL}"/>
    </Style>
    <ControlTemplate x:Key="ToolWindowControlTemplate" TargetType="dock:ToolWindow">
        <Border x:Name="VisualRoot" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="FocusStates">
                    <VisualState x:Name="Unfocused"/>
                    <VisualState x:Name="Focused">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="VisualRoot">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8TouchResource ResourceKey=AccentBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" MinHeight="40"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <Rectangle Grid.ColumnSpan="2" Fill="{telerik:Windows8TouchResource ResourceKey=AccentBrush}"/>
                <Border x:Name="HeaderElement" Background="Transparent">
                    <Border.InputBindings>
                        <MouseBinding Command="local:RadDockingCommands.PaneHeaderMenuOpen">
                            <MouseBinding.Gesture>
                                <MouseGesture MouseAction="RightClick"/>
                            </MouseBinding.Gesture>
                        </MouseBinding>
                    </Border.InputBindings>
                    <ContentControl x:Name="Header"
                            Margin="10 0"
                            Foreground="{telerik:Windows8TouchResource ResourceKey=InvertedForegroundBrush}"
                            Content="{TemplateBinding Header}"
                            ContentTemplate="{TemplateBinding HeaderTemplate}"
                            FontSize="{telerik:Windows8TouchResource ResourceKey=FontSizeXL}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="Center"
                            IsTabStop="False"
                            FontFamily="{telerik:Windows8TouchResource ResourceKey=FontFamilyLight}"/>
                </Border>
                <telerik:RadButton x:Name="CloseButton" Grid.Column="1" Command="{x:Static telerik:WindowCommands.Close}" Style="{StaticResource RadButtonCloseStyle}" Margin="0 0 7 0"/>
                <ContentPresenter x:Name="Content" Margin="{TemplateBinding Padding}" Grid.Row="1" Grid.ColumnSpan="2" Content="{TemplateBinding Content}"/>
            </Grid>
        </Border>
    </ControlTemplate>
    <Style x:Key="ToolWindowStyle" TargetType="dock:ToolWindow">
        <Setter Property="MinHeight" Value="42"/>
        <Setter Property="MinWidth" Value="105"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Background" Value="{telerik:Windows8TouchResource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik:Windows8TouchResource ResourceKey=LowBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="2"/>
        <Setter Property="CaptionHeight" Value="40"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="Template" Value="{StaticResource ToolWindowControlTemplate}"/>
    </Style>
    <ControlTemplate x:Key="CompassControlTemplate" TargetType="dock:Compass">
        <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="HighlightLeftIndicator">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_LeftIndicator" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Windows8TouchResource ResourceKey=MainBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftHighlightVisual" Storyboard.TargetProperty="BorderBrush">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Windows8TouchResource ResourceKey=AccentBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftPlacementIndicator" Storyboard.TargetProperty="Fill">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Windows8TouchResource ResourceKey=AccentBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="HighlightTopIndicator">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TopIndicator" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Windows8TouchResource ResourceKey=MainBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopHighlightVisual" Storyboard.TargetProperty="BorderBrush">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Windows8TouchResource ResourceKey=AccentBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopPlacementIndicator" Storyboard.TargetProperty="Fill">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Windows8TouchResource ResourceKey=AccentBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="HighlightRightIndicator">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_RightIndicator" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Windows8TouchResource ResourceKey=MainBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RightHighlightVisual" Storyboard.TargetProperty="BorderBrush">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Windows8TouchResource ResourceKey=AccentBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RightPlacementIndicator" Storyboard.TargetProperty="Fill">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Windows8TouchResource ResourceKey=AccentBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="HighlightBottomIndicator">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_BottomIndicator" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Windows8TouchResource ResourceKey=MainBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BottomHighlightVisual" Storyboard.TargetProperty="BorderBrush">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Windows8TouchResource ResourceKey=AccentBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BottomPlacementIndicator" Storyboard.TargetProperty="Fill">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Windows8TouchResource ResourceKey=AccentBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="HighlightCenterIndicator">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_CenterIndicator" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Windows8TouchResource ResourceKey=MainBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CenterHighlightVisual" Storyboard.TargetProperty="BorderBrush">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Windows8TouchResource ResourceKey=AccentBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="LeftIndicatorVisibilityStates">
                    <VisualState x:Name="LeftIndicatorVisibile"/>
                    <VisualState x:Name="LeftIndicatorHidden">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_LeftIndicator" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="TopIndicatorVisibilityStates">
                    <VisualState x:Name="TopIndicatorVisibile"/>
                    <VisualState x:Name="TopIndicatorHidden">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TopIndicator" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="RightIndicatorVisibilityStates">
                    <VisualState x:Name="RightIndicatorVisibile"/>
                    <VisualState x:Name="RightIndicatorHidden">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_RightIndicator" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="BottomIndicatorVisibilityStates">
                    <VisualState x:Name="BottomIndicatorVisibile"/>
                    <VisualState x:Name="BottomIndicatorHidden">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_BottomIndicator" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="CenterIndicatorVisibilityStates">
                    <VisualState x:Name="CenterIndicatorVisibile"/>
                    <VisualState x:Name="CenterIndicatorHidden">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_CenterIndicator" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid HorizontalAlignment="Center" VerticalAlignment="Center">
                <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Border x:Name="PART_LeftIndicator"
                        Grid.Row="1"
                        Width="40"
                        Height="40"
                        Background="{telerik:Windows8TouchResource ResourceKey=MainGradientBrush}"
                        BorderBrush="{telerik:Windows8TouchResource ResourceKey=MediumBrush}"
                        BorderThickness="1"
                        SnapsToDevicePixels="True">
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <Border x:Name="LeftHighlightVisual" BorderThickness="1 4 1 1" BorderBrush="{telerik:Windows8TouchResource ResourceKey=HighBrush}" Height="24" Width="12" Margin="0"/>
                        <Path x:Name="LeftPlacementIndicator"
                                Fill="{telerik:Windows8TouchResource ResourceKey=InvertedBrush}"
                                Data="M0,5.5 L5,0 5,10Z"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Margin="6 0 0 0"/>
                    </StackPanel>
                </Border>
                <Border x:Name="PART_RightIndicator"
                        Grid.Row="1"
                        Grid.Column="2"
                        Width="40"
                        Height="40"
                        Background="{telerik:Windows8TouchResource ResourceKey=MainGradientBrush}"
                        BorderBrush="{telerik:Windows8TouchResource ResourceKey=MediumBrush}"
                        BorderThickness="1"
                        SnapsToDevicePixels="True">
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <Path x:Name="RightPlacementIndicator"
                                Fill="{telerik:Windows8TouchResource ResourceKey=InvertedBrush}"
                                Data="M0,0 L5,5.5 0,10Z"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Margin="0 0 6 0"/>
                        <Border x:Name="RightHighlightVisual"
                                BorderThickness="1 4 1 1"
                                BorderBrush="{telerik:Windows8TouchResource ResourceKey=HighBrush}"
                                Height="24"
                                Width="12"
                                Margin="0 1 1 1"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"/>
                    </StackPanel>
                </Border>
                <Border x:Name="PART_BottomIndicator"
                        Grid.Row="2"
                        Grid.Column="1"
                        Width="40"
                        Height="40"
                        Background="{telerik:Windows8TouchResource ResourceKey=MainGradientBrush}"
                        BorderBrush="{telerik:Windows8TouchResource ResourceKey=MediumBrush}"
                        BorderThickness="1"
                        SnapsToDevicePixels="True">
                    <StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <Path x:Name="BottomPlacementIndicator"
                                Fill="{telerik:Windows8TouchResource ResourceKey=InvertedBrush}"
                                Data="M0,0 L10,0 5,5Z"
                                HorizontalAlignment="Center"
                                Margin="0 0 0 6"/>
                        <Border x:Name="BottomHighlightVisual"
                                BorderThickness="1 4 1 1"
                                BorderBrush="{telerik:Windows8TouchResource ResourceKey=HighBrush}"
                                Height="12"
                                Width="24"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Margin="1 1 1 0"/>
                    </StackPanel>
                </Border>
                <Border x:Name="PART_TopIndicator"
                        Grid.Column="1"
                        Width="40"
                        Height="40"
                        Background="{telerik:Windows8TouchResource ResourceKey=MainGradientBrush}"
                        BorderBrush="{telerik:Windows8TouchResource ResourceKey=MediumBrush}"
                        BorderThickness="1"
                        SnapsToDevicePixels="True">
                    <StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <Border x:Name="TopHighlightVisual" BorderThickness="1 4 1 1" BorderBrush="{telerik:Windows8TouchResource ResourceKey=HighBrush}" Height="12" Width="24" Margin="1 1 1 0"/>
                        <Path x:Name="TopPlacementIndicator" Fill="{telerik:Windows8TouchResource ResourceKey=InvertedBrush}" Data="M0,5 L5,0 10,5Z" HorizontalAlignment="Center" Margin="0 6 0 0"/>
                    </StackPanel>
                </Border>
                <Border x:Name="PART_CenterIndicator"
                        Grid.Row="1"
                        Grid.Column="1"
                        Width="40"
                        Height="40"
                        Background="{telerik:Windows8TouchResource ResourceKey=MainGradientBrush}"
                        BorderBrush="{telerik:Windows8TouchResource ResourceKey=MediumBrush}"
                        BorderThickness="1"
                        Margin="2"
                        SnapsToDevicePixels="True">
                    <Border x:Name="CenterHighlightVisual"
                            BorderThickness="1 4 1 1"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            BorderBrush="{telerik:Windows8TouchResource ResourceKey=HighBrush}"
                            Height="24"
                            Width="24"
                            Margin="7"/>
                </Border>
            </Grid>
        </Border>
    </ControlTemplate>
    <Style x:Key="CompassStyle" TargetType="dock:Compass">
        <Setter Property="Background" Value="{x:Null}"/>
        <Setter Property="BorderBrush" Value="{x:Null}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Template" Value="{StaticResource CompassControlTemplate}"/>
    </Style>
    <ControlTemplate x:Key="RootCompassControlTemplate" TargetType="dock:Compass">
        <Grid x:Name="VisualRoot">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="HighlightLeftIndicator">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_LeftIndicator" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Windows8TouchResource ResourceKey=MainBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftHighlightVisual" Storyboard.TargetProperty="BorderBrush">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Windows8TouchResource ResourceKey=AccentBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftPlacementIndicator" Storyboard.TargetProperty="Fill">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Windows8TouchResource ResourceKey=AccentBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="HighlightTopIndicator">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TopIndicator" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Windows8TouchResource ResourceKey=MainBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopHighlightVisual" Storyboard.TargetProperty="BorderBrush">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Windows8TouchResource ResourceKey=AccentBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopPlacementIndicator" Storyboard.TargetProperty="Fill">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Windows8TouchResource ResourceKey=AccentBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="HighlightRightIndicator">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_RightIndicator" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Windows8TouchResource ResourceKey=MainBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RightHighlightVisual" Storyboard.TargetProperty="BorderBrush">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Windows8TouchResource ResourceKey=AccentBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RightPlacementIndicator" Storyboard.TargetProperty="Fill">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Windows8TouchResource ResourceKey=AccentBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="HighlightBottomIndicator">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_BottomIndicator" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Windows8TouchResource ResourceKey=MainBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BottomHighlightVisual" Storyboard.TargetProperty="BorderBrush">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Windows8TouchResource ResourceKey=AccentBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BottomPlacementIndicator" Storyboard.TargetProperty="Fill">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Windows8TouchResource ResourceKey=AccentBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="LeftIndicatorVisibilityStates">
                    <VisualState x:Name="LeftIndicatorVisibile"/>
                    <VisualState x:Name="LeftIndicatorHidden">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_LeftIndicator" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="TopIndicatorVisibilityStates">
                    <VisualState x:Name="TopIndicatorVisibile"/>
                    <VisualState x:Name="TopIndicatorHidden">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TopIndicator" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="RightIndicatorVisibilityStates">
                    <VisualState x:Name="RightIndicatorVisibile"/>
                    <VisualState x:Name="RightIndicatorHidden">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_RightIndicator" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="BottomIndicatorVisibilityStates">
                    <VisualState x:Name="BottomIndicatorVisibile"/>
                    <VisualState x:Name="BottomIndicatorHidden">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_BottomIndicator" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="PART_LeftIndicator"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Center"
                    Width="40"
                    Height="40"
                    Background="{telerik:Windows8TouchResource ResourceKey=MainGradientBrush}"
                    BorderBrush="{telerik:Windows8TouchResource ResourceKey=MediumBrush}"
                    BorderThickness="1"
                    SnapsToDevicePixels="True">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                    <Border x:Name="LeftHighlightVisual" BorderThickness="1 4 1 1" BorderBrush="{telerik:Windows8TouchResource ResourceKey=HighBrush}" Height="24" Width="12" Margin="0"/>
                    <Path x:Name="LeftPlacementIndicator"
                            Fill="{telerik:Windows8TouchResource ResourceKey=InvertedBrush}"
                            Data="M0,5.5 L5,0 5,10Z"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Margin="6 0 0 0"/>
                </StackPanel>
            </Border>
            <Border x:Name="PART_RightIndicator"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Center"
                    Grid.Column="2"
                    Width="40"
                    Height="40"
                    Background="{telerik:Windows8TouchResource ResourceKey=MainGradientBrush}"
                    BorderBrush="{telerik:Windows8TouchResource ResourceKey=MediumBrush}"
                    BorderThickness="1"
                    SnapsToDevicePixels="True">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                    <Path x:Name="RightPlacementIndicator"
                            Fill="{telerik:Windows8TouchResource ResourceKey=InvertedBrush}"
                            Data="M0,0 L5,5.5 0,10Z"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Margin="0 0 6 0"/>
                    <Border x:Name="RightHighlightVisual"
                            BorderThickness="1 4 1 1"
                            BorderBrush="{telerik:Windows8TouchResource ResourceKey=HighBrush}"
                            Height="24"
                            Width="12"
                            Margin="0 1 1 1"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"/>
                </StackPanel>
            </Border>
            <Border x:Name="PART_BottomIndicator"
                    VerticalAlignment="Bottom"
                    HorizontalAlignment="Center"
                    Grid.Column="1"
                    Width="40"
                    Height="40"
                    Background="{telerik:Windows8TouchResource ResourceKey=MainGradientBrush}"
                    BorderBrush="{telerik:Windows8TouchResource ResourceKey=MediumBrush}"
                    BorderThickness="1"
                    SnapsToDevicePixels="True">
                <StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
                    <Path x:Name="BottomPlacementIndicator"
                            Fill="{telerik:Windows8TouchResource ResourceKey=InvertedBrush}"
                            Data="M0,0 L10,0 5,5Z"
                            HorizontalAlignment="Center"
                            Margin="0 0 0 6"/>
                    <Border x:Name="BottomHighlightVisual"
                            BorderThickness="1 4 1 1"
                            BorderBrush="{telerik:Windows8TouchResource ResourceKey=HighBrush}"
                            Height="12"
                            Width="24"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Margin="1 1 1 0"/>
                </StackPanel>
            </Border>
            <Border x:Name="PART_TopIndicator"
                    VerticalAlignment="Top"
                    HorizontalAlignment="Center"
                    Width="40"
                    Height="40"
                    Background="{telerik:Windows8TouchResource ResourceKey=MainGradientBrush}"
                    BorderBrush="{telerik:Windows8TouchResource ResourceKey=MediumBrush}"
                    BorderThickness="1"
                    SnapsToDevicePixels="True">
                <StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
                    <Border x:Name="TopHighlightVisual" BorderThickness="1 4 1 1" BorderBrush="{telerik:Windows8TouchResource ResourceKey=HighBrush}" Height="12" Width="24" Margin="1 1 1 0"/>
                    <Path x:Name="TopPlacementIndicator" Fill="{telerik:Windows8TouchResource ResourceKey=InvertedBrush}" Data="M0,5 L5,0 10,5Z" HorizontalAlignment="Center" Margin="0 6 0 0"/>
                </StackPanel>
            </Border>
        </Grid>
    </ControlTemplate>
    <Style x:Key="RootCompassStyle" TargetType="dock:RootCompass">
        <Setter Property="Template" Value="{StaticResource RootCompassControlTemplate}"/>
    </Style>
    <ControlTemplate x:Key="VisualCueControlTemplate" TargetType="dock:VisualCue">
        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Border Background="{TemplateBinding Background}" Opacity="0.2"/>
        </Border>
    </ControlTemplate>
    <Style x:Key="VisualCueStyle" TargetType="dock:VisualCue">
        <Setter Property="Background" Value="{telerik:Windows8TouchResource ResourceKey=AccentBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik:Windows8TouchResource ResourceKey=AccentBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Template" Value="{StaticResource VisualCueControlTemplate}"/>
    </Style>
    <Style x:Key="DocumentHostStyle" TargetType="dock:DocumentHost">
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="MinWidth" Value="40"/>
        <Setter Property="MinHeight" Value="40"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="dock:DocumentHost">
                    <Border
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Padding="{TemplateBinding Padding}">
                        <ContentPresenter
                                ContentTemplate="{TemplateBinding ContentTemplate}"
                                Content="{TemplateBinding Content}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="RadDockingControlTemplate" TargetType="local:RadDocking">
        <Grid x:Name="Root">
            <Border x:Name="Border"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Padding="{TemplateBinding Padding}">
                <telerik:RadDockPanel x:Name="RootDockPanel">
                    <dock:AutoHideArea x:Name="LeftAutoHide" telerik:RadDockPanel.Dock="Left" TabStripPlacement="Left" BackgroundVisibility="Collapsed" TabOrientation="Vertical"/>
                    <dock:AutoHideArea x:Name="RightAutoHide" telerik:RadDockPanel.Dock="Right" TabStripPlacement="Right" BackgroundVisibility="Collapsed" TabOrientation="Vertical"/>
                    <dock:AutoHideArea x:Name="TopAutoHide" telerik:RadDockPanel.Dock="Top" TabStripPlacement="Top" BackgroundVisibility="Collapsed" TabOrientation="Horizontal"/>
                    <dock:AutoHideArea x:Name="BottomAutoHide" telerik:RadDockPanel.Dock="Bottom" TabStripPlacement="Bottom" BackgroundVisibility="Collapsed" TabOrientation="Horizontal"/>
                    <local:DockingPanel x:Name="ContentDockPanel" Margin="1">
                        <dock:DocumentHost x:Name="DocumentHost" IsTabStop="{TemplateBinding IsTabStop}"/>
                    </local:DockingPanel>
                </telerik:RadDockPanel>
            </Border>
        </Grid>
    </ControlTemplate>
    <telerikAnimation:AnimationSelector x:Key="RadDockingAnimationSelector">
        <telerikAnimation:AnimationGroup AnimationName="Move">
            <telerikAnimation:MoveAnimation/>
            <telerikAnimation:ResizeAnimation/>
            <telerikAnimation:FadeAnimation Direction="In"/>
            <telerikAnimation:ScaleAnimation Direction="In" MinScale="0.7" MaxScale="1.0"/>
        </telerikAnimation:AnimationGroup>
        <telerikAnimation:AnimationGroup AnimationName="Show">
            <telerikAnimation:FadeAnimation Direction="In"/>
            <telerikAnimation:ScaleAnimation Direction="In" MinScale="0.95" MaxScale="1.0"/>
        </telerikAnimation:AnimationGroup>
        <telerikAnimation:AnimationGroup AnimationName="Hide" SpeedRatio="0.7">
            <telerikAnimation:FadeAnimation Direction="Out"/>
            <telerikAnimation:ScaleAnimation Direction="Out" MinScale="0.7" MaxScale="1.0"/>
        </telerikAnimation:AnimationGroup>
        <telerikAnimation:AnimationGroup AnimationName="LeftIn">
            <telerikAnimation:SlideAnimation SlideMode="Top" Duration="{StaticResource AutoHideInAnimationDuration}" TargetElementName="PopupChild" Orientation="Horizontal" Direction="In"/>
        </telerikAnimation:AnimationGroup>
        <telerikAnimation:AnimationGroup AnimationName="LeftOut">
            <telerikAnimation:SlideAnimation TargetElementName="PopupChild" SlideMode="Top" Duration="{StaticResource AutoHideOutAnimationDuration}" Orientation="Horizontal" Direction="Out"/>
        </telerikAnimation:AnimationGroup>
        <telerikAnimation:AnimationGroup AnimationName="TopIn">
            <telerikAnimation:SlideAnimation Orientation="Vertical" Duration="{StaticResource AutoHideInAnimationDuration}" TargetElementName="PopupChild" Direction="In"/>
        </telerikAnimation:AnimationGroup>
        <telerikAnimation:AnimationGroup AnimationName="TopOut">
            <telerikAnimation:SlideAnimation TargetElementName="PopupChild" Duration="{StaticResource AutoHideOutAnimationDuration}" Orientation="Vertical" Direction="Out"/>
        </telerikAnimation:AnimationGroup>
        <telerikAnimation:AnimationGroup AnimationName="RightIn">
            <telerikAnimation:SlideAnimation SlideMode="Bottom" TargetElementName="PopupChild" Duration="{StaticResource AutoHideInAnimationDuration}" Orientation="Horizontal" Direction="In"/>
        </telerikAnimation:AnimationGroup>
        <telerikAnimation:AnimationGroup AnimationName="RightOut">
            <telerikAnimation:SlideAnimation TargetElementName="PopupChild" SlideMode="Bottom" Duration="{StaticResource AutoHideOutAnimationDuration}" Orientation="Horizontal" Direction="Out"/>
        </telerikAnimation:AnimationGroup>
        <telerikAnimation:AnimationGroup AnimationName="BottomIn">
            <telerikAnimation:SlideAnimation SlideMode="Bottom" Duration="{StaticResource AutoHideInAnimationDuration}" Orientation="Vertical" TargetElementName="PopupChild" Direction="In"/>
        </telerikAnimation:AnimationGroup>
        <telerikAnimation:AnimationGroup AnimationName="BottomOut">
            <telerikAnimation:SlideAnimation Duration="{StaticResource AutoHideOutAnimationDuration}" TargetElementName="PopupChild" Direction="Out" Orientation="Vertical" SlideMode="Bottom"/>
        </telerikAnimation:AnimationGroup>
    </telerikAnimation:AnimationSelector>
    <Style x:Key="RadDockingStyle" TargetType="local:RadDocking">
        <Setter Property="VisualCueStyle" Value="{StaticResource VisualCueStyle}"/>
        <Setter Property="Background" Value="{telerik:Windows8TouchResource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik:Windows8TouchResource ResourceKey=LowBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="1"/>
        <Setter Property="Template" Value="{StaticResource RadDockingControlTemplate}"/>
        <Setter Property="CompassStyle" Value="{StaticResource CompassStyle}"/>
        <Setter Property="RootCompassStyle" Value="{StaticResource RootCompassStyle}"/>
        <Setter Property="telerikAnimation:AnimationManager.AnimationSelector" Value="{StaticResource RadDockingAnimationSelector}"/>
    </Style>
    <Style TargetType="local:RadPane" BasedOn="{StaticResource RadPaneStyle}"/>
    <Style TargetType="local:RadDocumentPane" BasedOn="{StaticResource RadPaneStyle}"/>
    <Style TargetType="dock:RadGridResizer" BasedOn="{StaticResource RadGridResizerStyle}"/>
    <Style TargetType="local:RadSplitContainer" BasedOn="{StaticResource RadSplitContainerStyle}"/>
    <Style TargetType="dock:PaneHeader" BasedOn="{StaticResource PaneHeaderStyle}"/>
    <Style TargetType="local:RadPaneGroup" BasedOn="{StaticResource RadPaneGroupStyle}"/>
    <Style TargetType="dock:ToolWindow" BasedOn="{StaticResource ToolWindowStyle}"/>
    <Style TargetType="dock:Compass" BasedOn="{StaticResource CompassStyle}"/>
    <Style TargetType="dock:RootCompass" BasedOn="{StaticResource RootCompassStyle}"/>
    <Style TargetType="dock:VisualCue" BasedOn="{StaticResource VisualCueStyle}"/>
    <Style TargetType="dock:DocumentHost" BasedOn="{StaticResource DocumentHostStyle}"/>
    <Style TargetType="local:RadDocking" BasedOn="{StaticResource RadDockingStyle}"/>
</ResourceDictionary>
