<UserControl 
    x:Class="CommonTasksMVVM.FVToolBar"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:local="clr-namespace:CommonTasksMVVM"
    xmlns:sys="clr-namespace:System;assembly=mscorlib"
    mc:Ignorable="d" 
    d:DesignHeight="100" 
    d:DesignWidth="800"
    >
    <UserControl.Resources>

        <Color x:Key="BaseColor">#FFD1DCE8</Color>
        <Color x:Key="MouseOverColor">#FFBFE1EA</Color>
        <Color x:Key="SelectedColor">#FF8ED1E2</Color>
        <Color x:Key="ForegroundColor">Black</Color>

        <sys:Double x:Key="ButtonHeight">24</sys:Double>
        <sys:Double x:Key="ButtonWidth">24</sys:Double>
        <SolidColorBrush x:Key="IconBrush0">#FF3080D0</SolidColorBrush>
        <SolidColorBrush x:Key="IconBrush1">#FF303030</SolidColorBrush>
        <SolidColorBrush x:Key="IconBrush2">#FFF03030</SolidColorBrush>

        <SolidColorBrush x:Key="ForegroundBrushColor" Color="{StaticResource ForegroundColor}" />
        <SolidColorBrush x:Key="BaseColorBrush" Color="{StaticResource BaseColor}" />

        <SolidColorBrush x:Key="InputBackgroundBrush" Color="White" />
        <SolidColorBrush x:Key="InputSelectedForegroundBrush" Color="#FFFAFBFC" />
        <SolidColorBrush x:Key="InputSelectedTextBackgroundBrush" Color="#AA000000" />

        <SolidColorBrush x:Key="WpfInputBaseBrush" Color="#FFDCDCDC" />
        <SolidColorBrush x:Key="WpfInputBorderBrush" Color="#FF707070" />
        <SolidColorBrush x:Key="WpfInputMouseOverBrush" Color="#FFBDE6FD" />
        <SolidColorBrush x:Key="WpfInputSelectedBackground" Color="#FFA9DAF3" />
        <SolidColorBrush x:Key="WpfInputFocusBrush" Color="#FFA9DAF3" />
        <SolidColorBrush x:Key="WpfInputSelectedForegroundBrush" Color="#FF143D66" />
        <SolidColorBrush x:Key="WpfInputSelectedBackgroundBrush" Color="#FFADD6FF" />

        <LinearGradientBrush x:Key="GeneralGradientBrush" StartPoint="0.5,0" EndPoint="0.5,1">
            <GradientStop Color="#FFF2F2F2" Offset="0" />
            <GradientStop Color="#FFEBEBEB" Offset="0.5" />
            <GradientStop Color="#FFDCDCDC" Offset="0.5" />
            <GradientStop Color="#FFD0D0D0" Offset="1" />
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="GeneralGradientOverBrush" StartPoint="0.5,0" EndPoint="0.5,1">
            <GradientStop Color="#FFE7F5FD" Offset="0" />
            <GradientStop Color="#FFDCF0FC" Offset="0.5" />
            <GradientStop Color="#FFBDE6FD" Offset="0.5" />
            <GradientStop Color="#FFA9D9F5" Offset="1" />
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="GeneralGradientSelectedBackground" StartPoint="0.5,0" EndPoint="0.5,1">
            <GradientStop Color="#FFA9D9F5" Offset="0" />
            <GradientStop Color="#FFC1E4F5" Offset="0.5" />
            <GradientStop Color="#FFA9DAF3" Offset="0.5" />
            <GradientStop Color="#FF91CDEB" Offset="1" />
        </LinearGradientBrush>

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

        <SolidColorBrush x:Key="InnerBorderBrush" Color="#FFFAFBFC" />
        <SolidColorBrush x:Key="InnerBorderMouseOverBrush" Color="#FFFAFBFC" />
        <SolidColorBrush x:Key="InnerBorderPressedBrush" Color="#FFFAFBFC" />

        <CornerRadius x:Key="InnerBorderCornerRadius">1</CornerRadius>

        <Thickness x:Key="InnerBorderThickness">1</Thickness>

        <Thickness x:Key="ViewerToolbarThickness">0 0 0 1</Thickness>

        <LinearGradientBrush x:Key="ViewerBackgroundBrush" StartPoint="0.5,0" EndPoint="0.5,1">
            <GradientStop Color="#FFD1DCE8" Offset="0" />
            <GradientStop Color="#FFFAFBFC" Offset="0.7" />
        </LinearGradientBrush>

        <Style x:Key="ViewerArrowStyle" TargetType="Path">
            <Setter Property="Stroke" Value="#FF256495" />
            <Setter Property="Fill">
                <Setter.Value>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#FF92BBDB" Offset="0.45" />
                        <GradientStop Color="#FF4D8BCC" Offset="0.55" />
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="ClearStyleButtonStyle" TargetType="ButtonBase">
            <Setter Property="Padding" Value="3" />
            <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">
                                        <Storyboard>
                                            <DoubleAnimation 
                                                Duration="0" 
                                                To="0.5" 
                                                Storyboard.TargetProperty="(UIElement.Opacity)" 
                                                Storyboard.TargetName="BackgroundElement" 
                                                d:IsOptimized="True" 
                                                />
                                            <DoubleAnimation 
                                                Duration="0" 
                                                To="0.5" 
                                                Storyboard.TargetProperty="(UIElement.Opacity)" 
                                                Storyboard.TargetName="contentPresenter" 
                                                d:IsOptimized="True" 
                                                />
                                        </Storyboard>
                                    </VisualState>
                                </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 GeneralGradientBrush}"
                                DesignColor="{StaticResource BaseColor}"
                                />
                            <c1:C1BrushBuilder
                                x:Name="MouseOverBrush"
                                Input="{TemplateBinding c1:ClearStyleExtensions.MouseOverBrush}"
                                DesignBrush="{StaticResource GeneralGradientOverBrush}"
                                DesignColor="{StaticResource MouseOverColor}"
                                />
                            <c1:C1BrushBuilder
                                x:Name="PressedBrush"
                                Input="{TemplateBinding c1:ClearStyleExtensions.PressedBrush}"
                                DesignBrush="{StaticResource GeneralGradientSelectedBackground}"
                                DesignColor="{StaticResource SelectedColor}"
                                />
                            <c1:C1BrushBuilder
                                x:Name="CheckedBrush"
                                Input="{TemplateBinding c1:ClearStyleExtensions.PressedBrush}"
                                DesignBrush="{StaticResource GeneralGradientCheckedBrush}"
                                DesignColor="{StaticResource SelectedColor}"
                                />
                            <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 MouseOverColor}"
                                />
                            <c1:C1BrushBuilder
                                x:Name="InnerBorderPressedBrush"
                                Input="{TemplateBinding c1:ClearStyleExtensions.PressedBrush}"
                                DesignBrush="{StaticResource InnerBorderPressedBrush}"
                                DesignColor="{StaticResource SelectedColor}"
                                />
                            <Border
                                x:Name="BackgroundElement"
                                Background="{Binding Output, ElementName=BackgroundBrush}"
                                BorderBrush="{StaticResource WpfInputBorderBrush}"
                                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"
                                >
                                <Border
                                    BorderBrush="{Binding Output, ElementName=InnerBorderPressedBrush}"
                                    BorderThickness="{StaticResource InnerBorderThickness}"
                                    CornerRadius="{TemplateBinding c1:ClearStyleExtensions.CornerRadius}"
                                    />
                            </Border>

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

        <local:FVToolBarStrings x:Key="ViewerResources" />

    </UserControl.Resources>

    <Grid>

        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>

        <Border
            VerticalAlignment="Bottom"
            Height="5"
            Margin="0,0,0,-5"
            Grid.ColumnSpan="2"
            >
            <Border.Background>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#99000000" Offset="0" />
                    <GradientStop Offset="1" />
                </LinearGradientBrush>
            </Border.Background>
        </Border>
        <c1:C1BrushBuilder
            x:Name="BackgroundBrush"
            Input="{StaticResource WpfInputBaseBrush}"
            DesignBrush="{StaticResource ViewerBackgroundBrush}"
            DesignColor="{StaticResource BaseColor}"
            />
        <c1:C1BrushBuilder
            x:Name="InnerBorderBrush"
            Input="{StaticResource WpfInputBaseBrush}"
            DesignBrush="{StaticResource InnerBorderBrush}"
            DesignColor="{StaticResource BaseColor}"
            />
        <c1:C1BrushBuilder
            x:Name="SeparatorBrush"
            Input="{StaticResource WpfInputBaseBrush}"
            DesignBrush="{StaticResource BaseColorBrush}"
            DesignColor="{StaticResource BaseColor}"
            />

        <Border
            x:Name="BackgroundElement"
            Background="{Binding Output, ElementName=BackgroundBrush}"
            BorderBrush="{StaticResource WpfInputBorderBrush}"
            BorderThickness="{StaticResource ViewerToolbarThickness}"
            Grid.ColumnSpan="2"
            >
            <Border
                BorderBrush="{Binding Output, ElementName=InnerBorderBrush}"
                BorderThickness="{StaticResource InnerBorderThickness}"
                />
        </Border>

        <StackPanel Orientation="Horizontal" Margin="0 3">

            <Button
                x:Name="navigateBackwardButton"
                ToolTipService.ToolTip="{Binding NavigateBackwardTooltip, Source={StaticResource ViewerResources}}"
                Height="{StaticResource ButtonHeight}"
                Width="{StaticResource ButtonWidth}"
                Style="{StaticResource ClearStyleButtonStyle}"
                Background="Transparent"
                BorderThickness="0"
                Margin="5,0,0,0"
                c1:ClearStyleExtensions.CornerRadius="2"
                c1:ClearStyleExtensions.MouseOverBrush="{StaticResource WpfInputMouseOverBrush}"
                c1:ClearStyleExtensions.PressedBrush="{StaticResource WpfInputSelectedBackground}"
                c1:ClearStyleExtensions.FocusBrush="{StaticResource WpfInputFocusBrush}"
                >

                <Viewbox RenderTransformOrigin="0.5,0.5" Margin="0">
                    <Viewbox.RenderTransform>
                        <RotateTransform Angle="0"/>
                    </Viewbox.RenderTransform>
                    <Canvas Width="100" Height="100">
                        <Path Fill="{StaticResource IconBrush0}" Data="M49.953,100C77.519,100 99.947,77.574 99.947,50.004 99.947,22.436 77.519,0.0069999999999979 49.953,0.0069999999999979 22.386,0.0069999999999979 -0.0419999999999945,22.436 -0.0419999999999945,50.004 -0.042,77.574 22.386,100 49.953,100z M49.953,5.776C74.341,5.776 94.18,25.616 94.18,50.005 94.18,74.394 74.341,94.233 49.953,94.233 25.566,94.233 5.72600000000001,74.394 5.72600000000001,50.005 5.727,25.616 25.566,5.776 49.953,5.776z"></Path>
                        <Path Fill="{StaticResource IconBrush0}" Data="M55.169,75.502C56.295,76.627 58.123,76.627 59.247,75.502 60.375,74.374 60.375,72.549 59.247,71.421L37.833,50.004 59.248,28.588C60.376,27.462 60.376,25.637 59.248,24.509 58.686,23.946 57.948,23.664 57.209,23.664 56.474,23.664 55.733,23.946 55.17,24.509L31.715,47.964C30.588,49.09,30.588,50.917,31.715,52.043L55.169,75.502z"></Path>
                    </Canvas>
                </Viewbox>
            </Button>

            <Button
                x:Name="navigateForwardButton"
                ToolTipService.ToolTip="{Binding NavigateForwardTooltip, Source={StaticResource ViewerResources}}"
                Height="{StaticResource ButtonHeight}"
                Width="{StaticResource ButtonWidth}"
                Style="{StaticResource ClearStyleButtonStyle}"
                Background="Transparent"
                BorderThickness="0"
                c1:ClearStyleExtensions.CornerRadius="2"
                c1:ClearStyleExtensions.MouseOverBrush="{StaticResource WpfInputMouseOverBrush}"
                c1:ClearStyleExtensions.PressedBrush="{StaticResource WpfInputSelectedBackground}"
                c1:ClearStyleExtensions.FocusBrush="{StaticResource WpfInputFocusBrush}"
                >
                <Viewbox RenderTransformOrigin="0.5,0.5" Margin="0">
                    <Viewbox.RenderTransform>
                        <RotateTransform Angle="180"/>
                    </Viewbox.RenderTransform>
                    <Canvas Width="100" Height="100">
                        <Path Fill="{StaticResource IconBrush0}" Data="M49.953,100C77.519,100 99.947,77.574 99.947,50.004 99.947,22.436 77.519,0.0069999999999979 49.953,0.0069999999999979 22.386,0.0069999999999979 -0.0419999999999945,22.436 -0.0419999999999945,50.004 -0.042,77.574 22.386,100 49.953,100z M49.953,5.776C74.341,5.776 94.18,25.616 94.18,50.005 94.18,74.394 74.341,94.233 49.953,94.233 25.566,94.233 5.72600000000001,74.394 5.72600000000001,50.005 5.727,25.616 25.566,5.776 49.953,5.776z"></Path>
                        <Path Fill="{StaticResource IconBrush0}" Data="M55.169,75.502C56.295,76.627 58.123,76.627 59.247,75.502 60.375,74.374 60.375,72.549 59.247,71.421L37.833,50.004 59.248,28.588C60.376,27.462 60.376,25.637 59.248,24.509 58.686,23.946 57.948,23.664 57.209,23.664 56.474,23.664 55.733,23.946 55.17,24.509L31.715,47.964C30.588,49.09,30.588,50.917,31.715,52.043L55.169,75.502z"></Path>
                    </Canvas>
                </Viewbox>
            </Button>

            <Button
                x:Name="firstPageButton"
                ToolTipService.ToolTip="{Binding FirstPageTooltip, Source={StaticResource ViewerResources}}"
                Height="{StaticResource ButtonHeight}"
                Width="{StaticResource ButtonWidth}"
                Style="{StaticResource ClearStyleButtonStyle}"
                Background="Transparent" BorderThickness="0"
                c1:ClearStyleExtensions.MouseOverBrush="{StaticResource WpfInputMouseOverBrush}"
                c1:ClearStyleExtensions.PressedBrush="{StaticResource WpfInputSelectedBackground}"
                c1:ClearStyleExtensions.FocusBrush="{StaticResource WpfInputFocusBrush}"
                c1:ClearStyleExtensions.CornerRadius="2"
                >
                <Viewbox RenderTransformOrigin="0.5,0.5" Margin="0" Stretch="Fill">
                    <Viewbox.RenderTransform>
                        <RotateTransform Angle="180"/>
                    </Viewbox.RenderTransform>
                    <Canvas Width="100" Height="100">
                        <Canvas>
                            <Path RenderTransformOrigin="0.5, 0.5" Fill="{StaticResource IconBrush0}" Data="M79.674,53.719C82.264,51.673,82.264,48.327,79.674,46.282L22.566,1.053C19.977,-0.993,18,0.035,18,3.335L18,96.666C18,99.966,19.977,100.992,22.566,98.947L79.674,53.719z">
                                <Path.RenderTransform>
                                    <ScaleTransform ScaleX="0.6" ScaleY="0.7"/>
                                </Path.RenderTransform>
                            </Path>
                        </Canvas>
                        <Rectangle Fill="{StaticResource IconBrush0}" Width="10" Height="70" Canvas.Left="70" Canvas.Top="15"/>
                    </Canvas>
                </Viewbox>
            </Button>
            <Button
                x:Name="previousPageButton"
                ToolTipService.ToolTip="{Binding PreviousPageTooltip, Source={StaticResource ViewerResources}}"
                Height="{StaticResource ButtonHeight}"
                Width="{StaticResource ButtonWidth}"
                Style="{StaticResource ClearStyleButtonStyle}"
                Background="Transparent"
                BorderThickness="0"
                c1:ClearStyleExtensions.MouseOverBrush="{StaticResource WpfInputMouseOverBrush}"
                c1:ClearStyleExtensions.PressedBrush="{StaticResource WpfInputSelectedBackground}"
                c1:ClearStyleExtensions.FocusBrush="{StaticResource WpfInputFocusBrush}"
                c1:ClearStyleExtensions.CornerRadius="2"
                >
                <Viewbox RenderTransformOrigin="0.5,0.5" Margin="0" Stretch="Fill">
                    <Viewbox.RenderTransform>
                        <RotateTransform Angle="180"/>
                    </Viewbox.RenderTransform>
                    <Canvas Width="100" Height="100">
                        <Canvas>
                            <Path Canvas.Left="10" RenderTransformOrigin="0.5, 0.5" Fill="{StaticResource IconBrush0}" Data="M79.674,53.719C82.264,51.673,82.264,48.327,79.674,46.282L22.566,1.053C19.977,-0.993,18,0.035,18,3.335L18,96.666C18,99.966,19.977,100.992,22.566,98.947L79.674,53.719z">
                                <Path.RenderTransform>
                                    <ScaleTransform ScaleX="0.6" ScaleY="0.7"/>
                                </Path.RenderTransform>
                            </Path>
                        </Canvas>
                    </Canvas>
                </Viewbox>
            </Button>
            <TextBlock
                Text="{Binding PageLabel, Source={StaticResource ViewerResources}}"
                VerticalAlignment="Center"
                Margin="4,2,2,2"
                />
            <c1:C1TextBoxBase
                x:Name="pageNumberTextBox"
                TextAlignment="Right"
                VerticalAlignment="Center"
                Height="{StaticResource ButtonHeight}"
                Width="40"
                Margin="2 2 2 2"
                Padding="2 3 2 2"
                BorderBrush="{StaticResource WpfInputBorderBrush}"
                ToolTipService.ToolTip="{Binding PageNumberTooltip, Source={StaticResource ViewerResources}}"
                />
            <TextBlock Text="/" VerticalAlignment="Center" Margin="2,2,2,2" />
            <ContentPresenter
                x:Name="pageCountPresenter"
                VerticalAlignment="Center"
                Margin="2,2,2,2"
                ToolTipService.ToolTip="{Binding PageCountTooltip, Source={StaticResource ViewerResources}}"
                />
            <Button
                x:Name="nextPageButton"
                ToolTipService.ToolTip="{Binding NextPageTooltip, Source={StaticResource ViewerResources}}"
                Height="{StaticResource ButtonHeight}"
                Width="{StaticResource ButtonWidth}"
                Style="{StaticResource ClearStyleButtonStyle}"
                Background="Transparent"
                BorderThickness="0"
                c1:ClearStyleExtensions.CornerRadius="2"
                >
                <Viewbox RenderTransformOrigin="0.5,0.5" Margin="0" Stretch="Fill">
                    <Viewbox.RenderTransform>
                        <RotateTransform Angle="0"/>
                    </Viewbox.RenderTransform>
                    <Canvas Width="100" Height="100">
                        <Canvas>
                            <Path Canvas.Left="10" RenderTransformOrigin="0.5, 0.5" Fill="{StaticResource IconBrush0}" Data="M79.674,53.719C82.264,51.673,82.264,48.327,79.674,46.282L22.566,1.053C19.977,-0.993,18,0.035,18,3.335L18,96.666C18,99.966,19.977,100.992,22.566,98.947L79.674,53.719z">
                                <Path.RenderTransform>
                                    <ScaleTransform ScaleX="0.6" ScaleY="0.7"/>
                                </Path.RenderTransform>
                            </Path>
                        </Canvas>
                    </Canvas>
                </Viewbox>
            </Button>
            <Button 
                x:Name="lastPageButton"
                ToolTipService.ToolTip="{Binding LastPageTooltip, Source={StaticResource ViewerResources}}" 
                Height="{StaticResource ButtonHeight}"
                Width="{StaticResource ButtonWidth}"
                Style="{StaticResource ClearStyleButtonStyle}" 
                Background="Transparent" 
                BorderThickness="0" 
                c1:ClearStyleExtensions.CornerRadius="2"
                >

                <Viewbox RenderTransformOrigin="0.5,0.5" Margin="0" Stretch="Fill">
                    <Viewbox.RenderTransform>
                        <RotateTransform Angle="0"/>
                    </Viewbox.RenderTransform>
                    <Canvas Width="100" Height="100">
                        <Canvas>
                            <Path RenderTransformOrigin="0.5, 0.5" Fill="{StaticResource IconBrush0}" Data="M79.674,53.719C82.264,51.673,82.264,48.327,79.674,46.282L22.566,1.053C19.977,-0.993,18,0.035,18,3.335L18,96.666C18,99.966,19.977,100.992,22.566,98.947L79.674,53.719z">
                                <Path.RenderTransform>
                                    <ScaleTransform ScaleX="0.6" ScaleY="0.7"/>
                                </Path.RenderTransform>
                            </Path>
                        </Canvas>
                        <Rectangle Fill="{StaticResource IconBrush0}" Width="10" Height="70" Canvas.Left="70" Canvas.Top="15"/>
                    </Canvas>
                </Viewbox>

            </Button>

            <Border 
                Width="2" 
                Background="{Binding Output, ElementName=SeparatorBrush}" 
                BorderThickness="0,0,1,1" 
                BorderBrush="#B2FFFFFF" 
                Height="{StaticResource ButtonHeight}"
                Margin="6,0" 
                />

            <c1:C1ComboBox
                x:Name="zoomCombo"
                BorderBrush="{StaticResource WpfInputBorderBrush}"
                ButtonBackground="{StaticResource WpfInputBaseBrush}"
                ButtonForeground="{StaticResource ForegroundBrushColor}"
                Width="92"
                DropDownWidth="100"
                VerticalAlignment="Center"
                Padding="2, 2"
                ToolTipService.ToolTip="{Binding ZoomComboTooltip, Source={StaticResource ViewerResources}}"
                >
                <c1:C1ComboBox.ItemTemplate>
                    <DataTemplate>
                        <Grid>
                            <Grid.Resources>
                                <local:ZoomConverter x:Key="converter" />
                            </Grid.Resources>
                            <TextBlock Text="{Binding Converter={StaticResource converter}}" />
                        </Grid>
                    </DataTemplate>
                </c1:C1ComboBox.ItemTemplate>
            </c1:C1ComboBox>

            <Menu ToolTipService.ToolTip="{Binding LayoutMenuTooltip, Source={StaticResource ViewerResources}}" VerticalAlignment="Center">
                <MenuItem
                    x:Name="menuLayout"
                    Header="{Binding LayoutMenuHeader, Source={StaticResource ViewerResources}}"
                    Padding="6, 3, 7, 3"
                    Margin="2, 2, 2, 2"
                    VerticalAlignment="Center"
                    BorderThickness="0"
                    >
                    <MenuItem x:Name="menuRotateCW" Header="{Binding RotateCWMenuHeader, Source={StaticResource ViewerResources}}" />
                    <MenuItem x:Name="menuRotateCCW" Header="{Binding RotateCCWMenuHeader, Source={StaticResource ViewerResources}}" />
                    <Separator />
                    <MenuItem x:Name="menuOnePage" Header="{Binding OnePageMenuHeader, Source={StaticResource ViewerResources}}" />
                    <MenuItem x:Name="menuFacingPages" Header="{Binding FacingPagesMenuHeader, Source={StaticResource ViewerResources}}" />
                    <MenuItem x:Name="menuTwoPages" Header="{Binding TwoPagesMenuHeader, Source={StaticResource ViewerResources}}" />
                    <MenuItem x:Name="menuFourPages" Header="{Binding FourPagesMenuHeader, Source={StaticResource ViewerResources}}" />
                </MenuItem>
            </Menu>

            <ToggleButton
                x:Name="printLayoutButton"
                ToolTipService.ToolTip="{Binding PrintLayoutTooltip, Source={StaticResource ViewerResources}}"
                Height="{StaticResource ButtonHeight}"
                Width="{StaticResource ButtonWidth}"
                Style="{StaticResource ClearStyleButtonStyle}"
                Background="Transparent"
                BorderThickness="0"
                c1:ClearStyleExtensions.CornerRadius="2"
                c1:ClearStyleExtensions.MouseOverBrush="{StaticResource WpfInputMouseOverBrush}"
                c1:ClearStyleExtensions.PressedBrush="{StaticResource WpfInputSelectedBackground}"
                c1:ClearStyleExtensions.FocusBrush="{StaticResource WpfInputFocusBrush}"
                >
                <Viewbox RenderTransformOrigin="0.5,0.5" Margin="0" Stretch="Fill">
                    <Viewbox.RenderTransform>
                        <RotateTransform Angle="0"/>
                    </Viewbox.RenderTransform>
                    <Canvas Width="100" Height="100">
                        <Path Canvas.Left="12" RenderTransformOrigin="0.5,0.5" Fill="{StaticResource IconBrush1}" Data="M48.958,0L0,0 0,100 77.031,100 77.031,29.141 48.958,0z M50.273,13.047L63.489,26.771 50.273,26.771 50.273,13.047z M8.105,91.901L8.105,8.112 44.192,8.112 44.192,32.852 68.925,32.852 68.925,91.902 8.105,91.902z">
                            <Path.RenderTransform>
                                <ScaleTransform ScaleX="0.9" ScaleY="0.9"/>
                            </Path.RenderTransform>
                        </Path>
                    </Canvas>
                </Viewbox>
            </ToggleButton>

            <ToggleButton
                x:Name="thumbnailsButton"
                ToolTipService.ToolTip="{Binding ThumbnailsTooltip, Source={StaticResource ViewerResources}}"
                Height="{StaticResource ButtonHeight}"
                Width="{StaticResource ButtonWidth}"
                Style="{StaticResource ClearStyleButtonStyle}"
                Background="Transparent"
                BorderThickness="0"
                c1:ClearStyleExtensions.CornerRadius="2"
                c1:ClearStyleExtensions.MouseOverBrush="{StaticResource WpfInputMouseOverBrush}"
                c1:ClearStyleExtensions.PressedBrush="{StaticResource WpfInputSelectedBackground}"
                c1:ClearStyleExtensions.FocusBrush="{StaticResource WpfInputFocusBrush}"
                >
                <Viewbox RenderTransformOrigin="0.5,0.5" Margin="0" Stretch="Fill">
                    <Viewbox.RenderTransform>
                        <RotateTransform Angle="0"/>
                    </Viewbox.RenderTransform>
                    <Canvas Width="100" Height="100">
                        <Path Canvas.Left="5" Canvas.Top="5" Fill="{StaticResource IconBrush1}" Data="M43.75,0L0,0 0,100 75,100 75,31.244 43.75,0z M12.5,87.5L12.5,12.5 37.5,12.5 37.5,37.5 62.5,37.5 62.5,87.5 12.5,87.5z">
                            <Path.RenderTransform>
                                <ScaleTransform ScaleX="0.4" ScaleY="0.4"/>
                            </Path.RenderTransform>
                        </Path>
                        <Path Canvas.Left="55" Canvas.Top="5" Fill="{StaticResource IconBrush1}" Data="M43.75,0L0,0 0,100 75,100 75,31.244 43.75,0z M12.5,87.5L12.5,12.5 37.5,12.5 37.5,37.5 62.5,37.5 62.5,87.5 12.5,87.5z">
                            <Path.RenderTransform>
                                <ScaleTransform ScaleX="0.4" ScaleY="0.4"/>
                            </Path.RenderTransform>
                        </Path>
                        <Path Canvas.Left="5" Canvas.Top="55" Fill="{StaticResource IconBrush1}" Data="M43.75,0L0,0 0,100 75,100 75,31.244 43.75,0z M12.5,87.5L12.5,12.5 37.5,12.5 37.5,37.5 62.5,37.5 62.5,87.5 12.5,87.5z">
                            <Path.RenderTransform>
                                <ScaleTransform ScaleX="0.4" ScaleY="0.4"/>
                            </Path.RenderTransform>
                        </Path>
                        <Path Canvas.Left="55" Canvas.Top="55" Fill="{StaticResource IconBrush1}" Data="M43.75,0L0,0 0,100 75,100 75,31.244 43.75,0z M12.5,87.5L12.5,12.5 37.5,12.5 37.5,37.5 62.5,37.5 62.5,87.5 12.5,87.5z">
                            <Path.RenderTransform>
                                <ScaleTransform ScaleX="0.4" ScaleY="0.4"/>
                            </Path.RenderTransform>
                        </Path>
                    </Canvas>
                </Viewbox>
            </ToggleButton>

            <ToggleButton
                x:Name="selectToolButton"
                ToolTipService.ToolTip="{Binding SelectToolTooltip, Source={StaticResource ViewerResources}}"
                Height="{StaticResource ButtonHeight}"
                Width="{StaticResource ButtonWidth}"
                Style="{StaticResource ClearStyleButtonStyle}"
                Background="Transparent"
                BorderThickness="0"
                c1:ClearStyleExtensions.CornerRadius="2"
                c1:ClearStyleExtensions.MouseOverBrush="{StaticResource WpfInputMouseOverBrush}"
                c1:ClearStyleExtensions.PressedBrush="{StaticResource WpfInputSelectedBackground}"
                c1:ClearStyleExtensions.FocusBrush="{StaticResource WpfInputFocusBrush}"
                >
                <Viewbox RenderTransformOrigin="0.5,0.5" Margin="0" Stretch="Fill">
                    <Canvas Width="16" Height="16">
                        <Path Fill="{StaticResource IconBrush0}">
                            <Path.Data>
                                <PathGeometry Figures="M 10.75 15.337719 12 14.833333 12 8 12 1.1666667 10.75 0.6622807 9.5 0.15789474 l 3 0 3 0 L 14.25 0.6622807 13 1.1666667 13 8 l 0 6.833333 1.25 0.504386 1.25 0.504386 -3 0 -3 0 1.25 -0.504386 z m -7 -3 L 5 11.833333 5 7.9166667 5 4 3.5833333 4 2.1666667 4 1.6622807 5.25 1.1578947 6.5 1.0789474 4.75 1 3 5.5 3 10 3 9.9210526 4.75 9.8421053 6.5 9.3377193 5.25 8.8333333 4 7.4166667 4 6 4 l 0 3.9166667 0 3.9166663 1.25 0.504386 1.25 0.504386 -3 0 -3 0 1.25 -0.504386 z" FillRule="NonZero"/>
                            </Path.Data>
                        </Path>
                        <Path Fill="{StaticResource IconBrush1}">
                            <Path.Data>
                                <PathGeometry Figures="M 3.75 12.337719 5 11.833333 5 7.9166667 5 4 3.5833333 4 2.1666667 4 1.6622807 5.25 1.1578947 6.5 1.0789474 4.75 1 3 5.5 3 10 3 9.9210526 4.75 9.8421053 6.5 9.3377193 5.25 8.8333333 4 7.4166667 4 6 4 l 0 3.9166667 0 3.9166663 1.25 0.504386 1.25 0.504386 -3 0 -3 0 1.25 -0.504386 z" FillRule="NonZero"/>
                            </Path.Data>
                        </Path>
                    </Canvas>
                </Viewbox>
            </ToggleButton>

            <Button
                x:Name="printButton"
                ToolTipService.ToolTip="{Binding PrintTooltip, Source={StaticResource ViewerResources}}"
                Height="{StaticResource ButtonHeight}"
                Width="{StaticResource ButtonWidth}"
                Style="{StaticResource ClearStyleButtonStyle}"
                Background="Transparent" BorderThickness="0"
                c1:ClearStyleExtensions.MouseOverBrush="{StaticResource WpfInputMouseOverBrush}"
                c1:ClearStyleExtensions.PressedBrush="{StaticResource WpfInputSelectedBackground}"
                c1:ClearStyleExtensions.FocusBrush="{StaticResource WpfInputFocusBrush}"
                c1:ClearStyleExtensions.CornerRadius="2"
                >
                <Viewbox RenderTransformOrigin="0.5,0.5" Margin="0">
                    <Viewbox.RenderTransform>
                        <RotateTransform Angle="0"/>
                    </Viewbox.RenderTransform>
                    <Canvas Width="100" Height="100">
                        <Path Fill="{StaticResource IconBrush0}">
                            <Path.Data>
                                <EllipseGeometry RadiusX="4" RadiusY="4" Center="74.161,51.268" />
                            </Path.Data>
                        </Path>
                        <Path Fill="{StaticResource IconBrush1}">
                            <Path.Data>M82.111,36.287L76.09,36.287C76.098,36.143,76.111,36.001,76.111,35.855L76.111,20.353C76.111,15.935,72.529,12.353,68.111,12.353L32.084,12.353C27.666,12.353,24.084,15.935,24.084,20.353L24.084,35.855C24.084,36.001,24.098,36.143,24.105,36.287L18.084,36.287C13.666,36.287,10.084,39.869,10.084,44.287L10.084,69.185C10.084,73.603,13.666,77.185,18.084,77.185L24.084,77.185 24.084,80.855C24.084,85.273,27.666,88.855,32.084,88.855L68.111,88.855C72.529,88.855,76.111,85.273,76.111,80.855L76.111,77.185 82.111,77.185C86.529,77.185,90.111,73.603,90.111,69.185L90.111,44.287C90.111,39.868,86.529,36.287,82.111,36.287z M32.084,20.353L68.111,20.353 68.111,35.855 32.084,35.855 32.084,20.353z M68.111,69.185L68.111,77.185 68.111,80.855 32.084,80.855 32.084,77.185 32.084,69.185 32.084,65.353 68.111,65.353 68.111,69.185z M82.111,69.185L76.111,69.185 76.111,58.353 68.111,58.353 32.084,58.353 24.084,58.353 24.084,69.185 18.084,69.185 18.084,44.287 82.111,44.287 82.111,69.185z</Path.Data>
                        </Path>
                    </Canvas>
                </Viewbox>
            </Button>

            <Border 
                Width="2" 
                Background="{Binding Output, ElementName=SeparatorBrush}" 
                BorderThickness="0,0,1,1" 
                BorderBrush="#B2FFFFFF" 
                Height="{StaticResource ButtonHeight}"
                Margin="6,0" 
                />

            <Button
                x:Name="refreshButton"
                ToolTipService.ToolTip="{Binding RefreshTooltip, Source={StaticResource ViewerResources}}"
                Height="{StaticResource ButtonHeight}"
                Width="{StaticResource ButtonWidth}"
                Style="{StaticResource ClearStyleButtonStyle}"
                Background="Transparent"
                BorderThickness="0"
                c1:ClearStyleExtensions.CornerRadius="2"
                c1:ClearStyleExtensions.MouseOverBrush="{StaticResource WpfInputMouseOverBrush}"
                c1:ClearStyleExtensions.PressedBrush="{StaticResource WpfInputSelectedBackground}"
                c1:ClearStyleExtensions.FocusBrush="{StaticResource WpfInputFocusBrush}"
                >
                <Viewbox RenderTransformOrigin="0.5,0.5" Margin="0">
                    <Viewbox.RenderTransform>
                        <RotateTransform Angle="0"/>
                    </Viewbox.RenderTransform>
                    <Canvas Width="100" Height="100">
                        <Path RenderTransformOrigin="0.5, 0.5" Fill="{StaticResource IconBrush1}" Data="M32.113,43.215C30.785,41.853,28.6,41.821,27.237,43.152L22.93,47.347C22.839,47.484 22.608,47.693 22.343,47.92 23.158,34.807 32.888,24.046 46.053,22.04 56.221,20.489 66.402,24.626 72.623,32.836 73.305,33.733 74.42,34.186 75.536,34.015 76.036,33.939 76.516,33.736 76.923,33.428 77.82,32.746 78.273,31.632 78.105,30.517 78.028,30.014 77.824,29.535 77.516,29.128 69.936,19.123 57.526,14.082 45.129,15.972 28.946,18.44 16.99,31.75 16.169,47.918 16.081,47.823 16.006,47.734 15.969,47.664L11.374,42.949C10.045,41.589 7.86,41.558 6.498,42.885 5.133,44.215 5.106,46.399 6.435,47.765L16.67,58.267C17.366,58.982 18.298,59.33 19.223,59.307 20.062,59.286 20.895,58.962 21.545,58.328L32.049,48.093C33.414,46.765,33.442,44.58,32.113,43.215z M19.342,52.538C19.383,52.537 19.423,52.534 19.463,52.53 19.425,52.577 19.386,52.577 19.342,52.538z">
                            <Path.RenderTransform>
                                <ScaleTransform ScaleX="1.1" ScaleY="1.1"/>
                            </Path.RenderTransform>
                        </Path>
                        <Path RenderTransformOrigin="0.5, 0.5" Fill="{StaticResource IconBrush1}" Data="M93.564,52.401L83.331,41.898C82.635,41.185 81.702,40.836 80.777,40.858 79.938,40.878 79.103,41.205 78.455,41.837L67.949,52.072C66.585,53.403 66.556,55.588 67.886,56.952 69.215,58.312 71.399,58.347 72.761,57.015L77.071,52.819C77.155,52.692 77.361,52.502 77.602,52.295 76.694,65.311 66.996,75.965 53.903,77.962 43.734,79.511 33.553,75.375 27.334,67.166 26.652,66.268 25.537,65.816 24.422,65.986 23.922,66.061 23.441,66.264 23.034,66.573 22.136,67.254 21.683,68.37 21.853,69.485 21.93,69.986 22.134,70.466 22.441,70.873 30.022,80.878 42.431,85.919 54.829,84.028 70.972,81.566 82.908,68.312 83.778,52.196 83.892,52.311 83.987,52.421 84.031,52.504L88.626,57.219C89.956,58.579 92.14,58.61 93.5,57.283 94.867,55.952 94.894,53.768 93.564,52.401z">
                            <Path.RenderTransform>
                                <ScaleTransform ScaleX="1.1" ScaleY="1.1"/>
                            </Path.RenderTransform>
                        </Path>
                    </Canvas>
                </Viewbox>
            </Button>

            <Button
                x:Name="stopOperationButton"
                ToolTipService.ToolTip="{Binding StopOperationTooltip, Source={StaticResource ViewerResources}}"
                Height="{StaticResource ButtonHeight}"
                Width="{StaticResource ButtonWidth}"
                Style="{StaticResource ClearStyleButtonStyle}"
                Background="Transparent"
                BorderThickness="0"
                c1:ClearStyleExtensions.CornerRadius="2"
                c1:ClearStyleExtensions.MouseOverBrush="{StaticResource WpfInputMouseOverBrush}"
                c1:ClearStyleExtensions.PressedBrush="{StaticResource WpfInputSelectedBackground}"
                c1:ClearStyleExtensions.FocusBrush="{StaticResource WpfInputFocusBrush}"
                >
                <Viewbox RenderTransformOrigin="0.5,0.5" Margin="0">
                    <Viewbox.RenderTransform>
                        <RotateTransform Angle="0"/>
                    </Viewbox.RenderTransform>
                    <Canvas Width="100" Height="100">
                        <Path RenderTransformOrigin="0.5, 0.5" Fill="{StaticResource IconBrush2}" Data="M0,11.581C0,5.185,5.185,0,11.582,0L88.418,0C94.815,0,100,5.185,100,11.581L100,88.418C100,94.814,94.815,100,88.418,100L11.582,100C5.185,100,0,94.814,0,88.418L0,11.581z">
                            <Path.RenderTransform>
                                <ScaleTransform ScaleX="0.6" ScaleY="0.6"/>
                            </Path.RenderTransform>
                        </Path>
                    </Canvas>
                </Viewbox>
            </Button>

        </StackPanel>

        <TextBlock
            x:Name="sbText"
            Grid.Column="1"
            Padding="8,0"
            VerticalAlignment="Center"
            />

    </Grid>
</UserControl>
