<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml"
    xmlns:system="clr-namespace:System;assembly=mscorlib"
  >
    <!-- Toolbar style -->

    <c1:VisibilityConverter x:Key="visibilityConverter"/>

    <!-- Color & Brush used to build Base brushes -->
    <Color x:Key="BaseColor">#FFD1DCE8</Color>
    <SolidColorBrush x:Key="BaseColorBrush" Color="{StaticResource BaseColor}"/>

    <!-- Color & Brush used to build brushes on MouseOver state -->
    <Color x:Key="ToolbarOffice2010OverColor">#FFF9DA59</Color>
    <SolidColorBrush x:Key="ToolbarOffice2010OverBrush" Color="{StaticResource ToolbarOffice2010OverColor}"/>

    <!-- Color & Brush used to build brushes on Pressed, Checked and Focused states -->
    <Color x:Key="ToolbarOffice2010SelectedColor">#FFF6992E</Color>
    <SolidColorBrush x:Key="ToolbarOffice2010SelectedBrush" Color="{StaticResource ToolbarOffice2010SelectedColor}"/>

    <!-- Color & Brush @ general borders -->
    <Color x:Key="BorderColor">#FFA4AFBA</Color>
    <!-- Brush @ general borders -->
    <SolidColorBrush x:Key="BorderBrush" Color="{StaticResource BorderColor}"/>

    <!-- General Thickness -->
    <Thickness x:Key="GeneralThickness">1</Thickness>

    <!-- General CornerRadius -->
    <CornerRadius x:Key="GeneralCornerRadius">0 0 0 0</CornerRadius>
	
	<SolidColorBrush x:Key="ToolBarOffice2010SelectedTabBrush" Color="#FFFAFBFC"/>
	

    <!-- LinearGradients for Horizontal Orientation -->
    <LinearGradientBrush x:Key="ToolBarOffice2010ButtontBrush" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Color="#FFFAFBFC" Offset="0"/>
        <GradientStop Color="#FFD1DCE8" Offset="1"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="ToolBarOffice2010BkgOverBrush" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Color="#FFFFDA75"/>
        <GradientStop Color="#FFFDE387" Offset="0.5"/>
        <GradientStop Color="#FFFCF9ED" Offset="1"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="ToolBarOffice2010BkgSelectedBrush" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Color="#FFFFE08B" Offset="0"/>
        <GradientStop Color="#FFFFD86B" Offset="0.424"/>
        <GradientStop Color="#FFFFE9AE" Offset="1"/>
    </LinearGradientBrush>

    <!-- LinearGradients for Vertical Orientation -->

    <!-- Brush @ InnerBorderElement -->
    <SolidColorBrush x:Key="InnerBorderBrush" Color="#FFFAFBFC"/>
    <!-- Brush @ InnerBorderElement -->
    <SolidColorBrush x:Key="InnerBorderMouseOverBrush" Color="#FFFCF8E8"/>
    <!-- CornerRadius @ InnerBorderElement -->
    <CornerRadius x:Key="InnerBorderCornerRadius">1</CornerRadius>
    <!-- Thickness @ InnerBorderElement -->
    <Thickness x:Key="InnerBorderThickness">1</Thickness>


    <!-- Brush @ C1ToolbarGroup name Foreground-->
    <SolidColorBrush x:Key="ToolbarGroupNameForeground" Color="#FF949598"/>
    <!-- Margin @ C1ToolbarGroup -->
    <Thickness x:Key="ToolbarGroupMargin">0</Thickness>
    <!-- Padding @ C1ToolbarGroup -->
    <Thickness x:Key="ToolbarGroupPadding">0</Thickness>
    <!-- Brush @ C1ToolbarGroup Border -->
    <LinearGradientBrush x:Key="ToolbarGroupBorderBrush" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Color="#00ADBBC7" Offset="0"/>
        <GradientStop Color="#FFADBBC7" Offset="0.4"/>
    </LinearGradientBrush>
    <!-- Thickness @ C1ToolbarGroup Border -->
    <Thickness x:Key="ToolbarGroupBorderThickness">0 0 1 0</Thickness>
    <!-- Brush @ C1ToolbarGroup Background -->
    <LinearGradientBrush x:Key="ToolbarGroupBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFAFBFC" Offset="0"/>
        <GradientStop Color="#FFD1DCE8" Offset="1"/>
    </LinearGradientBrush>
    <!-- Brush @ C1ToolbarGroup Header Background -->
    <LinearGradientBrush x:Key="ToolbarGroupHeaderBackground" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Color="#FFCBDAE9" Offset="1"/>
        <GradientStop Color="#FFBCD1E4" Offset="0"/>
    </LinearGradientBrush>

    <SolidColorBrush x:Key="PopupBackgroundBrush" Color="#FFE6EEF5"/>
    <!-- Brush @ C1ToolbarGroup Inner Border-->
    <SolidColorBrush x:Key="ToolbarGroupInnerBorderBrush" Color="#FFE9EEF5"/>
    <!-- Thickness @ C1ToolbarGroup Inner Border-->
    <Thickness x:Key="ToolbarGroupInnerBorderThickness">1 0</Thickness>

    <!-- CornerRadius @ C1ToolbarGroup Header -->
    <CornerRadius x:Key="ToolbarGroupHeaderCornerRadius">0</CornerRadius>
    <!-- CornerRadius @ C1ToolbarGroup InnerElement -->
    <CornerRadius x:Key="ToolbarGroupInnerCornerRadius">0</CornerRadius>
    <!-- CornerRadius @ C1ToolbarGroup -->
    <CornerRadius x:Key="ToolbarGroupCornerRadius">0</CornerRadius>
    <!--Brush @ C1ToolbarDropDown & groupDropDown Background-->
    <CornerRadius x:Key="PopupCornerRadius">2</CornerRadius>

    <!-- Color & Brush @ general foreground -->
    <Color x:Key="ForegroundColor">Black</Color>
    <SolidColorBrush x:Key="ForegroundBrushColor" Color="{StaticResource ForegroundColor}"/>

    <SolidColorBrush x:Key="ToolbarForegroundBrush" Color="{StaticResource ForegroundColor}"/>

    <LinearGradientBrush x:Key="ToolbarBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFEFEFE" Offset="0.5"/>
        <GradientStop Color="#FFE5E9EE" Offset="1"/>
    </LinearGradientBrush>

    <!-- Padding @ ToolBar -->
    <Thickness x:Key="ToolbarPadding">1</Thickness>
    <!-- Brush @ ToolBar BorderBrush-->
    <SolidColorBrush x:Key="ToolbarBorderBrush" Color="#FFA5B8D3"/>
    <!-- CornerRadius @ ToolBar  -->
    <CornerRadius x:Key="ToolbarCornerRadius">0</CornerRadius>

    <!-- Color & Brush @ TextBox foreground -->
    <Color x:Key="ForegroundTextBoxColor">Black</Color>
    <SolidColorBrush x:Key="ForegroundTextBoxBrushColor" Color="{StaticResource ForegroundTextBoxColor}"/>

    <SolidColorBrush x:Key="GeneralGradientCheckedBrush" Color="#FF8ED1E2"/>

    <!-- C1ToolbarTabItem -->
    <Style x:Key="C1ToolbarTabItemStyle" TargetType="c1:C1ToolbarTabItem">
        <Setter Property="Background" Value="#FFF2F4F5" />
        <Setter Property="SelectedBackground" Value="#FFF2F4F5" />
    </Style>

    <!-- Button used in controls with ClearStyle -->
    <Style x:Key="ClearStyleButtonStyle" TargetType="ButtonBase">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ButtonBase">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverElement" Storyboard.TargetProperty="(UIElement.Visibility)" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PressedElement" Storyboard.TargetProperty="(UIElement.Visibility)" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled"/>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CheckStates">
                                <VisualState x:Name="Checked">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckedElement" Storyboard.TargetProperty="(UIElement.Visibility)" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unchecked"/>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualElement"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <c1:C1BrushBuilder x:Name="BackgroundBrush" Input="{Binding Background, RelativeSource={RelativeSource TemplatedParent}}" DesignBrush="{StaticResource ToolBarOffice2010ButtontBrush}" DesignColor="{StaticResource BaseColor}"/>
                        <c1:C1BrushBuilder x:Name="MouseOverBrush" Input="{TemplateBinding c1:ClearStyleExtensions.MouseOverBrush}" DesignBrush="{StaticResource ToolBarOffice2010BkgOverBrush}" DesignColor="{StaticResource ToolbarOffice2010OverColor}"/>
                        <c1:C1BrushBuilder x:Name="PressedBrush" Input="{TemplateBinding c1:ClearStyleExtensions.PressedBrush}" DesignBrush="{StaticResource ToolBarOffice2010BkgSelectedBrush}" DesignColor="{StaticResource ToolbarOffice2010SelectedColor}"/>
                        <c1:C1BrushBuilder x:Name="CheckedBrush" Input="{TemplateBinding c1:ClearStyleExtensions.PressedBrush}" DesignBrush="{StaticResource GeneralGradientCheckedBrush}" DesignColor="{StaticResource ToolbarOffice2010SelectedColor}"/>
                        <c1:C1BrushBuilder x:Name="InnerBorderBrush" Input="{Binding Background, RelativeSource={RelativeSource TemplatedParent}}" DesignBrush="{StaticResource InnerBorderBrush}" DesignColor="{StaticResource BaseColor}"/>
                        <c1:C1BrushBuilder x:Name="InnerBorderMouseOverBrush" Input="{TemplateBinding c1:ClearStyleExtensions.MouseOverBrush}" DesignBrush="{StaticResource InnerBorderMouseOverBrush}" DesignColor="{StaticResource ToolbarOffice2010OverColor}"/>
                        <Border x:Name="BackgroundElement"
								Background="{Binding Output, ElementName=BackgroundBrush}" 
								BorderBrush="{TemplateBinding BorderBrush}"
								BorderThickness="{TemplateBinding BorderThickness}" 
								CornerRadius="{TemplateBinding c1:ClearStyleExtensions.CornerRadius}">
                            <Border BorderBrush="{Binding Output, ElementName=InnerBorderBrush}" 
								BorderThickness="{StaticResource InnerBorderThickness}" 
								CornerRadius="{TemplateBinding c1:ClearStyleExtensions.CornerRadius}"/>
                        </Border>
                        <Border x:Name="CheckedElement" 
								Background="{Binding Output, ElementName=CheckedBrush}" 
								BorderThickness="{TemplateBinding BorderThickness}" 
								CornerRadius="{TemplateBinding c1:ClearStyleExtensions.CornerRadius}"
								Visibility="Collapsed"/>
                        <Border x:Name="MouseOverElement" 
								Background="{Binding Output, ElementName=MouseOverBrush}" 
								BorderThickness="{TemplateBinding BorderThickness}" 
								CornerRadius="{TemplateBinding c1:ClearStyleExtensions.CornerRadius}"
								Visibility="Collapsed">
                            <Border BorderBrush="{Binding Output, ElementName=InnerBorderMouseOverBrush}" 
								BorderThickness="{StaticResource InnerBorderThickness}" 
								CornerRadius="{TemplateBinding c1:ClearStyleExtensions.CornerRadius}" />
                        </Border>
                        <Border x:Name="PressedElement" 
								Background="{Binding Output, ElementName=PressedBrush}" 
								BorderThickness="{TemplateBinding BorderThickness}" 
								CornerRadius="{TemplateBinding c1:ClearStyleExtensions.CornerRadius}"
								Visibility="Collapsed"/>

                        <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
                        <Border x:Name="FocusVisualElement"
								BorderBrush="{TemplateBinding c1:ClearStyleExtensions.FocusBrush}"
								BorderThickness="{TemplateBinding BorderThickness}" 
								CornerRadius="{TemplateBinding c1:ClearStyleExtensions.CornerRadius}"
								IsHitTestVisible="false"  
								Opacity="0"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- 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>

    <!-- C1DropDown @ C1ToolbarGroup-->
    <Style x:Key="groupDropDown" TargetType="c1:C1DropDownButton">
        <Setter Property="AutoClose" Value="true"/>
        <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>
                            <VisualStateGroup x:Name="ValidationStates">
                                <VisualState x:Name="Valid"/>
                                <VisualState x:Name="InvalidUnfocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ValidationDecorator" Storyboard.TargetProperty="ValidationState">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <c1:ValidationState>InvalidUnfocused</c1:ValidationState>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="InvalidFocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ValidationDecorator" Storyboard.TargetProperty="ValidationState">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <c1:ValidationState>InvalidFocused</c1:ValidationState>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <ToggleButton x:Name="ArrowToggle"
								Style="{StaticResource ClearStyleButtonStyle}"
								c1:ClearStyleExtensions.MouseOverBrush="{TemplateBinding MouseOverBrush}"
								c1:ClearStyleExtensions.PressedBrush="{TemplateBinding PressedBrush}"
								c1:ClearStyleExtensions.FocusBrush="{TemplateBinding FocusBrush}"
								c1:ClearStyleExtensions.CornerRadius="{StaticResource GeneralCornerRadius}"
								Background="Transparent"
								Foreground="{TemplateBinding Foreground}"
								BorderBrush="{TemplateBinding BorderBrush}"
								BorderThickness="0 0 1 0"
								VerticalContentAlignment="{TemplateBinding VerticalHeaderAlignment}"
								HorizontalContentAlignment="{TemplateBinding HorizontalHeaderAlignment}"
								Padding="0"
								IsTabStop="True">
                            <Grid Margin="{TemplateBinding BorderThickness}">
                                <Grid.RowDefinitions>
                                    <RowDefinition />
                                    <RowDefinition Height="Auto"/>
                                </Grid.RowDefinitions>
                                <ContentPresenter Content="{TemplateBinding Header}" Margin="{TemplateBinding HeaderPadding}"/>
                                <Polygon x:Name="ArrowPolygon" 
										Points="0,0 2,0 1,1" 
										Grid.Row="1" 
										Margin="2" 
										Stretch="Uniform" 
										Fill="{TemplateBinding Foreground}" 
										Width="7" 
										Height="4" 
										StrokeThickness="1" />
                            </Grid>
                        </ToggleButton>
                        <c1:C1ValidationDecorator x:Name="ValidationDecorator" Target="{Binding RelativeSource={RelativeSource TemplatedParent}}" Style="{TemplateBinding ValidationDecoratorStyle}"/>
                        <Popup x:Name="DropDownPopup" VerticalAlignment="Bottom">
                            <Grid Width="{Binding DropDownWidth, RelativeSource={RelativeSource TemplatedParent}}" 
									Height="{Binding DropDownHeight, RelativeSource={RelativeSource TemplatedParent}}"
									MinWidth="{Binding MinDropDownWidth, RelativeSource={RelativeSource TemplatedParent}}"
									MinHeight="{Binding MinDropDownHeight, RelativeSource={RelativeSource TemplatedParent}}"
									MaxWidth="{Binding MaxDropDownWidth, RelativeSource={RelativeSource TemplatedParent}}"
									MaxHeight="{Binding MaxDropDownHeight, RelativeSource={RelativeSource TemplatedParent}}">
                                <ContentPresenter Margin="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}}"/>
                            </Grid>
                        </Popup>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- @ C1ToolbarExpandButton -->
    <Style x:Key="C1ToolbarExpandButtonStyle" TargetType="ButtonBase">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ButtonBase">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverElement" Storyboard.TargetProperty="(UIElement.Visibility)" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PressedElement" Storyboard.TargetProperty="(UIElement.Visibility)" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled"/>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CheckStates">
                                <VisualState x:Name="Checked">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="contentPresenter" Duration="00:00:00.2" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" To="180"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unchecked">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="contentPresenter" Duration="00:00:00.2" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" To="0"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualElement"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <c1:C1BrushBuilder x:Name="BackgroundBrush" Input="{Binding Background, RelativeSource={RelativeSource TemplatedParent}}" DesignBrush="{StaticResource ToolBarOffice2010ButtontBrush}" DesignColor="{StaticResource BaseColor}"/>
                        <c1:C1BrushBuilder x:Name="MouseOverBrush" Input="{TemplateBinding c1:ClearStyleExtensions.MouseOverBrush}" DesignBrush="{StaticResource ToolBarOffice2010BkgOverBrush}" DesignColor="{StaticResource ToolbarOffice2010OverColor}"/>
                        <c1:C1BrushBuilder x:Name="PressedBrush" Input="{TemplateBinding c1:ClearStyleExtensions.PressedBrush}" DesignBrush="{StaticResource ToolBarOffice2010BkgSelectedBrush}" DesignColor="{StaticResource ToolbarOffice2010SelectedColor}"/>
                        <c1:C1BrushBuilder x:Name="InnerBorderBrush" Input="{Binding Background, RelativeSource={RelativeSource TemplatedParent}}" DesignBrush="{StaticResource InnerBorderBrush}" DesignColor="{StaticResource BaseColor}"/>
                        <c1:C1BrushBuilder x:Name="InnerBorderMouseOverBrush" Input="{TemplateBinding c1:ClearStyleExtensions.MouseOverBrush}" DesignBrush="{StaticResource InnerBorderMouseOverBrush}" DesignColor="{StaticResource ToolbarOffice2010OverColor}"/>
                        <Border x:Name="BackgroundElement"
								Background="{Binding Output, ElementName=BackgroundBrush}" 
								BorderBrush="{TemplateBinding BorderBrush}"
								BorderThickness="{TemplateBinding BorderThickness}" 
								CornerRadius="{TemplateBinding c1:ClearStyleExtensions.CornerRadius}">
                            <Border BorderBrush="{Binding Output, ElementName=InnerBorderBrush}" 
								BorderThickness="{StaticResource InnerBorderThickness}" 
								CornerRadius="{TemplateBinding c1:ClearStyleExtensions.CornerRadius}"/>
                        </Border>
                        <Border x:Name="MouseOverElement" 
								Background="{Binding Output, ElementName=MouseOverBrush}" 
								BorderThickness="{TemplateBinding BorderThickness}" 
								CornerRadius="{TemplateBinding c1:ClearStyleExtensions.CornerRadius}"
								Visibility="Collapsed">
                            <Border BorderBrush="{Binding Output, ElementName=InnerBorderMouseOverBrush}" 
								BorderThickness="{StaticResource InnerBorderThickness}" 
								CornerRadius="{TemplateBinding c1:ClearStyleExtensions.CornerRadius}" />
                        </Border>
                        <Border x:Name="PressedElement" 
								Background="{Binding Output, ElementName=PressedBrush}" 
								BorderThickness="{TemplateBinding BorderThickness}" 
								CornerRadius="{TemplateBinding c1:ClearStyleExtensions.CornerRadius}"
								Visibility="Collapsed"/>
                        <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" RenderTransformOrigin="0.5,0.5">
                            <ContentPresenter.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform/>
                                    <SkewTransform/>
                                    <RotateTransform />
                                    <TranslateTransform/>
                                </TransformGroup>
                            </ContentPresenter.RenderTransform>
                        </ContentPresenter>
                        <Border x:Name="FocusVisualElement"
								BorderBrush="{TemplateBinding c1:ClearStyleExtensions.FocusBrush}"
								BorderThickness="{TemplateBinding BorderThickness}" 
								CornerRadius="{TemplateBinding c1:ClearStyleExtensions.CornerRadius}"
								IsHitTestVisible="false"  
								Opacity="0"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- C1ToolbarDialogBoxLauncherButton @ C1ToolbarGroup-->
    <Style x:Key="C1ToolbarDialogBoxLauncherButton" TargetType="Button">
        <Setter Property="Width" Value="15"/>
        <Setter Property="Height" Value="15"/>
        <Setter Property="Foreground" Value="#FF000000"/>
        <Setter Property="Padding" Value="4"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="MouseOverElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed"/>
                                <VisualState x:Name="Disabled"/>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused"/>
                                <VisualState x:Name="Unfocused"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <c1:C1BrushBuilder x:Name="MouseOverBrush" Input="{TemplateBinding c1:ClearStyleExtensions.MouseOverBrush}" DesignBrush="{StaticResource ToolBarOffice2010BkgOverBrush}" DesignColor="{StaticResource ToolbarOffice2010OverColor}"/>
                        <c1:C1BrushBuilder x:Name="InnerBorderMouseOverBrush" Input="{TemplateBinding c1:ClearStyleExtensions.MouseOverBrush}" DesignBrush="{StaticResource InnerBorderMouseOverBrush}" DesignColor="{StaticResource ToolbarOffice2010OverColor}"/>
                        <Border x:Name="MouseOverElement" 
								Background="{Binding Output, ElementName=MouseOverBrush}" 
								BorderThickness="{TemplateBinding BorderThickness}" 
								Visibility="Collapsed"
                                CornerRadius="{TemplateBinding c1:ClearStyleExtensions.CornerRadius}">
                            <Border BorderBrush="{Binding Output, ElementName=InnerBorderMouseOverBrush}" 
								BorderThickness="{StaticResource InnerBorderThickness}" 
                                CornerRadius="{TemplateBinding c1:ClearStyleExtensions.CornerRadius}"/>
                        </Border>
                        <ContentControl x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Margin="{TemplateBinding Padding}" Foreground="{TemplateBinding Foreground}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <!-- @ C1ToolbarGroup -->
    <Style x:Key="C1ToolbarGroupStyle" TargetType="c1:C1ToolbarGroup">
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <c1:C1ToolbarGroupPanel />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Margin" Value="{StaticResource ToolbarGroupMargin}" />
        <Setter Property="Padding" Value="{StaticResource ToolbarGroupPadding}" />
        <Setter Property="MinWidth" Value="64" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="c1:C1ToolbarGroup">
                    <Grid>
                        <c1:C1BrushBuilder x:Name="BackgroundBrush" Input="{TemplateBinding Background}" DesignBrush="{StaticResource ToolbarBackground}" DesignColor="{StaticResource BaseColor}"/>
                        <c1:C1BrushBuilder x:Name="InnerBorderBrush" Input="{TemplateBinding Background}" DesignBrush="{StaticResource ToolbarGroupInnerBorderBrush}" DesignColor="{StaticResource BaseColor}"/>
                        <c1:C1BrushBuilder x:Name="PopupBackgroundBrush" Input="{TemplateBinding Background}" DesignBrush="{StaticResource PopupBackgroundBrush}" DesignColor="{StaticResource BaseColor}"/>
                        <c1:C1BrushBuilder x:Name="PopupBorderBrush" Input="{TemplateBinding BorderBrush}" DesignBrush="{StaticResource ToolbarGroupBorderBrush}" DesignColor="{StaticResource BorderColor}"/>
                        <Grid x:Name="Normal">
                            <Border x:Name="BackgroundElement" 
                                    Background="{Binding Output, ElementName=BackgroundBrush}"
									BorderBrush="{TemplateBinding BorderBrush}"  
									BorderThickness="0 0 1 0"
									CornerRadius="{StaticResource ToolbarGroupCornerRadius}">
                                <Border x:Name="InnerBorderElement" BorderBrush="{Binding Output, ElementName=InnerBorderBrush}"  
										BorderThickness="{StaticResource ToolbarGroupInnerBorderThickness}"
										CornerRadius="{StaticResource ToolbarGroupInnerCornerRadius}">
                                    <Grid x:Name="NormalGrid">
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="*" />
                                            <RowDefinition Height="Auto" />
                                        </Grid.RowDefinitions>
                                        <ItemsPresenter x:Name="Items" Margin="{TemplateBinding Padding}" Grid.Row="0"/>
                                        <Border x:Name="HeaderBackgroundElement" Grid.Row="1">
                                            <Grid>
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition/>
                                                    <ColumnDefinition Width="Auto"/>
                                                </Grid.ColumnDefinitions>
                                                <ContentPresenter HorizontalAlignment="Center" Content="{TemplateBinding Header}" />
                                                <Button x:Name="DialogLauncher" Visibility="Collapsed" Grid.Column="1" Style="{StaticResource C1ToolbarDialogBoxLauncherButton}" c1:ClearStyleExtensions.MouseOverBrush="{TemplateBinding MouseOverBrush}">
                                                    <Path Data="M6,3 L7,3 L7,4 L7,6 L7,7 L6,7 L4,7 L3,7 L3,6 L4,6 L4,4 L6,4 z M3,3 L4,3 L4,4 L3,4 z M0,0 L1,0 L6,0 L6,1 L1,1 L1,6 L0,6 z" Fill="{TemplateBinding Foreground}" Stretch="Uniform" Opacity="0.3"/>
                                                </Button>
                                            </Grid>
                                        </Border>
                                    </Grid>
                                </Border>
                            </Border>
                        </Grid>
                        <Grid x:Name="Collapsed"  Visibility="Collapsed">
                            <c1:C1DropDownButton x:Name="DropDown" 
													   Background="{TemplateBinding Background}"
													   Foreground="{TemplateBinding Foreground}"
													   BorderBrush="{TemplateBinding BorderBrush}"
													   MouseOverBrush="{TemplateBinding MouseOverBrush}"
													   PressedBrush="{TemplateBinding PressedBrush}"
													   HeaderBackground="{TemplateBinding Background}"
													   HeaderForeground="{TemplateBinding Foreground}"
													   Style="{StaticResource groupDropDown}"
												 VerticalHeaderAlignment="Center"
												 HorizontalHeaderAlignment="Center">
                                <c1:C1DropDownButton.Header>
                                    <Grid>
                                        <TextBlock Grid.Row="1" Text="{TemplateBinding Header}" TextTrimming="WordEllipsis" TextAlignment="Center" VerticalAlignment="Center" />
                                    </Grid>
                                </c1:C1DropDownButton.Header>
                                <c1:C1DropDownButton.Content>
                                    <Border Background="{Binding ElementName=PopupBackgroundBrush, Path=Output}"
									BorderBrush="{Binding ElementName=PopupBorderBrush, Path=Output}"
									BorderThickness="{StaticResource GeneralThickness}"
									CornerRadius="{StaticResource PopupCornerRadius}">
                                        <Grid x:Name="CollapsedGrid" >
                                            <Grid.RowDefinitions>
                                                <RowDefinition />
                                                <RowDefinition Height="Auto" />
                                            </Grid.RowDefinitions>
                                            <Border Grid.Row="1" Background="{Binding ElementName=HeaderBackgroundBrush, Path=Output}" CornerRadius="{StaticResource ToolbarGroupHeaderCornerRadius}">
                                                <Grid>
                                                  <Grid.ColumnDefinitions>
                                                    <ColumnDefinition/>
                                                    <ColumnDefinition Width="Auto"/>
                                                  </Grid.ColumnDefinitions>

                                                    <TextBlock Text="{TemplateBinding Header}" TextTrimming="WordEllipsis" TextAlignment="Center" VerticalAlignment="Center" />
                          <Button x:Name="DialogLauncherCollapsed" Visibility="Collapsed" Grid.Column="1" Style="{StaticResource C1ToolbarDialogBoxLauncherButton}" c1:ClearStyleExtensions.MouseOverBrush="{TemplateBinding MouseOverBrush}">
                            <Path Data="M6,3 L7,3 L7,4 L7,6 L7,7 L6,7 L4,7 L3,7 L3,6 L4,6 L4,4 L6,4 z M3,3 L4,3 L4,4 L3,4 z M0,0 L1,0 L6,0 L6,1 L1,1 L1,6 L0,6 z" Fill="{TemplateBinding Foreground}" Stretch="Uniform" Opacity="0.3"/>
                          </Button>
                                                </Grid>
                                            </Border>
                                        </Grid>
                                    </Border>
                                </c1:C1DropDownButton.Content>
                            </c1:C1DropDownButton>
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- @ c1:C1TabControl -->
    <Style x:Key="C1ToolbarTabControlStyle" TargetType="c1:C1ToolbarTabControl">
        <Setter Property="TabStripOverlap" Value="0"/>
        <Setter Property="BorderThickness" Value="{StaticResource GeneralThickness}"/>
        <Setter Property="TabItemShape" Value="Rounded"/>
        <Setter Property="TabStripPlacement" Value="Top" />
        <Setter Property="Padding" Value="0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="c1:C1ToolbarTabControl">
                    <Grid x:Name="Root">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="TabStripPlacementStates">
                                <VisualState x:Name="BottomTabStripPlacement">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TabPanelPresenter" Storyboard.TargetProperty="Margin">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Thickness>8 -1 8 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 8 -1 8</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>8 0 8 -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>8 0 8 -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:C1BrushBuilder x:Name="BackgroundBrush" Input="{TemplateBinding Background}" DesignBrush="{StaticResource ToolBarOffice2010ButtontBrush}" DesignColor="{StaticResource BaseColor}"/>
                        <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:LineDefinition Length="Auto" />
                                    <c1:LineDefinition Length="Auto" />
                                </c1:C1LinePanel.LineDefinitions>

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

                                <!-- Previous -->
                                <Button x:Name="PreviousButton" 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" 
										>
                                    <Button.RenderTransform>
                                        <TransformGroup>
                                            <ScaleTransform/>
                                            <SkewTransform/>
                                            <RotateTransform/>
                                            <TranslateTransform/>
                                        </TransformGroup>
                                    </Button.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"/>
                                </Button>
                                <!-- TabPanel -->
                                <ContentPresenter x:Name="TabPanelPresenter" Grid.Column="1">
                                    <ContentPresenter.Content>
                                        <c1:C1TabPanel x:Name="TabPanel" 
												Orientation="Horizontal" 
												HorizontalAlignment="{TemplateBinding TabStripHorizontalAlignment}" 
												VerticalAlignment="{TemplateBinding TabStripVerticalAlignment}" />
                                    </ContentPresenter.Content>
                                </ContentPresenter>
                                <!-- Next -->
                                <Button x:Name="NextButton" Grid.Column="3" 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" 
										>
                                    <Button.RenderTransform>
                                        <TransformGroup>
                                            <ScaleTransform/>
                                            <SkewTransform/>
                                            <RotateTransform/>
                                            <TranslateTransform/>
                                        </TransformGroup>
                                    </Button.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"
											UseLayoutRounding="True"/>
                                </Button>
                                <!-- TabStripMenu  -->
                                <c1:C1DropDownButton x:Name="TabStripDropDown" Height="15" Width="15"
													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}"
													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" 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}"
										>
                                    <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"
										UseLayoutRounding="True"/>
                                </Button>
                                <!-- Collapse/Expand -->
                                <ToggleButton x:Name="CollapseButton" Style="{StaticResource C1ToolbarExpandButtonStyle}" Background="Transparent" BorderThickness="0" Height="22" Width="22">
                                    <Path Width="10" Height="8" Data="M5.0145311,0 L9.2833071,4.4663367 C9.2833071,4.4663367 9.6584311,4.8817816 9.6584311,4.8817816 C9.8740797,5.2009835 10,5.5857868 10,6.0000005 C10,7.1045699 9.1045694,8 8,8 C7.4477153,8 6.9477153,7.7761431 6.5857863,7.4142141 L6.5560269,7.3830004 L6.5534911,7.3830004 L5.0066848,5.7530007 L3.4501808,7.3830004 L3.4439728,7.3830004 L3.4142137,7.4142141 C3.0522847,7.7761431 2.5522847,8 2,8 C0.89543051,8 0,7.1045699 0,6.0000005 C0,5.5857868 0.12591991,5.2009835 0.34156859,4.8817816 L0.36416888,4.8499999 C0.36416888,4.8499999 0.62903774,4.5382209 0.72781432,4.4567032 L0.72962582,4.4552794 z" Stretch="Fill" Stroke="#FF505860" Fill="#FFE4DEC7"/>
                                </ToggleButton>
                                <!-- Help -->
                                <Button x:Name="HelpButton" Style="{StaticResource ClearStyleButtonStyle}" Background="Transparent" BorderThickness="0" Height="22" Width="22">
                                    <Grid Width="16" Height="16">
                                        <Ellipse Fill="#FF6090D0" Stroke="#FF4773B2"/>
                                        <Path Fill="White" Data="M2.6640625,8.627389 L4.1733398,8.627389 L4.1733398,10.136666 L2.6640625,10.136666 z M3.3837891,2.1820765 C4.2503252,2.1820765 4.9396157,2.4085579 5.4516602,2.8615198 C5.9637041,3.3144822 6.2197261,3.8417444 6.2197266,4.4433069 C6.2197261,4.7763147 6.1257319,5.0914192 5.9377441,5.3886194 C5.7497559,5.6858201 5.3478189,6.0904427 4.7319336,6.6024866 C4.4132485,6.8674607 4.2154131,7.080514 4.1384277,7.2416468 C4.0614419,7.4027796 4.0265298,7.6910286 4.0336914,8.1063929 L2.6640625,8.1063929 C2.6604817,7.9094529 2.6586914,7.7894983 2.6586914,7.7465296 C2.6586914,7.3025193 2.7320962,6.9372849 2.8789063,6.6508265 C3.0257161,6.3643684 3.3193359,6.0421028 3.7597656,5.6840296 C4.2001953,5.3259568 4.4633789,5.0914192 4.5493164,4.9804163 C4.6818032,4.8049607 4.7480469,4.6116014 4.7480469,4.4003382 C4.7480469,4.1067185 4.6307778,3.8551722 4.3962402,3.6456995 C4.1617022,3.4362268 3.8457029,3.3314905 3.4482422,3.3314905 C3.065104,3.3314905 2.7446289,3.4407029 2.4868164,3.6591272 C2.2290039,3.877552 2.0517578,4.2105598 1.9550781,4.6581507 L0.569336,4.4862757 C0.60872394,3.8453255 0.88175452,3.3010545 1.3884277,2.8534632 C1.8951008,2.4058723 2.5602212,2.1820765 3.3837891,2.1820765 z" Stretch="Fill" Height="10" Width="8" HorizontalAlignment="Center"/>
                                    </Grid>
                                </Button>

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

                            </c1:C1LinePanel>
                            <Border Background="{Binding ElementName=BackgroundBrush, Path=Output}" 
									BorderBrush="{TemplateBinding BorderBrush}" 
									BorderThickness="{TemplateBinding BorderThickness}" 
									Padding="{TemplateBinding Padding}">
                                <ContentPresenter x:Name="SelectedItemContent" />
                            </Border>

                        </c1:C1LinePanel>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    
    <!-- C1Toolbar -->
    <Style x:Key="C1ToolbarOffice2010" TargetType="c1:C1Toolbar">
        <Setter Property="Padding" Value="{StaticResource ToolbarPadding}" />
        <Setter Property="Background" Value="#FFD8E4F2" />
        <Setter Property="BorderBrush" Value="{StaticResource ToolbarBorderBrush}" />
        <Setter Property="BorderThickness" Value="{StaticResource GeneralThickness}" />
        <Setter Property="Foreground" Value="{StaticResource ToolbarForegroundBrush}" />
        <Setter Property="MouseOverBrush" Value="{StaticResource ToolbarOffice2010OverBrush}"/>
        <Setter Property="PressedBrush" Value="{StaticResource ToolbarOffice2010SelectedBrush}"/>
        <Setter Property="FocusBrush" Value="{StaticResource ToolbarOffice2010SelectedBrush}"/>
        <Setter Property="HorizontalAlignment" Value="Stretch" />
        <Setter Property="VerticalAlignment" Value="Top" />
        <Setter Property="ToolbarGroupStyle" Value="{StaticResource C1ToolbarGroupStyle}" />
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <c1:C1ToolbarPanel />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="c1:C1Toolbar">
                    <Grid>
                    	<c1:C1BrushBuilder x:Name="TabSelectedBackground" Input="{Binding Background, RelativeSource={RelativeSource TemplatedParent}}" DesignBrush="{StaticResource ToolBarOffice2010SelectedTabBrush}" DesignColor="{StaticResource BaseColor}"/>
                        <Border BorderBrush="{TemplateBinding BorderBrush}" 
    							BorderThickness="{TemplateBinding BorderThickness}"
    							Background="{TemplateBinding Background}"
    							HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
    							VerticalAlignment="{TemplateBinding VerticalAlignment}"
    							CornerRadius="{StaticResource ToolbarCornerRadius}">
                            <Grid Margin="{TemplateBinding Padding}">
                                <ItemsPresenter x:Name="itemsPresenter"   />
                                <c1:C1ToolbarTabControl x:Name="tabControl" Visibility="Collapsed" 
                                        Style="{StaticResource C1ToolbarTabControlStyle}" Background="{TemplateBinding Background}" SelectedBackground="{Binding ElementName=TabSelectedBackground, Path=Output}" BorderBrush="{TemplateBinding BorderBrush}" Foreground="{TemplateBinding Foreground}" TabStripForeground="{TemplateBinding Foreground}" MouseOverBrush="{TemplateBinding MouseOverBrush}" PressedBrush="{TemplateBinding PressedBrush}" />
                            </Grid>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>
