	  
	   
    
		

<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" xmlns:c1_Resources="clr-namespace:C1.Silverlight.Resources">
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/C1.WPF.4;component/themes/Common.xaml" />
        <ResourceDictionary Source="/C1.WPF.4;component/themes/C1Button.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <!--******************* C1TabControl *******************-->

    <c1_Resources:C1_Silverlight x:Key="Resources" />

    <c1:C1TabItemBorderClipConverter x:Key="tabItemBorderClipConverter" />
    <c1:C1SlopedBorderAdjustConverter x:Key="slopedBorderAdjustConverter" />

    <!-- Brush @ Docking TabItem Background -->
    
    
    <LinearGradientBrush x:Key="DockItemBackgroundBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Color="#FFEFF3F7" Offset="0" />
        <GradientStop Color="#FFE6ECF3" Offset="0.5" />
        <GradientStop Color="#FFD3DEEA" Offset="0.5" />
		<GradientStop Color="#FFC4D2E2" Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="DockItemBackgroundOverBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Color="#FFEDF6F9" Offset="0" />
        <GradientStop Color="#FFE4F2F6" Offset="0.5" />
        <GradientStop Color="#FFD2E9F0" Offset="0.5" />
		<GradientStop Color="#FFC0E0EA" Offset="1" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="DockItemBackgroundSelectedBackground" Color="White" />    

    <!-- Brush @ Docking TabControl Background -->
    <SolidColorBrush x:Key="DockTabControlBackground" Color="White" />

    <!-- TabStripDropDown -->
    <Style x:Key="TabStripDropDown" TargetType="c1:C1DropDownButton">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="c1:C1DropDownButton">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="DropDownOpenStates">
                                <VisualState x:Name="Closed" />
                                <VisualState x:Name="Opened" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="Disabled" />
                                <VisualState x:Name="MouseOver" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Unfocused" />
                                <VisualState x:Name="Focused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <ToggleButton x:Name="ArrowToggle" Style="{StaticResource ClearStyleButtonStyle}" c1:ClearStyleExtensions.MouseOverBrush="{TemplateBinding MouseOverBrush}" c1:ClearStyleExtensions.PressedBrush="{TemplateBinding PressedBrush}" c1:ClearStyleExtensions.CornerRadius="0" Background="{TemplateBinding Background}" Foreground="{TemplateBinding Foreground}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" VerticalContentAlignment="{TemplateBinding VerticalHeaderAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalHeaderAlignment}" Padding="0" IsTabStop="True">
                            <ContentPresenter Content="{TemplateBinding Header}" Margin="{TemplateBinding HeaderPadding}" />
                        </ToggleButton>
                        <Popup x:Name="DropDownPopup" Grid.Row="1">
                            <Grid Height="{TemplateBinding DropDownHeight}" Width="{TemplateBinding DropDownWidth}" MaxHeight="{TemplateBinding MaxDropDownHeight}" MaxWidth="{TemplateBinding MaxDropDownWidth}" MinWidth="{TemplateBinding MinDropDownWidth}">
                                <ContentPresenter Margin="{TemplateBinding Padding}" />
                            </Grid>
                        </Popup>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- C1TabItemBorder -->
    <Style TargetType="c1:C1TabItemBorder">
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="c1:C1TabItemBorder">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="ShapeStates">
                                <VisualState x:Name="Rectangle">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="leftRectangle" 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="rightRectangle" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Rounded">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="leftRounded" 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="rightRounded" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Sloped">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="leftTriangle" 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="rightTriangle" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Ribbon">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="leftRibbon" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="rightRibbon" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <!-- Sloped -->
                            <Grid x:Name="leftTriangle" Visibility="Collapsed" Width="18">
                                <Path Data="M0,20 L24.5,7.27 C26.8,6 30,4.8 34,4.8 L36,4.77 L36,20" Stretch="Fill" Fill="{TemplateBinding Background}" />
                                <Path Data="M0,20 L24.5,7.27 C26.8,6 30,4.8 34,4.8 L36,4.77" Stretch="Fill" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource slopedBorderAdjustConverter}}" StrokeThickness="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource projectThicknessConverter}, ConverterParameter=top}" Stroke="{TemplateBinding BorderBrush}" />
                            </Grid>
                            <Border x:Name="rightTriangle" Grid.Column="2" Visibility="Collapsed" CornerRadius="0,3,0,0" Width="8" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource sideThicknessConverter}, ConverterParameter=top-right}" SnapsToDevicePixels="True" />

                            <!-- Rectangle -->
                            <Border x:Name="leftRectangle" Grid.Column="0" Visibility="Collapsed" Width="8" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource sideThicknessConverter}, ConverterParameter=left-top}" SnapsToDevicePixels="True" />
                            <Border x:Name="rightRectangle" Grid.Column="2" Visibility="Collapsed" Width="8" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource sideThicknessConverter}, ConverterParameter=top-right}" SnapsToDevicePixels="True" />

                            <!-- Rounded -->
                            <Border x:Name="leftRounded" Grid.Column="0" Visibility="Collapsed" Width="8" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource sideThicknessConverter}, ConverterParameter=left-top}" CornerRadius="{Binding CornerRadius, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource sideRadiusConverter}, ConverterParameter=topleft}" SnapsToDevicePixels="True" />
                            <Border x:Name="rightRounded" Grid.Column="2" Visibility="Collapsed" Width="8" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource sideThicknessConverter}, ConverterParameter=top-right}" CornerRadius="{Binding CornerRadius, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource sideRadiusConverter}, ConverterParameter=topright}" SnapsToDevicePixels="True" />

                            <!-- Ribbon -->
                            <Grid x:Name="leftRibbon" Grid.Column="0" Visibility="Collapsed" Width="8">
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition />
                                        <RowDefinition Height="7" />
                                    </Grid.RowDefinitions>
                                    <Border Grid.RowSpan="2" Background="{TemplateBinding Background}" BorderThickness="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource sideThicknessConverter}, ConverterParameter=left-top}" CornerRadius="{Binding CornerRadius, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource sideRadiusConverter}, ConverterParameter=topleft}" />
                                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource sideThicknessConverter}, ConverterParameter=left-top}" CornerRadius="{Binding CornerRadius, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource sideRadiusConverter}, ConverterParameter=topleft}" />
                                </Grid>
                                <Border Width="8" Height="8" HorizontalAlignment="Left" VerticalAlignment="Bottom" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource sideThicknessConverter}, ConverterParameter=left-top}" CornerRadius="{Binding CornerRadius, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource sideRadiusConverter}, ConverterParameter=topleft}">
                                    <Border.RenderTransform>
                                        <TransformGroup>
                                            <ScaleTransform ScaleX="-1" ScaleY="-1" />
                                            <TranslateTransform X="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource projectThicknessConverter}, ConverterParameter=left}" />
                                            <TranslateTransform Y="8" />
                                            <TranslateTransform Y="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource projectThicknessConverter}, ConverterParameter=top}" />
                                        </TransformGroup>
                                    </Border.RenderTransform>
                                    <UIElement.Clip>
                                        <RectangleGeometry Rect="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource tabItemBorderClipConverter}}" />
                                    </UIElement.Clip>
                                </Border>
                            </Grid>
                            <Grid x:Name="rightRibbon" Grid.Column="2" Visibility="Collapsed" Width="8">
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition />
                                        <RowDefinition Height="7" />
                                    </Grid.RowDefinitions>
                                    <Border Grid.RowSpan="2" Background="{TemplateBinding Background}" CornerRadius="{Binding CornerRadius, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource sideRadiusConverter}, ConverterParameter=topright}" />
                                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource sideThicknessConverter}, ConverterParameter=right-top}" CornerRadius="{Binding CornerRadius, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource sideRadiusConverter}, ConverterParameter=topright}" />
                                </Grid>
                                <Border Width="8" Height="8" HorizontalAlignment="Right" VerticalAlignment="Bottom" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource sideThicknessConverter}, ConverterParameter=right-top}" CornerRadius="{Binding CornerRadius, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource sideRadiusConverter}, ConverterParameter=topright}">
                                    <Border.RenderTransform>
                                        <TransformGroup>
                                            <TranslateTransform X="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource projectThicknessConverter}, ConverterParameter=right}" />
                                            <ScaleTransform ScaleX="-1" ScaleY="-1" />
                                            <TranslateTransform X="16" />
                                            <TranslateTransform Y="8" />
                                            <TranslateTransform Y="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource projectThicknessConverter}, ConverterParameter=top}" />
                                        </TransformGroup>
                                    </Border.RenderTransform>
                                    <UIElement.Clip>
                                        <RectangleGeometry Rect="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource tabItemBorderClipConverter}}" />
                                    </UIElement.Clip>
                                </Border>
                            </Grid>

                            <!-- Middle Element -->
                            <Border Grid.Column="1" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource sideThicknessConverter}, ConverterParameter=top}" SnapsToDevicePixels="True">
                                <!-- Content Presenter -->
                                <ContentPresenter Grid.Column="1" />
                            </Border>
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- C1TabItemPresenter -->
    <Style TargetType="c1:C1TabItemPresenter">
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="c1:C1TabItemPresenter">
                    <Grid x:Name="Container" VerticalAlignment="Bottom">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="SelectionStates">
                                <VisualState x:Name="Unselected" />
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="SelectedElement" 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="BackgroundElement" 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="InnerBorderElement" 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="ContentBorder" Storyboard.TargetProperty="Margin">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Thickness>1</Thickness>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                       <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="MiddleGrid" Storyboard.TargetProperty="Margin">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Thickness>0</Thickness>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <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>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="TabStripPlacementStates">
                                <VisualState x:Name="TopTabStripPlacement">
                                    <Storyboard />
                                </VisualState>
                                <VisualState x:Name="BottomTabStripPlacement">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterTransformer" Storyboard.TargetProperty="LayoutTransform">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <ScaleTransform ScaleY="-1" />
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerTransformer" Storyboard.TargetProperty="LayoutTransform">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <ScaleTransform ScaleY="-1" />
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Container" Storyboard.TargetProperty="VerticalAlignment">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <VerticalAlignment>Top</VerticalAlignment>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="LeftTabStripPlacement">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterTransformer" Storyboard.TargetProperty="LayoutTransform">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <TransformGroup>
                                                        <ScaleTransform ScaleY="-1" />
                                                        <RotateTransform Angle="90" />
                                                    </TransformGroup>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerTransformer" Storyboard.TargetProperty="LayoutTransform">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <ScaleTransform ScaleY="-1" />
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Container" Storyboard.TargetProperty="HorizontalAlignment">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <HorizontalAlignment>Right</HorizontalAlignment>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="RightTabStripPlacement">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="OuterTransformer" Storyboard.TargetProperty="Margin">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Thickness>-1 0 0 0</Thickness>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterTransformer" Storyboard.TargetProperty="LayoutTransform">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <RotateTransform Angle="90" />
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Container" Storyboard.TargetProperty="HorizontalAlignment">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <HorizontalAlignment>Left</HorizontalAlignment>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <c1:C1LayoutTransformer x:Name="OuterTransformer">
                            <Grid Margin="0 0 0 1" x:Name="MiddleGrid">
                                <c1:C1BrushBuilder x:Name="BackgroundBrush" Input="{Binding Path=Background, RelativeSource={RelativeSource TemplatedParent}}" DesignBrush="{StaticResource DockItemBackgroundBrush}" DesignColor="{StaticResource BaseColor}" />
                                <c1:C1BrushBuilder x:Name="MouseOverBrush" Input="{Binding Path=MouseOverBrush, RelativeSource={RelativeSource TemplatedParent}}" DesignBrush="{StaticResource DockItemBackgroundOverBrush}" DesignColor="{StaticResource MouseOverColor}" />
                                <c1:C1BrushBuilder x:Name="InnerBorderBrush" Input="{Binding Path=Background, RelativeSource={RelativeSource TemplatedParent}}" DesignBrush="{StaticResource InnerBorderBrush}" DesignColor="{StaticResource BaseColor}" />
                                <c1:C1BrushBuilder x:Name="InnerBorderMouseOverBrush" Input="{Binding Path=MouseOverBrush, RelativeSource={RelativeSource TemplatedParent}}" DesignBrush="{StaticResource InnerBorderMouseOverBrush}" DesignColor="{StaticResource MouseOverColor}" />
                                <c1:C1TabItemBorder x:Name="BackgroundElement" Shape="{TemplateBinding TabShape}" Background="{Binding ElementName=BackgroundBrush, Path=Output}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}}" CornerRadius="{TemplateBinding CornerRadius}" />
                                <c1:C1TabItemBorder x:Name="InnerBorderElement" Shape="{TemplateBinding TabShape}" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource sideThicknessConverter}, ConverterParameter=left-top-right}" BorderBrush="{Binding ElementName=InnerBorderBrush, Path=Output}" BorderThickness="1 1 1 0" CornerRadius="{TemplateBinding CornerRadius}" />
                                <c1:C1TabItemBorder x:Name="SelectedElement" Shape="{TemplateBinding TabShape}" Background="{TemplateBinding SelectedBackground}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource sideThicknessConverter}, ConverterParameter=left-top-right}" CornerRadius="{TemplateBinding CornerRadius}" Visibility="Collapsed" />
                                <c1:C1TabItemBorder x:Name="MouseOverElement" Shape="{TemplateBinding TabShape}" Background="{Binding ElementName=MouseOverBrush, Path=Output}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}}" CornerRadius="{TemplateBinding CornerRadius}" Visibility="Collapsed" />
                                <c1:C1TabItemBorder Shape="{TemplateBinding TabShape}" CornerRadius="{TemplateBinding CornerRadius}">
                                    <c1:C1LayoutTransformer x:Name="InnerTransformer" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}}">
                                        <Border x:Name="ContentBorder">
                                            <c1:C1LayoutRounder Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" />
                                        </Border>
                                    </c1:C1LayoutTransformer>
                                </c1:C1TabItemBorder>
                            </Grid>
                        </c1:C1LayoutTransformer>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- C1TabItem -->
    <Style TargetType="c1:C1TabItem">
        <Setter Property="Padding" Value="2" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="c1:C1TabItem">
                    <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>
                			<!-- 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>
                			<VisualStateGroup x:Name="SelectionStates">
                				<VisualState x:Name="Selected" />
                				<VisualState x:Name="Unselected" />
                			</VisualStateGroup>
                			<!-- End change -->
                		</VisualStateManager.VisualStateGroups>
                		<c1:C1TabItemPresenter x:Name="C1TabItemPresenter" IsSelected="{TemplateBinding IsSelected}" TabShape="{TemplateBinding TabShape}" CornerRadius="4" BorderThickness="{Binding BorderThickness, ConverterParameter=left-top-right, Converter={StaticResource sideThicknessConverter}, RelativeSource={RelativeSource TemplatedParent}}" 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 x:Name="HeaderPresenter" 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">
                                        <!-- Changed by Haochen.Ye for TFS-20977, change the name of 'UnpinButton' and 'PinButton' -->
                                        <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>
                                        <!-- Changed by Haochen.Ye for TFS-20977, change the name of 'UnpinButton' and 'PinButton' -->
                                        <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}" Visibility="Collapsed" />
                	</Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- C1TabControl -->
    <Style TargetType="c1:C1TabControl">
        
        
        <Setter Property="MouseOverBrush" Value="{StaticResource WpfInputMouseOverBrush}" />
        <Setter Property="PressedBrush" Value="{StaticResource WpfInputSelectedBackground}" />
        <Setter Property="TabStripBackground" Value="{StaticResource WpfInputBaseBrush}" />
        <Setter Property="BorderBrush" Value="{StaticResource WpfInputBaseBrush}" />
        <Setter Property="Background" Value="{StaticResource DockTabControlBackground}" />
        <Setter Property="TabStripForeground" Value="{StaticResource ForegroundBrushColor}" />
        <Setter Property="SelectedBackground" Value="{StaticResource DockItemBackgroundSelectedBackground}" />
        <Setter Property="TabStripOverlap" Value="0" />
        <Setter Property="BorderThickness" Value="{StaticResource GeneralThickness}" />
        <Setter Property="Foreground" Value="{StaticResource ForegroundTextBoxBrushColor}" />
        <Setter Property="TabItemShape" Value="Rounded" />
        <Setter Property="TabStripPlacement" Value="Top" />
        <Setter Property="Padding" Value="5" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="c1:C1TabControl">
                    <Grid x:Name="Root">
                        <VisualStateManager.VisualStateGroups>
                        	<VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver" />
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                    	<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="DisabledVisualElement">
                                    		<DiscreteObjectKeyFrame KeyTime="0">
                                    			<DiscreteObjectKeyFrame.Value>
                                    				<Visibility>Visible</Visibility>
                                    			</DiscreteObjectKeyFrame.Value>
                                    		</DiscreteObjectKeyFrame>
                                    	</ObjectAnimationUsingKeyFrames>
                                        
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="TabStripPlacementStates">
                                <VisualState x:Name="BottomTabStripPlacement">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TabPanelPresenter" Storyboard.TargetProperty="Margin">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Thickness>0 -1 0 0</Thickness>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <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 BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="TabPanel" Storyboard.TargetProperty="Orientation">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Orientation>Vertical</Orientation>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" 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>False</system:Boolean>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="LineTabItems" Storyboard.TargetProperty="Orientation">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Orientation>Vertical</Orientation>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PreviousButton" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
                                            <DiscreteDoubleKeyFrame KeyTime="00:00:00" Value="90" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="NextButton" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
                                            <DiscreteDoubleKeyFrame KeyTime="00:00:00" Value="90" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="TopTabStripPlacement">
                                    <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="LineOuter" Storyboard.TargetProperty="Reverse">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <system:Boolean>False</system:Boolean>
                                                </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>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PreviousButton" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
                                            <DiscreteDoubleKeyFrame KeyTime="00:00:00" Value="90" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="NextButton" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
                                            <DiscreteDoubleKeyFrame KeyTime="00:00:00" Value="90" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ShapeStates">
                                <VisualState x:Name="Rectangle" />
                                <VisualState x:Name="Rounded" />
                                <VisualState x:Name="Sloped" />
                                <VisualState x:Name="Ribbon">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftFilling" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RightFilling" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <c1:C1LinePanel x:Name="LineOuter" Margin="{TemplateBinding Padding}" Orientation="Vertical" Reverse="True">
                            <c1:C1LinePanel.LineDefinitions>
                                <c1:LineDefinition Length="Auto" />
                                <c1:LineDefinition Length="*" />
                            </c1:C1LinePanel.LineDefinitions>

                            <!-- Tab Items section -->
                            <!-- Put tab items before content so tab key navigation finds the items first. -->
                            <c1:C1LinePanel Canvas.ZIndex="100" 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="Auto" />
                                    <c1:LineDefinition Length="*" />
                                    <c1:LineDefinition Length="Auto" />
                                    <c1:LineDefinition Length="Auto" />
                                    <c1:LineDefinition Length="Auto" />
                                    <c1:LineDefinition Length="Auto" />
                                </c1:C1LinePanel.LineDefinitions>

                                <Border x:Name="LeftFilling" Visibility="Collapsed" Width="8" Height="8" />

                                <!-- 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" RenderTransformOrigin="0.5,0.5" ToolTipService.ToolTip="{Binding Path=Previous, Source={StaticResource Resources}}">
                                    <RepeatButton.RenderTransform>
                                        <TransformGroup>
                                            <ScaleTransform />
                                            <SkewTransform />
                                            <RotateTransform />
                                            <TranslateTransform />
                                        </TransformGroup>
                                    </RepeatButton.RenderTransform>
                                    <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" HorizontalAlignment="{TemplateBinding TabStripHorizontalAlignment}" VerticalAlignment="{TemplateBinding TabStripVerticalAlignment}">
                                    <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" RenderTransformOrigin="0.5,0.5" ToolTipService.ToolTip="{Binding Path=Next, Source={StaticResource Resources}}">
                                    <RepeatButton.RenderTransform>
                                        <TransformGroup>
                                            <ScaleTransform />
                                            <SkewTransform />
                                            <RotateTransform />
                                            <TranslateTransform />
                                        </TransformGroup>
                                    </RepeatButton.RenderTransform>
                                    <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>
                                <!-- TabStripMenu  -->
                                <c1:C1DropDownButton x:Name="TabStripDropDown" Height="15" Width="15" AutoClose="True" Margin="2" 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 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 TabStripBackground}" 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 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>

                                <Border x:Name="RightFilling" Visibility="Collapsed" Width="8" Height="8" />
                            </c1:C1LinePanel>
							<Grid>
	                            <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
	                                <ContentPresenter x:Name="SelectedItemContent" ContentTemplate="{x:Null}" />
	                            </Border>
								<Rectangle x:Name="DisabledVisualElement" Fill="{StaticResource DisabledBrush}" Visibility="Collapsed" />
							</Grid>
                        </c1:C1LinePanel>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
