	  
	   
    
		

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:System="clr-namespace:System;assembly=mscorlib" xmlns:c1="clr-namespace:C1.WPF;assembly=C1.WPF.4" xmlns:c1_Resources="clr-namespace:C1.Silverlight.Resources;assembly=C1.WPF.4" xmlns:c1Docking="clr-namespace:C1.WPF.Docking" xmlns:c1Docking_resources="clr-namespace:C1.Silverlight.Docking.Resources" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006">
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/C1.WPF.4;component/themes/Common.xaml" />
        <ResourceDictionary Source="/C1.WPF.4;component/themes/C1TabControl.xaml" />
        <ResourceDictionary Source="/C1.WPF.4;component/themes/C1Button.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <c1_Resources:C1_Silverlight x:Key="c1_Resources" />
    <c1Docking_resources:C1_Silverlight_Docking x:Key="DockingResources" />

    <!--******************* C1DockingMenu ********************-->

    <!-- CornerRadius @ C1Menu -->
    <CornerRadius x:Key="MenuCornerRadius">1</CornerRadius>
    <!-- CornerRadius @ C1Menu SubItem -->
    <CornerRadius x:Key="MenuSubItemCornerRadius">0</CornerRadius>
    <!-- CornerRadius @ C1MenuItem -->

    <!-- Brush @ C1Menu SubItem Background-->
    <SolidColorBrush x:Key="MenuSubItemBackgroundBrush" Color="#FFF5F7F9" />
    <!-- Brush @ C1Menu SubItem Left Panel Background-->
    <SolidColorBrush x:Key="MenuSubItemLeftPanelBackgroundBrush" Color="#FFE9EFF5" />

    <!-- BorderThickness @ C1MenuItem -->
    <Thickness x:Key="MenuItemBorderThickness">1</Thickness>

    <!--******************** C1DockWindow ********************-->

    <!-- Brush @ C1Window Background -->
    <LinearGradientBrush x:Key="WindowBackgroundBrush" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFE2E8EE" />
        <GradientStop Color="#FFF5F7F9" Offset="0.5" />
        <GradientStop Color="#FFBBCAD7" Offset="1" />
    </LinearGradientBrush>

    <!-- CornerRadius @ C1Window -->
    <CornerRadius x:Key="WindowCornerRadius">3</CornerRadius>
    <!-- CornerRadius @ C1Window Header -->
    <CornerRadius x:Key="WindowHeaderCornerRadius">3 3 0 0</CornerRadius>
    <!-- CornerRadius @ C1Window Buttons -->
    <CornerRadius x:Key="WindowButtonsCornerRadius">1</CornerRadius>

    <!-- Brush @ C1Window Button Icon Background -->
    <SolidColorBrush x:Key="WindowIconBackgroundBrush" Color="White" />

    <!-- C1DockWindow Style -->
    <Style TargetType="c1Docking:C1DockWindow">
        <Setter Property="IsEnabled" Value="True" />
        <Setter Property="Cursor" Value="Arrow" />
        <Setter Property="ModalBackground" Value="#28000000" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="HorizontalAlignment" Value="Center" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="Padding" Value="2" />
        <Setter Property="ShowMinimizeButton" Value="False" />
        <Setter Property="ShowMaximizeButton" Value="False" />
        <Setter Property="ShowCloseButton" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="c1:C1Window">
                    <Grid x:Name="Root" MinWidth="70" MinHeight="26">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="ActiveStates">
                                <VisualState x:Name="Inactive">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="InactiveShade" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Active" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ContentTypeStates">
                                <VisualState x:Name="Tab">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Drag" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Group" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <c1:C1BrushBuilder x:Name="BackgroundBrush" Input="{TemplateBinding Background}" DesignBrush="{StaticResource WindowBackgroundBrush}" DesignColor="{StaticResource BaseColor}" />
                        <c1:C1BrushBuilder x:Name="HeaderBackgroundBrush" Input="{TemplateBinding HeaderBackground}" DesignBrush="{StaticResource GeneralGradientBrush}" DesignColor="{StaticResource BaseColor}" />
                        <Border x:Name="BackgroundElement" Grid.RowSpan="2" Background="{Binding ElementName=BackgroundBrush, Path=Output}" BorderThickness="1" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="{StaticResource WindowCornerRadius}" />
                        <Grid Margin="1">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition />
                            </Grid.RowDefinitions>
                            <Border x:Name="HeaderBackground" Background="{Binding ElementName=HeaderBackgroundBrush, Path=Output}" CornerRadius="{StaticResource WindowHeaderCornerRadius}" />
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <Grid x:Name="Drag" Margin="{TemplateBinding BorderThickness}" MinHeight="20">
                                    <Border Background="Transparent" />
                                    <ContentControl IsTabStop="False" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}" FontFamily="{TemplateBinding HeaderFontFamily}" FontSize="{TemplateBinding HeaderFontSize}" FontStretch="{TemplateBinding HeaderFontStretch}" FontStyle="{TemplateBinding HeaderFontStyle}" FontWeight="{TemplateBinding HeaderFontWeight}" Foreground="{TemplateBinding HeaderForeground}" HorizontalContentAlignment="{TemplateBinding HorizontalHeaderAlignment}" VerticalContentAlignment="{TemplateBinding VerticalHeaderAlignment}" Padding="{TemplateBinding HeaderPadding}">
                                        <ContentPresenter x:Name="HeaderPresenter" ContentTemplate="{TemplateBinding HeaderTemplate}" />
                                    </ContentControl>
                                </Grid>
                            </Grid>
                            <Grid x:Name="ContentGrid" Grid.Row="1">
                                <ContentPresenter x:Name="Content" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Cursor="{TemplateBinding Cursor}" />
                            </Grid>
                            <Border x:Name="InactiveShade" IsHitTestVisible="False" Background="{StaticResource DisabledBrush}" CornerRadius="{StaticResource WindowCornerRadius}" Grid.RowSpan="2" Visibility="Collapsed" />
                            <Border x:Name="Resize" BorderThickness="7" BorderBrush="Transparent" Grid.RowSpan="2" />
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    
    <Style TargetType="c1Docking:WPFWindow">
        <Setter Property="IsEnabled" Value="True" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="c1Docking:WPFWindow">
                    <AdornerDecorator>
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="*" />
                            </Grid.RowDefinitions>
                            <c1:C1BrushBuilder x:Name="HeaderBackgroundBrush" DesignBrush="{StaticResource GeneralGradientBrush}" DesignColor="{StaticResource BaseColor}" />
                            <Border x:Name="CommonHeaderContainer" Visibility="{Binding ShowHeader, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource visibilityConverter}}" Background="{Binding ElementName=HeaderBackgroundBrush, Path=Output}" BorderBrush="{StaticResource WpfInputBorderBrush}" BorderThickness="1,1,1,0">
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <ContentControl Margin="4" IsTabStop="False" Content="{TemplateBinding Content}" />
                                    <Button x:Name="HiddenButton" Margin="2 0" Height="15" Width="15" Style="{StaticResource ClearStyleButtonStyle}" c1:ClearStyleExtensions.CornerRadius="0" Background="Transparent" Foreground="{TemplateBinding Foreground}" BorderBrush="Transparent" BorderThickness="0" VerticalAlignment="Center" HorizontalAlignment="Right" ToolTipService.ToolTip="{Binding Source={StaticResource DockingResources}, Path=MakeHidden}">
                                        <Path x:Name="HiddenButtonContent" Fill="{StaticResource ForegroundTextBoxBrushColor}" Stretch="Fill" Data="M0,0 L1.6,0 L3,1.56 L4.4,0 L6,0 L3.8,2.5 L6,5 L4.4,5 L3,3.49 L1.59,5 L-4.2E-09,5 L2.18,2.5 z" Width="7" Height="5" />
                                    </Button>
                                </Grid>
                            </Border>
                            <Grid x:Name="ResizeGrid" Grid.Row="1">
                                <Grid.RowDefinitions>
                                    <RowDefinition x:Name="row_Top" Height="5" />
                                    <RowDefinition x:Name="row_Middle" Height="*" />
                                    <RowDefinition x:Name="row_Bottom" Height="5" />
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition x:Name="col_Left" Width="5" />
                                    <ColumnDefinition x:Name="col_Middle" Width="*" />
                                    <ColumnDefinition x:Name="col_Right" Width="5" />
                                </Grid.ColumnDefinitions>
                                <Border x:Name="ContentBorder" Height="auto" Width="auto" Grid.Column="0" Grid.Row="0" Grid.RowSpan="3" Grid.ColumnSpan="3" Background="{StaticResource WpfInputBaseBrush}" BorderThickness="1" BorderBrush="{StaticResource WpfInputBorderBrush}" CornerRadius="{StaticResource WindowCornerRadius}" />
                                <Rectangle x:Name="RectTopLeft" Cursor="SizeNWSE" Fill="Transparent" Canvas.ZIndex="100" Grid.Column="0" Grid.Row="0" />
                                <Rectangle x:Name="RectTopMiddle" Cursor="SizeNS" Fill="Transparent" Canvas.ZIndex="100" Grid.Column="1" Grid.Row="0" />
                                <Rectangle x:Name="RectTopRight" Cursor="SizeNESW" Fill="Transparent" Canvas.ZIndex="100" Grid.Column="2" Grid.Row="0" />
                                <Rectangle x:Name="RectMiddleLeft" Cursor="SizeWE" Fill="Transparent" Canvas.ZIndex="100" Grid.Column="0" Grid.Row="1" />
                                <Rectangle x:Name="RectMiddleRight" Cursor="SizeWE" Fill="Transparent" Canvas.ZIndex="100" Grid.Column="2" Grid.Row="1" />
                                <Rectangle x:Name="RectBottomLeft" Cursor="SizeNESW" Fill="Transparent" Canvas.ZIndex="100" Grid.Column="0" Grid.Row="2" />
                                <Rectangle x:Name="RectBottomMiddle" Cursor="SizeNS" Fill="Transparent" Canvas.ZIndex="100" Grid.Column="1" Grid.Row="2" />
                                <Rectangle x:Name="RectBottomRight" Cursor="SizeNWSE" Fill="Transparent" Canvas.ZIndex="100" Grid.Column="2" Grid.Row="2" />
                            </Grid>
                        </Grid>
                    </AdornerDecorator>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--******************* C1DockSplitter ********************-->

    <!-- Style @ C1DockSplitter (min size) -->
    <Style x:Key="DockControlSplitterStyle" TargetType="Border">
        <Setter Property="MinWidth" Value="4" />
        <Setter Property="MinHeight" Value="4" />
    </Style>

    <!-- Brush @ C1DockSplitter Background -->
    <SolidColorBrush x:Key="DockControlSplitterBackgroundBrush" Color="#FFD1DCE8" />

    <!-- C1DockSplitter Style -->
    <Style TargetType="c1Docking:C1DockSplitter">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="c1Docking:C1DockSplitter">
                    <Grid x:Name="Root">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="OrientationStates">
                                <VisualState x:Name="Horizontal">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Cursor">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Cursor>SizeWE</Cursor>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Vertical">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Cursor">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Cursor>SizeNS</Cursor>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <c1:C1BrushBuilder x:Name="BackgroundBrush" Input="{TemplateBinding Background}" DesignBrush="{StaticResource DockControlSplitterBackgroundBrush}" DesignColor="{StaticResource BaseColor}" />
                        <Border Background="{Binding ElementName=BackgroundBrush, Path=Output}" Style="{StaticResource DockControlSplitterStyle}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--******************* C1DockPreview ********************-->

    <!-- C1DockPreview Style -->
    <Style TargetType="c1Docking:C1DockPreview">
        <Setter Property="IsEnabled" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="c1Docking:C1DockPreview">
                    <Grid Opacity="0.5">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="PreviewStates">
                                <VisualState x:Name="PreviewNone" />
                                <VisualState x:Name="PreviewLeft">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="PreviewLeftElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="PreviewTop">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="PreviewTopElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="PreviewRight">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="PreviewRightElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="PreviewBottom">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="PreviewBottomElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="PreviewOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="PreviewOverElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid x:Name="PreviewLeftElement" Visibility="Collapsed">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="2*" />
                                <ColumnDefinition Width="3*" />
                            </Grid.ColumnDefinitions>
                            <Rectangle Grid.Column="0" Fill="{StaticResource SelectedBackground}" />
                        </Grid>
                        <Grid x:Name="PreviewTopElement" Visibility="Collapsed">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="2*" />
                                <RowDefinition Height="3*" />
                            </Grid.RowDefinitions>
                            <Rectangle Grid.Row="0" Fill="{StaticResource SelectedBackground}" />
                        </Grid>
                        <Grid x:Name="PreviewRightElement" Visibility="Collapsed">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="3*" />
                                <ColumnDefinition Width="2*" />
                            </Grid.ColumnDefinitions>
                            <Rectangle Grid.Column="1" Fill="{StaticResource SelectedBackground}" />
                        </Grid>
                        <Grid x:Name="PreviewBottomElement" Visibility="Collapsed">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="3*" />
                                <RowDefinition Height="2*" />
                            </Grid.RowDefinitions>
                            <Rectangle Grid.Row="1" Fill="{StaticResource SelectedBackground}" />
                        </Grid>
                        <Rectangle x:Name="PreviewOverElement" Visibility="Collapsed" Fill="{StaticResource SelectedBackground}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--Brush @ C1DockPickerPart Icon Border -->
    <SolidColorBrush x:Key="DockPickerPartIconBorderBrush" Color="#FF999999" />

    <!-- C1DockPickerPart Style -->
    <Style TargetType="c1Docking:C1DockPickerPart">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="c1Docking:C1DockPickerPart">
                    <Grid Margin="2">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="DragOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundElement" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Null}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="MouseOverElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="LeftRectangleOver" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="TopRectangleOver" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="RightRectangleOver" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="BottomRectangleOver" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="OverRectangleOver" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="DropPositionStates">
                                <VisualState x:Name="DropPositionNull" />
                                <VisualState x:Name="DropPositionLeft">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="LeftContent" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="DropPositionTop">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="TopContent" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="DropPositionRight">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="RightContent" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="DropPositionBottom">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="BottomContent" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="DropPositionOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="OverContent" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <c1:C1BrushBuilder x:Name="BackgroundBrush" Input="{TemplateBinding Background}" DesignBrush="{StaticResource GeneralGradientBrush}" DesignColor="{StaticResource BaseColor}" />
                        <c1:C1BrushBuilder x:Name="MouseOverBrush" Input="{TemplateBinding c1:ClearStyleExtensions.MouseOverBrush}" DesignBrush="{StaticResource GeneralGradientOverBrush}" DesignColor="{StaticResource MouseOverColor}" />
                        <c1:C1BrushBuilder x:Name="PickerBorderBrush" Input="{TemplateBinding Foreground}" DesignBrush="{StaticResource DockPickerPartIconBorderBrush}" DesignColor="{StaticResource ForegroundColor}" />
                        <Border x:Name="BackgroundElement" Width="30" Height="30" Background="{Binding ElementName=BackgroundBrush, Path=Output}" BorderBrush="{StaticResource WpfInputBorderBrush}" BorderThickness="{StaticResource GeneralThickness}" CornerRadius="{StaticResource GeneralCornerRadius}" />
                        <Border x:Name="MouseOverElement" Width="30" Height="30" Background="{Binding ElementName=MouseOverBrush, Path=Output}" BorderBrush="{StaticResource WpfInputBorderBrush}" BorderThickness="{StaticResource GeneralThickness}" CornerRadius="{StaticResource GeneralCornerRadius}" Visibility="Collapsed" />
                        <Grid HorizontalAlignment="Center" VerticalAlignment="Center">
                            <Grid x:Name="LeftContent" Width="24" Height="24" Visibility="Collapsed">
                                <Path Data="M 4.5,1.5 L 1,5 L 4.5,8" StrokeThickness="2" Stroke="{TemplateBinding Foreground}" VerticalAlignment="Center" HorizontalAlignment="Center" />
                                <Rectangle x:Name="LeftRectangleOver" Fill="{StaticResource SelectedBackground}" HorizontalAlignment="Left" Width="4" Visibility="Collapsed" />
                                <Rectangle x:Name="LeftRectangle" Stroke="{Binding ElementName=PickerBorderBrush, Path=Output}" StrokeThickness="1" HorizontalAlignment="Left" Width="4" />
                            </Grid>
                            <Grid x:Name="TopContent" Visibility="Collapsed" Width="24" Height="24">
                                <Path Data="M 1,4.5 L 4.5,1 L 8,4.5" StrokeThickness="2" Stroke="{TemplateBinding Foreground}" HorizontalAlignment="Center" VerticalAlignment="Center" />
                                <Rectangle x:Name="TopRectangleOver" Fill="{StaticResource SelectedBackground}" VerticalAlignment="Top" Height="4" Visibility="Collapsed" />
                                <Rectangle x:Name="TopRectangle" Stroke="{Binding ElementName=PickerBorderBrush, Path=Output}" StrokeThickness="1" VerticalAlignment="Top" Height="4" />
                            </Grid>
                            <Grid x:Name="RightContent" Visibility="Collapsed" Width="24" Height="24">
                                <Path Data="M 1,1.5 L 4.5,5 L 1,8" StrokeThickness="2" Stroke="{TemplateBinding Foreground}" HorizontalAlignment="Center" VerticalAlignment="Center" />
                                <Rectangle x:Name="RightRectangleOver" Fill="{StaticResource SelectedBackground}" Width="4" HorizontalAlignment="Right" Visibility="Collapsed" />
                                <Rectangle x:Name="RightRectangle" Stroke="{Binding ElementName=PickerBorderBrush, Path=Output}" StrokeThickness="1" Width="4" HorizontalAlignment="Right" />
                            </Grid>
                            <Grid x:Name="BottomContent" Visibility="Collapsed" Width="24" Height="24">
                                <Path Data="M 1,1.5 L 4.5,5 L 8,1.5" StrokeThickness="2" Stroke="{TemplateBinding Foreground}" HorizontalAlignment="Center" VerticalAlignment="Center" />
                                <Rectangle x:Name="BottomRectangleOver" Fill="{StaticResource SelectedBackground}" Height="4" VerticalAlignment="Bottom" Visibility="Collapsed" />
                                <Rectangle x:Name="BottomRectangle" Stroke="{Binding ElementName=PickerBorderBrush, Path=Output}" StrokeThickness="1" Height="4" VerticalAlignment="Bottom" />
                            </Grid>
                        </Grid>
                        <Grid x:Name="OverContent" Height="30" Width="30" Visibility="Collapsed">
                            <Rectangle x:Name="OverRectangleOver" Fill="{StaticResource SelectedBackground}" Grid.RowSpan="2" Grid.ColumnSpan="3" Margin="3" Visibility="Collapsed" />
                            <Rectangle x:Name="OverRectangle" Stroke="{Binding ElementName=PickerBorderBrush, Path=Output}" StrokeThickness="1" Grid.RowSpan="2" Grid.ColumnSpan="3" Margin="3" />
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--******************* C1DockTabItem ********************-->

    <!-- C1DockTabItem Style -->
    <Style TargetType="c1Docking:C1DockTabItem">
        <Setter Property="Padding" Value="2" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="c1Docking:C1DockTabItem">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver" />
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="TabStripPlacementStates">
                                <VisualState x:Name="LeftTabStripPlacement">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="C1TabItemPresenter" Storyboard.TargetProperty="TabStripPlacement">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <c1:Dock>Left</c1:Dock>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="TopTabStripPlacement">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="C1TabItemPresenter" Storyboard.TargetProperty="TabStripPlacement">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <c1:Dock>Top</c1:Dock>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="RightTabStripPlacement">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="C1TabItemPresenter" Storyboard.TargetProperty="TabStripPlacement">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <c1:Dock>Right</c1:Dock>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="BottomTabStripPlacement">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="C1TabItemPresenter" Storyboard.TargetProperty="TabStripPlacement">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <c1:Dock>Bottom</c1:Dock>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="DockModeStates">
                                <VisualState x:Name="DockModeDocked" />
                                <VisualState x:Name="DockModeSliding">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="C1TabItemPresenter" Storyboard.TargetProperty="ShowSelectedCues">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <System:Boolean>False</System:Boolean>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="DockModeFloating" />
                            </VisualStateGroup>
                            <!-- Begin change by Eddie 9-Feb-2012 -->
                            <!-- TFS-14623, Request to provide a property to pin an individual tab items -->
                            <VisualStateGroup x:Name="PinModeStates">
                                <VisualState x:Name="Pinned">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="UnpinButton" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="UnpinButton" Storyboard.TargetProperty="IsEnabled">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <System:Boolean>True</System:Boolean>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="PinButton" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="PinButton" Storyboard.TargetProperty="IsEnabled">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <System:Boolean>False</System:Boolean>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unpinned">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="PinButton" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="PinButton" Storyboard.TargetProperty="IsEnabled">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <System:Boolean>True</System:Boolean>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="UnpinButton" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="UnpinButton" Storyboard.TargetProperty="IsEnabled">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <System:Boolean>False</System:Boolean>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <!-- End change -->
                        </VisualStateManager.VisualStateGroups>
                        <c1:C1TabItemPresenter x:Name="C1TabItemPresenter" IsSelected="{TemplateBinding IsSelected}" TabShape="{TemplateBinding TabShape}" CornerRadius="4" BorderThickness="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource sideThicknessConverter}, ConverterParameter=left-top-right}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" MouseOverBrush="{TemplateBinding MouseOverBrush}" SelectedBackground="{TemplateBinding SelectedBackground}" PressedBrush="{TemplateBinding PressedBrush}" Padding="{TemplateBinding Padding}">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition />
                                    <ColumnDefinition Width="Auto" />

                                </Grid.ColumnDefinitions>
                                <ContentPresenter Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                                <!-- Begin change by Eddie 9-Feb-2012 -->
                                <!-- TFS-14623, Request to provide a property to pin an individual tab items -->
                                <StackPanel Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal" Margin="6 0 -6 0">
                                    <StackPanel x:Name="StackPanelPinButtons" HorizontalAlignment="Right" Orientation="Horizontal">
                                        <Button x:Name="UnpinButton" Height="14" Width="14" Padding="0" Style="{StaticResource ClearStyleButtonStyle}" c1:ClearStyleExtensions.MouseOverBrush="{TemplateBinding MouseOverBrush}" c1:ClearStyleExtensions.PressedBrush="{TemplateBinding PressedBrush}" c1:ClearStyleExtensions.CornerRadius="0" Background="Transparent" Foreground="{TemplateBinding Foreground}" BorderBrush="Transparent" BorderThickness="0" VerticalAlignment="Center" HorizontalAlignment="Right" ToolTipService.ToolTip="{Binding Pin, Source={StaticResource Resources}}">
                                            <Grid x:Name="AutoHideIcon" Height="14" Width="14">
                                                <Border Background="{TemplateBinding Foreground}" CornerRadius="0,0,1,1" Height="4" Width="1" Margin="7,0,0,1" VerticalAlignment="Bottom" HorizontalAlignment="Left" />
                                                <Border BorderBrush="{TemplateBinding Foreground}" BorderThickness="1" HorizontalAlignment="Left" VerticalAlignment="Top" Width="5" Height="7" RenderTransformOrigin="0.5,0.5" CornerRadius="1,1,0,0" Margin="5,2,0,0">
                                                    <Grid>
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition />
                                                            <ColumnDefinition />
                                                        </Grid.ColumnDefinitions>
                                                        <Border Background="{TemplateBinding Foreground}" />
                                                    </Grid>
                                                </Border>
                                                <Border Background="{TemplateBinding Foreground}" CornerRadius="1" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="7" Height="1" Margin="4,0,0,5" />
                                            </Grid>
                                        </Button>
                                        <Button x:Name="PinButton" Height="14" Width="14" Padding="0" Style="{StaticResource ClearStyleButtonStyle}" c1:ClearStyleExtensions.MouseOverBrush="{TemplateBinding MouseOverBrush}" c1:ClearStyleExtensions.PressedBrush="{TemplateBinding PressedBrush}" c1:ClearStyleExtensions.CornerRadius="0" Background="Transparent" Foreground="{TemplateBinding Foreground}" BorderBrush="Transparent" BorderThickness="0" VerticalAlignment="Center" HorizontalAlignment="Right" Visibility="Collapsed" IsEnabled="False" ToolTipService.ToolTip="{Binding UnPin, Source={StaticResource Resources}}">
                                            <Grid x:Name="AutoHideIcon2" Height="14" Width="14">
                                                <Border Background="{TemplateBinding Foreground}" HorizontalAlignment="Left" VerticalAlignment="Bottom" CornerRadius="1,0,0,1" Height="1" Width="4" Margin="1,0,0,7" />
                                                <Border BorderBrush="{TemplateBinding Foreground}" BorderThickness="1" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="7" Height="5" RenderTransformOrigin="0.5,0.5" CornerRadius="0,1,1,0" Margin="0,0,1,5">
                                                    <Grid>
                                                        <Grid.RowDefinitions>
                                                            <RowDefinition />
                                                            <RowDefinition />
                                                        </Grid.RowDefinitions>
                                                        <Border Background="{TemplateBinding Foreground}" />
                                                    </Grid>
                                                </Border>
                                                <Border Background="{TemplateBinding Foreground}" CornerRadius="1" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="1" Height="7" Margin="5,0,0,4" />
                                            </Grid>
                                        </Button>
                                    </StackPanel>
                                    <Button x:Name="CloseButton" Height="16" Width="16" Style="{StaticResource ClearStyleButtonStyle}" c1:ClearStyleExtensions.MouseOverBrush="{TemplateBinding MouseOverBrush}" c1:ClearStyleExtensions.PressedBrush="{TemplateBinding PressedBrush}" c1:ClearStyleExtensions.CornerRadius="0" Background="Transparent" Foreground="{TemplateBinding Foreground}" BorderBrush="Transparent" BorderThickness="{TemplateBinding BorderThickness}" VerticalAlignment="Center" HorizontalAlignment="Right" Padding="0" ToolTipService.ToolTip="{Binding Close, Source={StaticResource Resources}}">
                                        <Grid Height="16" Width="16">
                                            <Path Data="M0,0 L1.6,0 L3,1.56 L4.4,0 L6,0 L3.8,2.5 L6,5 L4.4,5 L3,3.49 L1.59,5 L-4.2E-09,5 L2.18,2.5 z" Fill="{TemplateBinding Foreground}" Stretch="Uniform" Width="7" Height="6" VerticalAlignment="Bottom" HorizontalAlignment="Left" Margin="5,0,0,5" />
                                        </Grid>
                                    </Button>
                                </StackPanel>
                                <!-- End change -->
                            </Grid>
                        </c1:C1TabItemPresenter>
                        <Border x:Name="DisabledVisualElement" Background="{StaticResource DisabledBrush}" CornerRadius="{StaticResource GeneralCornerRadius}" IsHitTestVisible="False" Visibility="Collapsed" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--******************* C1DockTabControl ********************-->

    <!-- Brush @ C1DockTabControl Border Brush -->
    <SolidColorBrush x:Key="DockControlBorderBrush" Color="#FFD4DEE9" />


    <Style TargetType="c1Docking:C1DockOuterPicker">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="c1Docking:C1DockOuterPicker">
                    <Grid>
                        <c1Docking:C1DockPickerPart DropPosition="Left" IsOuter="True" PickerState="{TemplateBinding PickerState}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" HorizontalAlignment="Left" />
                        <c1Docking:C1DockPickerPart DropPosition="Top" IsOuter="True" PickerState="{TemplateBinding PickerState}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" VerticalAlignment="Top" />
                        <c1Docking:C1DockPickerPart DropPosition="Right" IsOuter="True" PickerState="{TemplateBinding PickerState}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" HorizontalAlignment="Right" />
                        <c1Docking:C1DockPickerPart DropPosition="Bottom" IsOuter="True" PickerState="{TemplateBinding PickerState}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" VerticalAlignment="Bottom" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <Style TargetType="c1Docking:C1DockInnerPicker">
        <Setter Property="HorizontalAlignment" Value="Center" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="c1Docking:C1DockInnerPicker">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <c1Docking:C1DockPickerPart DropPosition="Left" IsOuter="False" Grid.Row="1" PickerState="{TemplateBinding PickerState}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" />
                        <c1Docking:C1DockPickerPart DropPosition="Top" IsOuter="False" Grid.Column="1" PickerState="{TemplateBinding PickerState}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" />
                        <c1Docking:C1DockPickerPart DropPosition="Right" IsOuter="False" Grid.Column="2" Grid.Row="1" PickerState="{TemplateBinding PickerState}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" />
                        <c1Docking:C1DockPickerPart DropPosition="Bottom" IsOuter="False" Grid.Column="1" Grid.Row="2" PickerState="{TemplateBinding PickerState}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" />
                        <c1Docking:C1DockPickerPart DropPosition="Over" IsOuter="False" Grid.Column="1" Grid.Row="1" PickerState="{TemplateBinding PickerState}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- C1DockTabControl Template -->
    <Style TargetType="c1Docking:C1DockTabControl">
        <Setter Property="Padding" Value="4" />
        <!--<Setter Property="ItemContainerStyle" Value="{StaticResource C1.Silverlight.Docking.C1DockTabItem}"/>-->
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="c1Docking:C1DockTabControl">
                    <Grid x:Name="Root" Background="Transparent">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="DockModeStates">
                                <VisualState x:Name="DockModeDocked">
                                </VisualState>
                                <VisualState x:Name="DockModeSliding">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DockedButton" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DockedButton" Storyboard.TargetProperty="IsEnabled">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <System:Boolean>True</System:Boolean>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>                                                
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="SlidingButton" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="SlidingButton" Storyboard.TargetProperty="IsEnabled">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <System:Boolean>False</System:Boolean>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="LineTabItems" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="DockModeFloating">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="SlidingButton" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="SlidingButton" Storyboard.TargetProperty="IsEnabled">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <System:Boolean>False</System:Boolean>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="HeaderContainer" Storyboard.TargetProperty="BorderThickness">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Thickness>0 0 0 1</Thickness>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="SelectedTabItem" Storyboard.TargetProperty="BorderThickness">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Thickness>0 0 0 0</Thickness>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="TabStripPlacementStates">
                                <VisualState x:Name="BottomTabStripPlacement" />
                                <VisualState x:Name="LeftTabStripPlacement">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="TabPanelPresenter" Storyboard.TargetProperty="Margin">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Thickness>0 0 -1 0</Thickness>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TabPanel" Storyboard.TargetProperty="Orientation">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Orientation>Vertical</Orientation>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LineOuter" Storyboard.TargetProperty="Orientation">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Orientation>Horizontal</Orientation>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LineOuter" Storyboard.TargetProperty="Reverse">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <System:Boolean>True</System:Boolean>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LineTabItems" Storyboard.TargetProperty="Orientation">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Orientation>Vertical</Orientation>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="TopTabStripPlacement">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="HeaderBackground" Storyboard.TargetProperty="BorderThickness">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Thickness>0 0 0 1</Thickness>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LineOuter" Storyboard.TargetProperty="Reverse">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <System:Boolean>True</System:Boolean>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TabPanelPresenter" Storyboard.TargetProperty="Margin">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Thickness>0 0 0 -1</Thickness>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="RightTabStripPlacement">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TabPanelPresenter" Storyboard.TargetProperty="Margin">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Thickness>0 0 0 -1</Thickness>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TabPanel" Storyboard.TargetProperty="Orientation">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Orientation>Vertical</Orientation>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LineOuter" Storyboard.TargetProperty="Orientation">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Orientation>Horizontal</Orientation>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LineTabItems" Storyboard.TargetProperty="Orientation">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Orientation>Vertical</Orientation>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="*" />
                            </Grid.RowDefinitions>
                            <c1:C1BrushBuilder x:Name="HeaderBackgroundBrush" Input="{TemplateBinding HeaderBackground}" DesignBrush="{StaticResource GeneralGradientBrush}" DesignColor="{StaticResource BaseColor}" />
                            <!-- Header -->
                            <Border x:Name="HeaderContainer" Visibility="{Binding ShowHeader, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource visibilityConverter}}" c1Docking:C1DockTabControl.Drag="{Binding RelativeSource={RelativeSource TemplatedParent}}" Cursor="Hand" Background="Transparent" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource sideThicknessConverter}, ConverterParameter=left-top-right}">
                                <Grid>
                                    <Border x:Name="HeaderBackground" Background="{Binding ElementName=HeaderBackgroundBrush, Path=Output}" BorderBrush="{TemplateBinding BorderBrush}" />
                                    <Grid>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition />
                                            <ColumnDefinition Width="Auto" />
                                        </Grid.ColumnDefinitions>
                                        <ContentControl Margin="{TemplateBinding Padding}" IsTabStop="False" Content="{Binding SelectedItem.Header, RelativeSource={RelativeSource TemplatedParent}}" ContentTemplate="{Binding SelectedItem.ActualSelectedHeaderTemplate, RelativeSource={RelativeSource TemplatedParent}}" Foreground="{TemplateBinding HeaderForeground}" />
                                        <StackPanel x:Name="StackPanelButtons" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal" Margin="4">
                                            <c1:C1DropDownButton Height="15" Width="15" Margin="2" MouseOverBrush="{TemplateBinding MouseOverBrush}" PressedBrush="{TemplateBinding PressedBrush}" c1:ClearStyleExtensions.CornerRadius="0" Background="Transparent" Foreground="{TemplateBinding Foreground}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0" Visibility="{Binding ShowMenu, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource visibilityConverter}}" ToolTipService.ToolTip="{Binding Path=Menu, Source={StaticResource c1_Resources}}" Style="{StaticResource TabStripDropDown}" AutoClose="True">
                                                <c1:C1DropDownButton.Header>
                                                    <Polygon Points="0,0 3.5,3.5 7,0" Fill="{TemplateBinding HeaderForeground}" HorizontalAlignment="Center" VerticalAlignment="Center" />
                                                </c1:C1DropDownButton.Header>
                                                <c1:C1MenuList Padding="0" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding HeaderBackground}" HighlightedBackground="{TemplateBinding MouseOverBrush}" OpenedBackground="{TemplateBinding PressedBrush}" Foreground="{TemplateBinding HeaderForeground}">
                                                    <c1:C1MenuItem x:Name="FloatingMenuItem" Visibility="{Binding CanUserFloat, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource visibilityConverter}}" IsCheckable="True" IsChecked="True" Header="{Binding Source={StaticResource DockingResources}, Path=Floating}" GroupName="DockMode" />
                                                    <c1:C1MenuItem x:Name="DockedMenuItem" Visibility="{Binding CanUserDock, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource visibilityConverter}}" IsCheckable="True" Header="{Binding Source={StaticResource DockingResources}, Path=Docked}" GroupName="DockMode" />
                                                    <c1:C1MenuItem x:Name="SlidingMenuItem" Visibility="{Binding CanUserSlide, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource visibilityConverter}}" IsCheckable="True" Header="{Binding Source={StaticResource DockingResources}, Path=Sliding}" GroupName="DockMode" />
                                                    <c1:C1MenuItem x:Name="HiddenMenuItem" Visibility="{Binding CanUserHide, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource visibilityConverter}}" IsCheckable="True" Header="{Binding Source={StaticResource DockingResources}, Path=Hidden}" GroupName="DockMode" />
                                                </c1:C1MenuList>
                                            </c1:C1DropDownButton>

                                            <Border Visibility="{Binding CanUserSlide, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource visibilityConverter}}">
                                                <Button x:Name="SlidingButton" Margin="2 0" Height="14" Width="14" Padding="0" Style="{StaticResource ClearStyleButtonStyle}" c1:ClearStyleExtensions.MouseOverBrush="{TemplateBinding MouseOverBrush}" c1:ClearStyleExtensions.PressedBrush="{TemplateBinding PressedBrush}" c1:ClearStyleExtensions.CornerRadius="0" Background="Transparent" Foreground="{TemplateBinding Foreground}" BorderBrush="Transparent" BorderThickness="0" VerticalAlignment="Center" HorizontalAlignment="Right" ToolTipService.ToolTip="{Binding Source={StaticResource DockingResources}, Path=MakeSliding}">
                                                    <Grid x:Name="AutoHideIcon" Height="14" Width="14">
                                                        <Border Background="{TemplateBinding HeaderForeground}" CornerRadius="0,0,1,1" Height="4" Width="1" Margin="7,0,0,1" VerticalAlignment="Bottom" HorizontalAlignment="Left" />
                                                        <Border BorderBrush="{TemplateBinding HeaderForeground}" BorderThickness="1" HorizontalAlignment="Left" VerticalAlignment="Top" Width="5" Height="7" RenderTransformOrigin="0.5,0.5" CornerRadius="1,1,0,0" Margin="5,2,0,0">
                                                            <Grid>
                                                                <Grid.ColumnDefinitions>
                                                                    <ColumnDefinition />
                                                                    <ColumnDefinition />
                                                                </Grid.ColumnDefinitions>
                                                                <Border Background="{TemplateBinding HeaderForeground}" />
                                                            </Grid>
                                                        </Border>
                                                        <Border Background="{TemplateBinding HeaderForeground}" CornerRadius="1" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="7" Height="1" Margin="4,0,0,5" />
                                                    </Grid>
                                                </Button>
                                            </Border>
                                            <!-- Begin change by Eddie 6-Feb-2012 -->
                                            <!-- TFS-19537, DockedButton should depond on CanUserDock instead of CanUserFloat -->
                                            <Border Visibility="{Binding CanUserDock, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource visibilityConverter}}">
                                            <!--<Border Visibility="{Binding CanUserFloat, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource visibilityConverter}}">-->
                                            <!-- End change -->
                                                <Button x:Name="DockedButton" Margin="2 0" Height="14" Width="14" Padding="0" Style="{StaticResource ClearStyleButtonStyle}" c1:ClearStyleExtensions.MouseOverBrush="{TemplateBinding MouseOverBrush}" c1:ClearStyleExtensions.PressedBrush="{TemplateBinding PressedBrush}" c1:ClearStyleExtensions.CornerRadius="0" Background="Transparent" Foreground="{TemplateBinding Foreground}" BorderBrush="Transparent" BorderThickness="0" VerticalAlignment="Center" HorizontalAlignment="Right" ToolTipService.ToolTip="{Binding Source={StaticResource DockingResources}, Path=MakeDocked}" Visibility="Collapsed" IsEnabled="False">
                                                    <Grid x:Name="AutoHideIcon2" Height="14" Width="14">
                                                        <Border Background="{TemplateBinding Foreground}" HorizontalAlignment="Left" VerticalAlignment="Bottom" CornerRadius="1,0,0,1" Height="1" Width="4" Margin="1,0,0,7" />
                                                        <Border BorderBrush="{TemplateBinding Foreground}" BorderThickness="1" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="7" Height="5" RenderTransformOrigin="0.5,0.5" CornerRadius="0,1,1,0" Margin="0,0,1,5">
                                                            <Grid>
                                                                <Grid.RowDefinitions>
                                                                    <RowDefinition />
                                                                    <RowDefinition />
                                                                </Grid.RowDefinitions>
                                                                <Border Background="{TemplateBinding Foreground}" />
                                                            </Grid>
                                                        </Border>
                                                        <Border Background="{TemplateBinding Foreground}" CornerRadius="1" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="1" Height="7" Margin="5,0,0,4" />
                                                    </Grid>
                                                </Button>
                                            </Border>
                                            <Border Visibility="{Binding CanUserHide, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource visibilityConverter}}">
                                                <Button x:Name="HiddenButton" Margin="2 0" Height="15" Width="15" Style="{StaticResource ClearStyleButtonStyle}" c1:ClearStyleExtensions.MouseOverBrush="{TemplateBinding MouseOverBrush}" c1:ClearStyleExtensions.PressedBrush="{TemplateBinding PressedBrush}" c1:ClearStyleExtensions.CornerRadius="0" Background="Transparent" Foreground="{TemplateBinding Foreground}" BorderBrush="Transparent" BorderThickness="0" VerticalAlignment="Center" HorizontalAlignment="Right" ToolTipService.ToolTip="{Binding Source={StaticResource DockingResources}, Path=MakeHidden}">
                                                    <Grid>
                                                        <Path x:Name="HiddenButtonFloatingContent" Visibility="Collapsed" Stroke="{TemplateBinding HeaderForeground}" Stretch="Fill" Data="M0,0 L1.6,0 L3,1.56 L4.4,0 L6,0 L3.8,2.5 L6,5 L4.4,5 L3,3.49 L1.59,5 L-4.2E-09,5 L2.18,2.5 z" Width="11" Height="9" />
                                                        <Path x:Name="HiddenButtonNonFloatingContent" Fill="{TemplateBinding HeaderForeground}" Stretch="Fill" Data="M0,0 L1.6,0 L3,1.56 L4.4,0 L6,0 L3.8,2.5 L6,5 L4.4,5 L3,3.49 L1.59,5 L-4.2E-09,5 L2.18,2.5 z" Width="7" Height="5" />
                                                    </Grid>

                                                </Button>
                                            </Border>
                                        </StackPanel>
                                    </Grid>
                                </Grid>
                            </Border>

                            <!--Body-->
                            <c1:C1LinePanel x:Name="LineOuter" Orientation="Vertical" Grid.Row="1">
                                <c1:C1LinePanel.LineDefinitions>
                                    <c1:LineDefinition Length="*" />
                                    <c1:LineDefinition Length="Auto" />
                                </c1:C1LinePanel.LineDefinitions>

                                <!-- Selected TabItem -->
                                <Border x:Name="SelectedTabItem" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" Background="{TemplateBinding Background}">
                                    <ContentPresenter x:Name="SelectedItemContent" />
                                </Border>
                                <!-- Tab Items section -->
                                <c1:C1LinePanel x:Name="LineTabItems" Orientation="Horizontal" Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ShowTabs, Converter={StaticResource visibilityConverter}}">
                                    <c1:C1LinePanel.LineDefinitions>
                                        <c1:LineDefinition Length="Auto" />
                                        <c1:LineDefinition Length="*" />
                                        <c1:LineDefinition Length="Auto" />
                                        <c1:LineDefinition Length="Auto" />
                                        <c1:LineDefinition Length="Auto" />
                                    </c1:C1LinePanel.LineDefinitions>

                                    <!-- Previous -->
                                    <!-- Previous -->
                                    <RepeatButton x:Name="PreviousButton" Height="15" Width="15" Style="{StaticResource ClearStyleButtonStyle}" c1:ClearStyleExtensions.MouseOverBrush="{TemplateBinding MouseOverBrush}" c1:ClearStyleExtensions.PressedBrush="{TemplateBinding PressedBrush}" c1:ClearStyleExtensions.CornerRadius="0" Background="{TemplateBinding TabStripBackground}" Foreground="{TemplateBinding Foreground}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Margin="2" ToolTipService.ToolTip="{Binding Path=Previous, Source={StaticResource c1_Resources}}">
                                        <Path Data="M5.3,1E-07 L7,1E-07 L4.7,2.5 L7,5 L5.3,5 L3,2.5 z M2.3,0 L4,0 L1.7,2.5 L4,5 L2.3,5 L0,2.5 z" Width="7" Height="5" Fill="{TemplateBinding TabStripForeground}" Stretch="Uniform" HorizontalAlignment="Right" />
                                    </RepeatButton>

                                    <!-- TabPanel -->
                                    <ContentPresenter x:Name="TabPanelPresenter" Grid.Column="1" Margin="0 -1 0 0">
                                        <ContentPresenter.Content>
                                            
                                            <c1:C1TabPanel x:Name="TabPanel" Orientation="Horizontal" IsItemsHost="True" HorizontalAlignment="{TemplateBinding TabStripHorizontalAlignment}" VerticalAlignment="{TemplateBinding TabStripVerticalAlignment}" />
                                            
                                        </ContentPresenter.Content>
                                    </ContentPresenter>

                                    <!-- Next -->
                                    <RepeatButton x:Name="NextButton" Grid.Column="3" Height="15" Width="15" Style="{StaticResource ClearStyleButtonStyle}" c1:ClearStyleExtensions.MouseOverBrush="{TemplateBinding MouseOverBrush}" c1:ClearStyleExtensions.PressedBrush="{TemplateBinding PressedBrush}" c1:ClearStyleExtensions.CornerRadius="0" Background="{TemplateBinding TabStripBackground}" Foreground="{TemplateBinding Foreground}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Margin="2" ToolTipService.ToolTip="{Binding Path=Next, Source={StaticResource c1_Resources}}">
                                        <Path Data="M3,0 L4.67,0 L7,2.5 L4.67,5 L3,5 L5.3,2.5 z M0,0 L1.67,0 L4,2.5 L1.67,5 L0,5 L2.3,2.5 z" Width="7" Height="5" Fill="{TemplateBinding TabStripForeground}" Stretch="Uniform" SnapsToDevicePixels="True" />
                                    </RepeatButton>

                                    <c1:C1DropDownButton x:Name="TabStripDropDown" Height="15" Width="15" Margin="2" AutoClose="True" MouseOverBrush="{TemplateBinding MouseOverBrush}" PressedBrush="{TemplateBinding PressedBrush}" c1:ClearStyleExtensions.CornerRadius="0" Background="{TemplateBinding TabStripBackground}" Foreground="{TemplateBinding Foreground}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Visibility="{TemplateBinding TabStripMenuVisibility}" ToolTipService.ToolTip="{Binding Path=Menu, Source={StaticResource c1_Resources}}" Style="{StaticResource TabStripDropDown}">
                                        <c1:C1DropDownButton.Header>
                                            <Grid Width="7" Height="4" Margin="0 5 0 0" VerticalAlignment="Top">
                                                <Polygon Points="0,0 3.5,3.5 7,0" Fill="{TemplateBinding TabStripForeground}" HorizontalAlignment="Center" VerticalAlignment="Center" />
                                                <Rectangle Height="1" Margin="0,-2,0,0" Fill="{TemplateBinding TabStripForeground}" StrokeThickness="0" VerticalAlignment="Top" />
                                            </Grid>
                                        </c1:C1DropDownButton.Header>
                                        <c1:C1MenuList x:Name="Menu" Padding="0" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" HighlightedBackground="{TemplateBinding MouseOverBrush}" OpenedBackground="{TemplateBinding PressedBrush}" Foreground="{TemplateBinding TabStripForeground}" />
                                    </c1:C1DropDownButton>

                                    <!-- Close -->
                                    <Button x:Name="CloseButton" Grid.Column="5" Grid.Row="5" Height="15" Width="15" Margin="2 2 4 2" VerticalAlignment="Center" Style="{StaticResource ClearStyleButtonStyle}" c1:ClearStyleExtensions.MouseOverBrush="{TemplateBinding MouseOverBrush}" c1:ClearStyleExtensions.PressedBrush="{TemplateBinding PressedBrush}" c1:ClearStyleExtensions.CornerRadius="0" Background="{TemplateBinding TabStripBackground}" Foreground="{TemplateBinding Foreground}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" ToolTipService.ToolTip="{Binding Path=CloseGlobal, Source={StaticResource c1_Resources}}">
                                        <Path Data="M0,0 L1.6,0 L3,1.56 L4.4,0 L6,0 L3.8,2.5 L6,5 L4.4,5 L3,3.49 L1.59,5 L-4.2E-09,5 L2.18,2.5 z" Width="7" Height="6" Fill="{TemplateBinding TabStripForeground}" Stretch="Uniform" SnapsToDevicePixels="True" />
                                    </Button>
                                </c1:C1LinePanel>
                            </c1:C1LinePanel>
                        </Grid>
                        <c1Docking:C1DockPreview x:Name="Preview" />
                        
                        
                        <Popup IsOpen="False" StaysOpen="True" x:Name="InnerPopup" AllowsTransparency="True">
                            <c1Docking:C1DockInnerPicker x:Name="Picker" Visibility="Collapsed" />
                        </Popup>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <!--******************* C1DockControl ********************-->

    <!-- C1DockControl Style-->
    <Style TargetType="c1Docking:C1DockControl">
        
        
        <Setter Property="Background" Value="{StaticResource WpfInputBaseBrush}" />
        <Setter Property="TabStripBackground" Value="{StaticResource WpfInputBaseBrush}" />
        <Setter Property="HeaderBackground" Value="{StaticResource WpfInputBaseBrush}" />
        <Setter Property="BorderBrush" Value="{StaticResource WpfInputBorderBrush}" />
        <Setter Property="MouseOverBrush" Value="{StaticResource WpfInputMouseOverBrush}" />
        <Setter Property="PressedBrush" Value="{StaticResource WpfInputSelectedBackground}" />
        <Setter Property="BorderThickness" Value="{StaticResource GeneralThickness}" />        
        <Setter Property="SelectedBackground" Value="{StaticResource DockItemBackgroundSelectedBackground}" />        
        <Setter Property="TabStripForeground" Value="{StaticResource ForegroundTextBoxBrushColor}" />
        <Setter Property="TabControlBackground" Value="{StaticResource InputBackgroundBrush}" />
        <Setter Property="TabControlForeground" Value="{StaticResource ForegroundTextBoxBrushColor}" />        
        <Setter Property="HeaderForeground" Value="{StaticResource ForegroundTextBoxBrushColor}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="c1Docking:C1DockControl">
                    <Grid>
                        <Border Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Padding="{TemplateBinding Padding}">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition />
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <c1Docking:C1DockControlPanel Grid.Column="1" Grid.Row="1" x:Name="DockedHost" />
                                <c1Docking:C1DockSlidingPanel Grid.Column="1" Grid.Row="1" x:Name="SlidingHost" />
                                <Canvas Grid.Column="1" Grid.Row="1" x:Name="FloatingHost" />
                                <c1:C1ScrollViewer Grid.Column="0" Grid.Row="1" Margin="0 0 2 0" HorizontalScrollBarVisibility="Collapsed">
                                    <StackPanel x:Name="LeftSlidingHeader" Orientation="Vertical" />
                                </c1:C1ScrollViewer>
                                <c1:C1ScrollViewer Grid.Column="1" Grid.Row="0" Margin="0 0 0 2" VerticalScrollBarVisibility="Collapsed">
                                    <StackPanel x:Name="TopSlidingHeader" Orientation="Horizontal" />
                                </c1:C1ScrollViewer>
                                <c1:C1ScrollViewer Grid.Column="2" Grid.Row="1" Margin="2 0 0 0" HorizontalScrollBarVisibility="Collapsed">
                                    <StackPanel x:Name="RightSlidingHeader" Orientation="Vertical" />
                                </c1:C1ScrollViewer>
                                <c1:C1ScrollViewer Grid.Column="1" Grid.Row="2" Margin="0 2 0 0" VerticalScrollBarVisibility="Collapsed">
                                    <StackPanel x:Name="BottomSlidingHeader" Orientation="Horizontal" />
                                </c1:C1ScrollViewer>
                                <c1Docking:C1DockPreview Grid.Column="1" Grid.Row="1" x:Name="Preview" />
                                
                                
                                <Popup IsOpen="False" StaysOpen="True" x:Name="OuterPopup" AllowsTransparency="True">
                                    <c1Docking:C1DockOuterPicker Grid.Column="1" Grid.Row="1" x:Name="Picker" Visibility="Collapsed" />
                                </Popup>
                            </Grid>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>