<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:ui="clr-namespace:GitHub.UI"
                    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                    mc:Ignorable="d">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Controls/AutoCompleteBox.xaml" />
        <ResourceDictionary Source="Controls/ScrollViewerWithShadow.xaml" />
        <ResourceDictionary Source="../Controls/Octicons/OcticonImage.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <!--
    Styles for standard windows controls
    -->

    <!-- ProgressBar -->
    <Style x:Key="GitHubProgressBar" TargetType="{x:Type ui:GitHubProgressBar}">
        <Setter Property="Foreground" Value="{DynamicResource GitHubAccentBrush}" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Height" Value="4" />
        <Setter Property="IsHitTestVisible" Value="False" />
        <Setter Property="Focusable" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Grid Margin="{TemplateBinding Padding}">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Determinate">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)"
                                                   Storyboard.TargetName="InDeterminateGrid">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Indeterminate">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)"
                                                   Storyboard.TargetName="DeterminateGrid">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Rectangle HorizontalAlignment="Stretch" Fill="{TemplateBinding Background}" StrokeThickness="0" />
                        <Grid x:Name="DeterminateGrid">
                            <Rectangle HorizontalAlignment="Left" Fill="{TemplateBinding Foreground}"
                         Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IndicatorWidth}" StrokeThickness="0" />
                        </Grid>
                        <Grid x:Name="InDeterminateGrid">
                            <Rectangle Fill="{TemplateBinding Foreground}" Width="4" x:Name="R0" Opacity="0"
                         HorizontalAlignment="Left" />
                            <Rectangle Fill="{TemplateBinding Foreground}" Width="4" x:Name="R1" Opacity="0"
                         HorizontalAlignment="Left" />
                            <Rectangle Fill="{TemplateBinding Foreground}" Width="4" x:Name="R2" Opacity="0"
                         HorizontalAlignment="Left" />
                            <Rectangle Fill="{TemplateBinding Foreground}" Width="4" x:Name="R3" Opacity="0"
                         HorizontalAlignment="Left" />
                            <Rectangle Fill="{TemplateBinding Foreground}" Width="4" x:Name="R4" Opacity="0"
                         HorizontalAlignment="Left" />
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="GitHubSyncProgressBar" TargetType="{x:Type ProgressBar}">
        <Style.Resources>
            <PathGeometry x:Key="CircleBottomX"
                        Figures="M16,7.5 C16,12.19442 12.19442,16 7.5,16 C2.8055796,16 -1,12.19442 -1,7.5 " />
            <PathGeometry x:Key="CircleBottomY"
                        Figures="M16,7.5 C16,12.19442 12.19442,16 7.5,16 C2.8055796,16 -1,12.19442 -1,7.5 " />
            <PathGeometry x:Key="CircleTopX"
                        Figures="M-1,7.5 C-1,2.8055796 2.8055796,-1 7.5,-1 C12.19442,-1 16,2.8055796 16,7.5 " />
            <PathGeometry x:Key="CircleTopY"
                        Figures="M-1,7.5 C-1,2.8055796 2.8055796,-1 7.5,-1 C12.19442,-1 16,2.8055796 16,7.5" />
            <PowerEase x:Key="EaseIn" EasingMode="EaseIn" />
            <Style x:Key="Circle" TargetType="Ellipse">
            <Setter Property="StrokeThickness" Value="0" />
            <Setter Property="Height" Value="3" />
            <Setter Property="Width" Value="3" />
            <Setter Property="IsHitTestVisible" Value="False" />
            <Setter Property="Opacity" Value="0" />
            </Style>
        </Style.Resources>
        <Setter Property="Maximum" Value="100" />
        <Setter Property="IsHitTestVisible" Value="False" />
        <Setter Property="Focusable" Value="False" />
        <Setter Property="Foreground" Value="{DynamicResource GitHubAccentBrush}" />
        <Setter Property="BorderBrush" Value="#999999" />
        <Setter Property="Template">
            <Setter.Value>
            <ControlTemplate TargetType="{x:Type ProgressBar}">
                <ControlTemplate.Resources>
                <Storyboard x:Key="IndeterminateStoryboard" RepeatBehavior="Forever" Duration="0:0:4">
                    <!--e1-->
                    <DoubleAnimationUsingPath BeginTime="0:0:0.0" Duration="0:0:0.3" DecelerationRatio="1" Source="X"
                                            PathGeometry="{StaticResource CircleBottomX}"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"
                                            Storyboard.TargetName="e1" />
                    <DoubleAnimationUsingPath BeginTime="0:0:0.0" Duration="0:0:0.3" DecelerationRatio="1" Source="Y"
                                            PathGeometry="{StaticResource CircleBottomY}"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"
                                            Storyboard.TargetName="e1" />
                    <DoubleAnimationUsingPath BeginTime="0:0:0.3" Duration="0:0:1" Source="X"
                                            PathGeometry="{StaticResource CircleTopX}"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"
                                            Storyboard.TargetName="e1" />
                    <DoubleAnimationUsingPath BeginTime="0:0:0.3" Duration="0:0:1" Source="Y"
                                            PathGeometry="{StaticResource CircleTopY}"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"
                                            Storyboard.TargetName="e1" />
                    <DoubleAnimationUsingPath BeginTime="0:0:1.3" Duration="0:0:0.3" DecelerationRatio="1" Source="X"
                                            PathGeometry="{StaticResource CircleBottomX}"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"
                                            Storyboard.TargetName="e1" />
                    <DoubleAnimationUsingPath BeginTime="0:0:1.3" Duration="0:0:0.3" DecelerationRatio="1" Source="Y"
                                            PathGeometry="{StaticResource CircleBottomY}"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"
                                            Storyboard.TargetName="e1" />
                    <DoubleAnimationUsingPath BeginTime="0:0:1.6" Duration="0:0:1" Source="X"
                                            PathGeometry="{StaticResource CircleTopX}"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"
                                            Storyboard.TargetName="e1" />
                    <DoubleAnimationUsingPath BeginTime="0:0:1.6" Duration="0:0:1" Source="Y"
                                            PathGeometry="{StaticResource CircleTopY}"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"
                                            Storyboard.TargetName="e1" />

                    <!--e2-->
                    <DoubleAnimationUsingPath BeginTime="0:0:0.12" Duration="0:0:0.3" DecelerationRatio="1" Source="X"
                                            PathGeometry="{StaticResource CircleBottomX}"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"
                                            Storyboard.TargetName="e2" />
                    <DoubleAnimationUsingPath BeginTime="0:0:0.12" Duration="0:0:0.3" DecelerationRatio="1" Source="Y"
                                            PathGeometry="{StaticResource CircleBottomY}"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"
                                            Storyboard.TargetName="e2" />
                    <DoubleAnimationUsingPath BeginTime="0:0:0.42" Duration="0:0:1" Source="X"
                                            PathGeometry="{StaticResource CircleTopX}"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"
                                            Storyboard.TargetName="e2" />
                    <DoubleAnimationUsingPath BeginTime="0:0:0.42" Duration="0:0:1" Source="Y"
                                            PathGeometry="{StaticResource CircleTopY}"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"
                                            Storyboard.TargetName="e2" />
                    <DoubleAnimationUsingPath BeginTime="0:0:1.42" Duration="0:0:0.3" DecelerationRatio="1" Source="X"
                                            PathGeometry="{StaticResource CircleBottomX}"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"
                                            Storyboard.TargetName="e2" />
                    <DoubleAnimationUsingPath BeginTime="0:0:1.42" Duration="0:0:0.3" DecelerationRatio="1" Source="Y"
                                            PathGeometry="{StaticResource CircleBottomY}"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"
                                            Storyboard.TargetName="e2" />
                    <DoubleAnimationUsingPath BeginTime="0:0:1.72" Duration="0:0:1" Source="X"
                                            PathGeometry="{StaticResource CircleTopX}"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"
                                            Storyboard.TargetName="e2" />
                    <DoubleAnimationUsingPath BeginTime="0:0:1.72" Duration="0:0:1" Source="Y"
                                            PathGeometry="{StaticResource CircleTopY}"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"
                                            Storyboard.TargetName="e2" />

                    <!--e3-->
                    <DoubleAnimationUsingPath BeginTime="0:0:0.23" Duration="0:0:0.3" DecelerationRatio="1" Source="X"
                                            PathGeometry="{StaticResource CircleBottomX}"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"
                                            Storyboard.TargetName="e3" />
                    <DoubleAnimationUsingPath BeginTime="0:0:0.23" Duration="0:0:0.3" DecelerationRatio="1" Source="Y"
                                            PathGeometry="{StaticResource CircleBottomY}"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"
                                            Storyboard.TargetName="e3" />
                    <DoubleAnimationUsingPath BeginTime="0:0:0.53" Duration="0:0:1" Source="X"
                                            PathGeometry="{StaticResource CircleTopX}"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"
                                            Storyboard.TargetName="e3" />
                    <DoubleAnimationUsingPath BeginTime="0:0:0.53" Duration="0:0:1" Source="Y"
                                            PathGeometry="{StaticResource CircleTopY}"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"
                                            Storyboard.TargetName="e3" />
                    <DoubleAnimationUsingPath BeginTime="0:0:1.53" Duration="0:0:0.3" DecelerationRatio="1" Source="X"
                                            PathGeometry="{StaticResource CircleBottomX}"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"
                                            Storyboard.TargetName="e3" />
                    <DoubleAnimationUsingPath BeginTime="0:0:1.53" Duration="0:0:0.3" DecelerationRatio="1" Source="Y"
                                            PathGeometry="{StaticResource CircleBottomY}"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"
                                            Storyboard.TargetName="e3" />
                    <DoubleAnimationUsingPath BeginTime="0:0:1.83" Duration="0:0:1" Source="X"
                                            PathGeometry="{StaticResource CircleTopX}"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"
                                            Storyboard.TargetName="e3" />
                    <DoubleAnimationUsingPath BeginTime="0:0:1.83" Duration="0:0:1" Source="Y"
                                            PathGeometry="{StaticResource CircleTopY}"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"
                                            Storyboard.TargetName="e3" />

                    <!--e4-->
                    <DoubleAnimationUsingPath BeginTime="0:0:0.34" Duration="0:0:0.3" DecelerationRatio="1" Source="X"
                                            PathGeometry="{StaticResource CircleBottomX}"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"
                                            Storyboard.TargetName="e4" />
                    <DoubleAnimationUsingPath BeginTime="0:0:0.34" Duration="0:0:0.3" DecelerationRatio="1" Source="Y"
                                            PathGeometry="{StaticResource CircleBottomY}"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"
                                            Storyboard.TargetName="e4" />
                    <DoubleAnimationUsingPath BeginTime="0:0:0.64" Duration="0:0:1" Source="X"
                                            PathGeometry="{StaticResource CircleTopX}"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"
                                            Storyboard.TargetName="e4" />
                    <DoubleAnimationUsingPath BeginTime="0:0:0.64" Duration="0:0:1" Source="Y"
                                            PathGeometry="{StaticResource CircleTopY}"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"
                                            Storyboard.TargetName="e4" />
                    <DoubleAnimationUsingPath BeginTime="0:0:1.64" Duration="0:0:0.3" DecelerationRatio="1" Source="X"
                                            PathGeometry="{StaticResource CircleBottomX}"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"
                                            Storyboard.TargetName="e4" />
                    <DoubleAnimationUsingPath BeginTime="0:0:1.64" Duration="0:0:0.3" DecelerationRatio="1" Source="Y"
                                            PathGeometry="{StaticResource CircleBottomY}"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"
                                            Storyboard.TargetName="e4" />
                    <DoubleAnimationUsingPath BeginTime="0:0:1.93" Duration="0:0:1" Source="X"
                                            PathGeometry="{StaticResource CircleTopX}"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"
                                            Storyboard.TargetName="e4" />
                    <DoubleAnimationUsingPath BeginTime="0:0:1.93" Duration="0:0:1" Source="Y"
                                            PathGeometry="{StaticResource CircleTopY}"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"
                                            Storyboard.TargetName="e4" />

                    <!--e5-->
                    <DoubleAnimationUsingPath BeginTime="0:0:0.45" Duration="0:0:0.3" DecelerationRatio="1" Source="X"
                                            PathGeometry="{StaticResource CircleBottomX}"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"
                                            Storyboard.TargetName="e5" />
                    <DoubleAnimationUsingPath BeginTime="0:0:0.45" Duration="0:0:0.3" DecelerationRatio="1" Source="Y"
                                            PathGeometry="{StaticResource CircleBottomY}"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"
                                            Storyboard.TargetName="e5" />
                    <DoubleAnimationUsingPath BeginTime="0:0:0.75" Duration="0:0:1" Source="X"
                                            PathGeometry="{StaticResource CircleTopX}"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"
                                            Storyboard.TargetName="e5" />
                    <DoubleAnimationUsingPath BeginTime="0:0:0.75" Duration="0:0:1" Source="Y"
                                            PathGeometry="{StaticResource CircleTopY}"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"
                                            Storyboard.TargetName="e5" />
                    <DoubleAnimationUsingPath BeginTime="0:0:1.75" Duration="0:0:0.3" DecelerationRatio="1" Source="X"
                                            PathGeometry="{StaticResource CircleBottomX}"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"
                                            Storyboard.TargetName="e5" />
                    <DoubleAnimationUsingPath BeginTime="0:0:1.75" Duration="0:0:0.3" DecelerationRatio="1" Source="Y"
                                            PathGeometry="{StaticResource CircleBottomY}"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"
                                            Storyboard.TargetName="e5" />
                    <DoubleAnimationUsingPath BeginTime="0:0:2.05" Duration="0:0:1" Source="X"
                                            PathGeometry="{StaticResource CircleTopX}"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"
                                            Storyboard.TargetName="e5" />
                    <DoubleAnimationUsingPath BeginTime="0:0:2.05" Duration="0:0:1" Source="Y"
                                            PathGeometry="{StaticResource CircleTopY}"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"
                                            Storyboard.TargetName="e5" />

                    <!--e6-->
                    <!--<DoubleAnimationUsingPath BeginTime="0:0:0.56" Duration="0:0:0.3" DecelerationRatio="1" Source="X" PathGeometry="{StaticResource CircleBottomX}" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="e6" />
                                <DoubleAnimationUsingPath BeginTime="0:0:0.56" Duration="0:0:0.3" DecelerationRatio="1" Source="Y" PathGeometry="{StaticResource CircleBottomY}" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="e6" />
                                <DoubleAnimationUsingPath BeginTime="0:0:0.86" Duration="0:0:1" Source="X" PathGeometry="{StaticResource CircleTopX}" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="e6" />
                                <DoubleAnimationUsingPath BeginTime="0:0:0.86" Duration="0:0:1" Source="Y" PathGeometry="{StaticResource CircleTopY}" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="e6" />
                                <DoubleAnimationUsingPath BeginTime="0:0:1.86" Duration="0:0:0.3" DecelerationRatio="1" Source="X" PathGeometry="{StaticResource CircleBottomX}" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="e6" />
                                <DoubleAnimationUsingPath BeginTime="0:0:1.86" Duration="0:0:0.3" DecelerationRatio="1" Source="Y" PathGeometry="{StaticResource CircleBottomY}" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="e6" />
                                <DoubleAnimationUsingPath BeginTime="0:0:2.16" Duration="0:0:1" Source="X" PathGeometry="{StaticResource CircleTopX}" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="e6" />
                                <DoubleAnimationUsingPath BeginTime="0:0:2.16" Duration="0:0:1" Source="Y" PathGeometry="{StaticResource CircleTopY}" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="e6" />-->

                    <DoubleAnimationUsingKeyFrames BeginTime="0:0:0" Storyboard.TargetProperty="Opacity"
                                                    Storyboard.TargetName="e1">
                    <EasingDoubleKeyFrame KeyTime="0:0:0.0" Value="0" EasingFunction="{StaticResource EaseIn}" />
                    <EasingDoubleKeyFrame KeyTime="0:0:0.03" Value="1" EasingFunction="{StaticResource EaseIn}" />
                    <EasingDoubleKeyFrame KeyTime="0:0:2.0" Value="1" EasingFunction="{StaticResource EaseIn}" />
                    <EasingDoubleKeyFrame KeyTime="0:0:2.6" Value="0" EasingFunction="{StaticResource EaseIn}" />
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames BeginTime="0:0:0" Storyboard.TargetProperty="Opacity"
                                                    Storyboard.TargetName="e2">
                    <EasingDoubleKeyFrame KeyTime="0:0:0.12" Value="0" EasingFunction="{StaticResource EaseIn}" />
                    <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1" EasingFunction="{StaticResource EaseIn}" />
                    <EasingDoubleKeyFrame KeyTime="0:0:2.1" Value="1" EasingFunction="{StaticResource EaseIn}" />
                    <EasingDoubleKeyFrame KeyTime="0:0:2.7" Value="0" EasingFunction="{StaticResource EaseIn}" />
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames BeginTime="0:0:0" Storyboard.TargetProperty="Opacity"
                                                    Storyboard.TargetName="e3">
                    <EasingDoubleKeyFrame KeyTime="0:0:0.23" Value="0" EasingFunction="{StaticResource EaseIn}" />
                    <EasingDoubleKeyFrame KeyTime="0:0:0.26" Value="1" EasingFunction="{StaticResource EaseIn}" />
                    <EasingDoubleKeyFrame KeyTime="0:0:2.2" Value="1" EasingFunction="{StaticResource EaseIn}" />
                    <EasingDoubleKeyFrame KeyTime="0:0:2.8" Value="0" EasingFunction="{StaticResource EaseIn}" />
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames BeginTime="0:0:0" Storyboard.TargetProperty="Opacity"
                                                    Storyboard.TargetName="e4">
                    <EasingDoubleKeyFrame KeyTime="0:0:0.34" Value="0" EasingFunction="{StaticResource EaseIn}" />
                    <EasingDoubleKeyFrame KeyTime="0:0:0.37" Value="1" EasingFunction="{StaticResource EaseIn}" />
                    <EasingDoubleKeyFrame KeyTime="0:0:2.3" Value="1" EasingFunction="{StaticResource EaseIn}" />
                    <EasingDoubleKeyFrame KeyTime="0:0:2.9" Value="0" EasingFunction="{StaticResource EaseIn}" />
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames BeginTime="0:0:0" Storyboard.TargetProperty="Opacity"
                                                    Storyboard.TargetName="e5">
                    <EasingDoubleKeyFrame KeyTime="0:0:0.45" Value="0" EasingFunction="{StaticResource EaseIn}" />
                    <EasingDoubleKeyFrame KeyTime="0:0:0.48" Value="1" EasingFunction="{StaticResource EaseIn}" />
                    <EasingDoubleKeyFrame KeyTime="0:0:2.4" Value="1" EasingFunction="{StaticResource EaseIn}" />
                    <EasingDoubleKeyFrame KeyTime="0:0:3.0" Value="0" EasingFunction="{StaticResource EaseIn}" />
                    </DoubleAnimationUsingKeyFrames>
                    <!--<DoubleAnimationUsingKeyFrames BeginTime="0:0:0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="e6">
                                    <EasingDoubleKeyFrame KeyTime="0:0:0.56" Value="0" EasingFunction="{StaticResource EaseIn}" />
                                    <EasingDoubleKeyFrame KeyTime="0:0:0.59" Value="1" EasingFunction="{StaticResource EaseIn}" />
                                    <EasingDoubleKeyFrame KeyTime="0:0:2.5" Value="1" EasingFunction="{StaticResource EaseIn}" />
                                    <EasingDoubleKeyFrame KeyTime="0:0:3.1" Value="0" EasingFunction="{StaticResource EaseIn}" />
                                </DoubleAnimationUsingKeyFrames>-->
                </Storyboard>
                </ControlTemplate.Resources>
                <Canvas x:Name="IndeterminateRoot" Width="18" Height="18" Margin="0,0,0,0" Visibility="Visible">
                <Ellipse x:Name="e1" Fill="{TemplateBinding Foreground}" Stroke="{TemplateBinding BorderBrush}"
                            Style="{StaticResource Circle}">
                    <Ellipse.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform />
                        <SkewTransform />
                        <RotateTransform />
                        <TranslateTransform />
                    </TransformGroup>
                    </Ellipse.RenderTransform>
                </Ellipse>
                <Ellipse x:Name="e2" Fill="{TemplateBinding Foreground}" Stroke="{TemplateBinding BorderBrush}"
                            Style="{StaticResource Circle}">
                    <Ellipse.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform />
                        <SkewTransform />
                        <RotateTransform />
                        <TranslateTransform X="16" Y="7.5" />
                    </TransformGroup>
                    </Ellipse.RenderTransform>
                </Ellipse>
                <Ellipse x:Name="e3" Fill="{TemplateBinding Foreground}" Stroke="{TemplateBinding BorderBrush}"
                            Style="{StaticResource Circle}">
                    <Ellipse.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform />
                        <SkewTransform />
                        <RotateTransform />
                        <TranslateTransform X="16" Y="7.5" />
                    </TransformGroup>
                    </Ellipse.RenderTransform>
                </Ellipse>
                <Ellipse x:Name="e4" Fill="{TemplateBinding Foreground}" Stroke="{TemplateBinding BorderBrush}"
                            Style="{StaticResource Circle}">
                    <Ellipse.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform />
                        <SkewTransform />
                        <RotateTransform />
                        <TranslateTransform X="16" Y="7.5" />
                    </TransformGroup>
                    </Ellipse.RenderTransform>
                </Ellipse>
                <Ellipse x:Name="e5" Fill="{TemplateBinding Foreground}" Stroke="{TemplateBinding BorderBrush}"
                            Style="{StaticResource Circle}">
                    <Ellipse.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform />
                        <SkewTransform />
                        <RotateTransform />
                        <TranslateTransform X="16" Y="7.5" />
                    </TransformGroup>
                    </Ellipse.RenderTransform>
                </Ellipse>
                <!--<Ellipse x:Name="e6" Fill="{TemplateBinding Foreground}" Stroke="{TemplateBinding BorderBrush}" Style="{StaticResource Circle}">
                                <Ellipse.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform />
                                        <SkewTransform />
                                        <RotateTransform />
                                        <TranslateTransform X="16" Y="7.5" />
                                    </TransformGroup>
                                </Ellipse.RenderTransform>
                            </Ellipse>-->
                </Canvas>
                <ControlTemplate.Triggers>
                <MultiTrigger>
                    <MultiTrigger.Conditions>
                    <Condition Property="IsIndeterminate" Value="True" />
                    <Condition Property="Opacity" Value="1" />
                    <Condition Property="Visibility" Value="Visible" />
                    </MultiTrigger.Conditions>
                    <MultiTrigger.EnterActions>
                    <BeginStoryboard x:Name="IndeterminateStoryboard_BeginStoryboard"
                                        Storyboard="{StaticResource IndeterminateStoryboard}" />
                    </MultiTrigger.EnterActions>
                    <MultiTrigger.ExitActions>
                    <StopStoryboard BeginStoryboardName="IndeterminateStoryboard_BeginStoryboard" />
                    </MultiTrigger.ExitActions>
                </MultiTrigger>
                </ControlTemplate.Triggers>
            </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <!-- End ProgressBar -->
    <!-- Expander -->

    <!-- 
         A toggle button that displays a triangle expander for use in an Expander. Note that when 
         the button is disabled, the triangle expander is hidden.  This is because this is the
         behavior we want in the only place where we use disabled expanders currently (in 
         PullRequestUserReviewsView).
    -->
    <Style x:Key="TriangleToggleButton" TargetType="{x:Type ToggleButton}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Border Background="{TemplateBinding Background}"
                            Padding="{TemplateBinding Padding}">
                        <DockPanel>
                            <Border Background="Transparent" Width="10" Margin="5,0">
                                <Path Name="arrow"
                                      DockPanel.Dock="Left"
                                      Fill="{TemplateBinding Foreground}"
                                      Height="7"
                                      Width="7"
                                      VerticalAlignment="Center"
                                      HorizontalAlignment="Center"
                                      Stretch="UniformToFill"
                                      Data="M7 1l-.025 5H2z"
                                      Visibility="{TemplateBinding IsEnabled, Converter={ui:BooleanToHiddenVisibilityConverter}}"/>
                            </Border>
                            <ContentPresenter Margin="0"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                RecognizesAccessKey="True"
                                SnapsToDevicePixels="True" />
                        </DockPanel>
                    </Border>

                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked" Value="False">
                            <Setter TargetName="arrow" Property="LayoutTransform">
                                <Setter.Value>
                                    <RotateTransform Angle="-45" />
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ExpanderHeaderFocusVisual">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Border>
                        <Rectangle Margin="0"
                            SnapsToDevicePixels="true"
                            Stroke="Black"
                            StrokeDashArray="1 2"
                            StrokeThickness="1" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type Expander}">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Foreground" Value="{DynamicResource GitHubVsToolWindowText}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Expander}">
                    <Border SnapsToDevicePixels="true">
                        <DockPanel>
                            <ToggleButton x:Name="HeaderSite"
                                MinWidth="0"
                                MinHeight="0"
                                Margin="0"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                                Content="{TemplateBinding Header}"
                                ContentTemplate="{TemplateBinding HeaderTemplate}"
                                ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
                                DockPanel.Dock="Top"
                                FocusVisualStyle="{StaticResource ExpanderHeaderFocusVisual}"
                                FontFamily="{TemplateBinding FontFamily}"
                                FontSize="{TemplateBinding FontSize}"
                                FontStretch="{TemplateBinding FontStretch}"
                                FontStyle="{TemplateBinding FontStyle}"
                                FontWeight="{TemplateBinding FontWeight}"
                                Foreground="{TemplateBinding Foreground}"
                                IsEnabled="{TemplateBinding IsEnabled}"
                                IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                                Padding="{TemplateBinding Padding}"
                                Style="{StaticResource TriangleToggleButton}" />
                            <ContentPresenter x:Name="ExpandSite"
                                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                    DockPanel.Dock="Bottom"
                                    Focusable="false"
                                    Visibility="Collapsed" />
                        </DockPanel>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsExpanded" Value="true">
                            <Setter TargetName="ExpandSite" Property="Visibility" Value="Visible" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!-- End Expander -->

    <ControlTemplate x:Key="ValidationAdorner">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Border BorderThickness="1" BorderBrush="{DynamicResource GitHubRed}" />
            <AdornedElementPlaceholder />
            <Grid Grid.Column="1" Margin="6,0,-3,0">
                <Image Width="10" Height="20" RenderTransformOrigin="0.5,0.5">
                    <Image.RenderTransform>
                        <TransformGroup>
                            <RotateTransform Angle="180" />
                        </TransformGroup>
                    </Image.RenderTransform>
                    <Image.Source>
                        <DrawingImage>
                            <DrawingImage.Drawing>
                                <GeometryDrawing Brush="{DynamicResource GitHubRed}" Geometry="M897.41,613.924l-10.33,10.331v-20.661L897.41,613.924z" />
                            </DrawingImage.Drawing>
                        </DrawingImage>
                    </Image.Source>
                </Image>
            </Grid>
            <Grid Grid.Column="2" Background="{DynamicResource GitHubRed}">
                <TextBlock Foreground="White" FontWeight="Bold" FontSize="12" Style="{StaticResource GitHubTextBlock}" Margin="8,4,12,0" Text="{Binding Path=/ErrorContent}" />
            </Grid>
        </Grid>
    </ControlTemplate>

    <DrawingImage x:Key="RedXMark">
        <DrawingImage.Drawing>
            <GeometryDrawing Brush="{DynamicResource GitHubWarningBrush}" Geometry="M10.009,1.704 8.331,0.026 5.03,3.327 1.703,0 0,1.704 3.326,5.031 0.025,8.332 1.703,10.009 5.004,6.708 8.305,10.009 10.009,8.305 6.708,5.005" />
        </DrawingImage.Drawing>
    </DrawingImage>

</ResourceDictionary>
