	  
	   
    
		

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:c1dv="clr-namespace:C1.WPF.PdfViewer" xmlns:c1="clr-namespace:C1.WPF;assembly=C1.WPF.4" xmlns:c1PdfViewerResources="clr-namespace:C1.Silverlight.PdfViewer.Resources" 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="/C1.WPF.4;component/themes/Common.xaml" />
        <ResourceDictionary Source="/C1.WPF.4;component/themes/C1Button.xaml" />
        <ResourceDictionary Source="/C1.WPF.4;component/themes/C1ScrollBar.xaml" />
    </ResourceDictionary.MergedDictionaries>

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

    <c1PdfViewerResources:C1_Silverlight_PdfViewer x:Key="PdfViewerResources" />
    <!--******************* Loading ********************-->

    <Style x:Key="LoadingShapeBBStyle" TargetType="c1:C1BrushBuilder">
        <Setter Property="DesignBrush">
            <Setter.Value>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FFA8C0D7" />
                    <GradientStop Color="#FF82AACF" Offset="1" />
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="DesignColor" Value="{StaticResource BaseColor}" />
    </Style>
    <Style x:Key="LoadingShapeBorderBBStyle" TargetType="c1:C1BrushBuilder">
        <Setter Property="DesignBrush">
            <Setter.Value>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FF93AdC5" Offset="0.3" />
                    <GradientStop Color="#FF88A3BC" Offset="0.5" />
                    <GradientStop Color="#FF94ADC5" Offset="0.7" />
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="DesignColor" Value="{StaticResource BaseColor}" />
    </Style>
    <Style x:Key="LoadingDarkShadeBBStyle" TargetType="c1:C1BrushBuilder">
        <Setter Property="DesignBrush">
            <Setter.Value>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#00A8C0D7" Offset="0" />
                    <GradientStop Color="#FF9BB1C5" Offset="0.45" />
                    <GradientStop Color="#FF9BB1C5" Offset="0.55" />
                    <GradientStop Color="#0082AACF" Offset="1" />
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="DesignColor" Value="{StaticResource BaseColor}" />
    </Style>

    <!--Added by Noela @20120531-->
    <Thickness x:Key="ReportViewerToolbarThickness">0 0 0 1</Thickness>
    <!--End Added by Noela @20120531-->

    <!-- Brush @ PdfViewer Background -->
    <LinearGradientBrush x:Key="PdfViewerBackgroundBrush" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Color="#FFD1DCE8" Offset="0" />
        <GradientStop Color="#FFFAFBFC" Offset="0.7" />
    </LinearGradientBrush>
    <!-- Brush @ PdfViewer Separator Background -->
    <SolidColorBrush x:Key="PdfViewerSeparatorBrush" Color="#FFBAC8D8" />
    <!-- Brush @ PdfViewer Separator Background -->
    <SolidColorBrush x:Key="PdfViewerSeparatorBorderBrush" Color="#CCFFFFFF" />
    <!-- Style @ PdfViewer Arrow Icon -->
    <Style x:Key="PdfViewerArrowStyle" 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 TargetType="c1dv:C1PdfViewerToolbar" x:Key="C1PdfViewerToolbarDefaultStyle">
        
        
        <Setter Property="Background" Value="{StaticResource WpfInputBaseBrush}" />
        <Setter Property="BorderBrush" Value="{StaticResource WpfInputBorderBrush}" />
        <Setter Property="c1:ClearStyleExtensions.MouseOverBrush" Value="{StaticResource WpfInputMouseOverBrush}" />
        <Setter Property="c1:ClearStyleExtensions.PressedBrush" Value="{StaticResource WpfInputSelectedBackground}" />
        <Setter Property="c1:ClearStyleExtensions.FocusBrush" Value="{StaticResource WpfInputFocusBrush}" />
        <!--Modified by Noela @20120531-->
        <Setter Property="BorderThickness" Value="{StaticResource ReportViewerToolbarThickness}" />
        <!--End Modified by Noela @20120531-->
        <Setter Property="Foreground" Value="{StaticResource ForegroundTextBoxBrushColor}" />
        <Setter Property="c1:ClearStyleExtensions.ButtonForeground" Value="{StaticResource ForegroundBrushColor}" />
        <Setter Property="Padding" Value="7 3" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="c1dv:C1PdfViewerToolbar">
                    <Grid>
                        <Border VerticalAlignment="Bottom" Height="5" Margin="0,0,0,-5">
                            <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="{TemplateBinding Background}" DesignBrush="{StaticResource PdfViewerBackgroundBrush}" DesignColor="{StaticResource BaseColor}" />
                        <c1:C1BrushBuilder x:Name="InnerBorderBrush" Input="{TemplateBinding Background}" DesignBrush="{StaticResource InnerBorderBrush}" DesignColor="{StaticResource BaseColor}" />
                        <c1:C1BrushBuilder x:Name="SeparatorBrush" Input="{TemplateBinding Background}" DesignBrush="{StaticResource BaseColorBrush}" DesignColor="{StaticResource BaseColor}" />

                        <!--Modified by Noela @20120531-->
                        <Border x:Name="BackgroundElement" Background="{Binding Output, ElementName=BackgroundBrush}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                            <!--End Modified by Noela @20120531-->
                            <Border BorderBrush="{Binding Output, ElementName=InnerBorderBrush}" BorderThickness="{StaticResource InnerBorderThickness}" />
                        </Border>

                        <StackPanel Orientation="Horizontal" Margin="{TemplateBinding Padding}">
                            <!-- open/save/print actions -->
                            <Button Command="{Binding Viewer.OpenCommand, RelativeSource={RelativeSource TemplatedParent}}" ToolTipService.ToolTip="{Binding OpenTooltip, Source={StaticResource PdfViewerResources}}" Height="22" Width="22" Style="{StaticResource ClearStyleButtonStyle}" Background="Transparent" BorderThickness="0" Visibility="{TemplateBinding OpenButtonVisibility}" c1:ClearStyleExtensions.MouseOverBrush="{TemplateBinding c1:ClearStyleExtensions.MouseOverBrush}" c1:ClearStyleExtensions.PressedBrush="{TemplateBinding c1:ClearStyleExtensions.PressedBrush}" c1:ClearStyleExtensions.FocusBrush="{TemplateBinding c1:ClearStyleExtensions.FocusBrush}" c1:ClearStyleExtensions.CornerRadius="2">
                                <Grid Height="14" Width="14">
                                    <Path Data="M1.5000013,0.5 L4.5000014,0.5 C5.0522861,0.5 5.5000014,0.94771522 5.5000014,1.5 L5.5000014,2.499999 L11.5,2.499999 L11.5,12.499999 L0.5,12.499999 L0.5,2.499999 L0.50000125,1.5 C0.50000131,0.94771522 0.94771653,0.5 1.5000013,0.5 z" Margin="0,1,2,0" Stretch="Uniform">
                                        <Path.Fill>
                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                <GradientStop Color="#FFF8CF4B" Offset="1" />
                                                <GradientStop Color="#FFFFFF88" />
                                            </LinearGradientBrush>
                                        </Path.Fill>
                                        <Path.Stroke>
                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0.05">
                                                <GradientStop Color="#FFD0A439" Offset="0.4" />
                                                <GradientStop Color="#FFAC7A3B" Offset="1" />
                                            </LinearGradientBrush>
                                        </Path.Stroke>
                                    </Path>
                                    <Path Data="M2.8141282,0.5 L15.814127,0.5 L13.5,13.5 L0.5,13.5 z" Stretch="Fill" Margin="1,5,0,0">
                                        <Path.Fill>
                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                <GradientStop Color="#FFF8CF4B" Offset="1" />
                                                <GradientStop Color="#FFFFFF88" />
                                            </LinearGradientBrush>
                                        </Path.Fill>
                                        <Path.Stroke>
                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0.05">
                                                <GradientStop Color="#FFD0A439" Offset="0.4" />
                                                <GradientStop Color="#FFAC7A3B" Offset="1" />
                                            </LinearGradientBrush>
                                        </Path.Stroke>
                                    </Path>
                                </Grid>
                            </Button>
                            <Button Command="{Binding Viewer.SaveCommand, RelativeSource={RelativeSource TemplatedParent}}" ToolTipService.ToolTip="{Binding SaveTooltip, Source={StaticResource PdfViewerResources}}" Height="22" Width="22" Style="{StaticResource ClearStyleButtonStyle}" Background="Transparent" BorderThickness="0" c1:ClearStyleExtensions.MouseOverBrush="{TemplateBinding c1:ClearStyleExtensions.MouseOverBrush}" c1:ClearStyleExtensions.PressedBrush="{TemplateBinding c1:ClearStyleExtensions.PressedBrush}" c1:ClearStyleExtensions.FocusBrush="{TemplateBinding c1:ClearStyleExtensions.FocusBrush}" c1:ClearStyleExtensions.CornerRadius="2">
                                <Grid Height="14" Width="14">
                                    <Rectangle Stroke="#FFC4C4C9" Margin="1,0,0,0">
                                        <Rectangle.Fill>
                                            <LinearGradientBrush EndPoint="1,1" StartPoint="0,0">
                                                <GradientStop Color="White" Offset="0.251" />
                                                <GradientStop Color="#FFBDCAE1" Offset="0.563" />
                                                <GradientStop Color="White" Offset="0.678" />
                                            </LinearGradientBrush>
                                        </Rectangle.Fill>
                                    </Rectangle>
                                    <Path Data="M6,12 L7,12 L7,13 L6,13 z M0.5,0.5 L1.5,0.5 L2.5,0.5 L2.5,5.5 C2.5,6 3,6.5 3.5,6.5 L10.5,6.5 C11,6.5 11.5,6 11.5,5.5 L11.5,0.5 L12.5,0.5 L13.5,0.5 L13.5,1.5 L13.5,5.5 L13.5,8.5 L13.5,13.5 L10.5,13.5 L10.5,11.5 L10.5,10.5 C10.5,10 10,9.5 9.5,9.5 L4.5,9.5 C4,9.5 3.5,10 3.5,10.5 L3.5,11.5 L3.5,13.5 L1.5,13.5 C1,13.5 0.5,13 0.5,12.5 L0.5,5.5 L0.5,1.5 z" HorizontalAlignment="Right" Margin="0" Stretch="Fill" Width="14">
                                        <Path.Fill>
                                            <LinearGradientBrush EndPoint="1,1" StartPoint="0.138,0.424">
                                                <GradientStop Color="#FF313998" Offset="1" />
                                                <GradientStop Color="#FFBEBDFF" />
                                            </LinearGradientBrush>
                                        </Path.Fill>
                                        <Path.Stroke>
                                            <LinearGradientBrush EndPoint="1,1" StartPoint="0,0">
                                                <GradientStop Color="#FF8887DD" Offset="0.384" />
                                                <GradientStop Color="#FF37366E" Offset="0.997" />
                                            </LinearGradientBrush>
                                        </Path.Stroke>
                                    </Path>
                                    <Border VerticalAlignment="Top" HorizontalAlignment="Left" Height="3" Width="6" Margin="4,2,0,0" BorderThickness="0,1" BorderBrush="#FFC4C4C9" />
                                </Grid>
                            </Button>
                            <Button Command="{Binding Viewer.PrintCommand, RelativeSource={RelativeSource TemplatedParent}}" ToolTipService.ToolTip="{Binding PrintTooltip, Source={StaticResource PdfViewerResources}}" Height="22" Width="22" Style="{StaticResource ClearStyleButtonStyle}" Background="Transparent" BorderThickness="0" c1:ClearStyleExtensions.MouseOverBrush="{TemplateBinding c1:ClearStyleExtensions.MouseOverBrush}" c1:ClearStyleExtensions.PressedBrush="{TemplateBinding c1:ClearStyleExtensions.PressedBrush}" c1:ClearStyleExtensions.FocusBrush="{TemplateBinding c1:ClearStyleExtensions.FocusBrush}" c1:ClearStyleExtensions.CornerRadius="2">
                                <Grid Height="14" Width="16">
                                    <Rectangle Margin="3,0" Width="10" RadiusX="1" RadiusY="1">
                                        <Rectangle.Fill>
                                            <LinearGradientBrush EndPoint="1,1" StartPoint="0,0">
                                                <GradientStop Color="White" Offset="0.56" />
                                                <GradientStop Color="#FFDEDEDE" Offset="1" />
                                            </LinearGradientBrush>
                                        </Rectangle.Fill>
                                        <Rectangle.Stroke>
                                            <LinearGradientBrush EndPoint="1,1" StartPoint="0,0">
                                                <GradientStop Color="#FF85C0CD" Offset="0.412" />
                                                <GradientStop Color="#FF414F63" Offset="1" />
                                            </LinearGradientBrush>
                                        </Rectangle.Stroke>
                                    </Rectangle>
                                    <Path Data="M2.5308158,0.5 L13.469181,0.5 C13.469181,0.5 15.273243,1.595852 15.5,2.1872098 C15.726757,2.7785678 15.5,4.3957367 15.5,5.5 C15.5,6 15,6.5 14.5,6.5 L12.5,6.5 L12.5,4.5 L3.5,4.5 L3.5,6.5 L1.5,6.5 C1,6.5 0.5,6 0.5,5.5 C0.5,4.3957367 0.28878689,2.6953886 0.5,2.1872098 C0.71121311,1.6790311 2.5308158,0.5 2.5308158,0.5 z" Margin="-0.094,4,-0.101,3" Stretch="Fill">
                                        <Path.Stroke>
                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                <GradientStop Color="#FF818181" Offset="0.492" />
                                                <GradientStop Color="#FF566680" Offset="0.994" />
                                            </LinearGradientBrush>
                                        </Path.Stroke>
                                        <Path.Fill>
                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                <GradientStop Color="#FFFBFBFD" Offset="0" />
                                                <GradientStop Color="#FF91A2BC" Offset="1" />
                                            </LinearGradientBrush>
                                        </Path.Fill>
                                    </Path>
                                    <Path Data="M2,7 L8,7 L8,8 L2,8 z M0,0 L10,0 L10,5 L8,5 L8,6 L2,6 L2,5 L0,5 z" Margin="3,4,3,2" Stretch="Fill">
                                        <Path.Fill>
                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                <GradientStop Color="#FFB8B8B8" Offset="0" />
                                                <GradientStop Color="#FF535353" Offset="0.6" />
                                            </LinearGradientBrush>
                                        </Path.Fill>
                                    </Path>
                                </Grid>
                            </Button>

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

                            <!-- page -->
                            <StackPanel Orientation="Horizontal" Visibility="{Binding Viewer.IsFlowing, ConverterParameter=not, Converter={StaticResource boolToVisibility}, RelativeSource={RelativeSource TemplatedParent}}">
                                <Button Command="{Binding Viewer.FirstPageCommand, RelativeSource={RelativeSource TemplatedParent}}" ToolTipService.ToolTip="{Binding FirstPageTooltip, Source={StaticResource PdfViewerResources}}" Height="22" Width="22" Style="{StaticResource ClearStyleButtonStyle}" Background="Transparent" BorderThickness="0" c1:ClearStyleExtensions.MouseOverBrush="{TemplateBinding c1:ClearStyleExtensions.MouseOverBrush}" c1:ClearStyleExtensions.PressedBrush="{TemplateBinding c1:ClearStyleExtensions.PressedBrush}" c1:ClearStyleExtensions.FocusBrush="{TemplateBinding c1:ClearStyleExtensions.FocusBrush}" c1:ClearStyleExtensions.CornerRadius="2">
                                    <Grid Height="10" Width="10">
                                        <Path Data="M9.5,0.5 L9.5,9.5 L4.5,5 z M0.5,0.5 L2.5,0.5 L2.5,9.5 L0.5,9.5 z" Style="{StaticResource PdfViewerArrowStyle}" Height="10" Stretch="Fill" VerticalAlignment="Top" />
                                    </Grid>
                                </Button>
                                <Button Command="{Binding Viewer.PreviousPageCommand, RelativeSource={RelativeSource TemplatedParent}}" ToolTipService.ToolTip="{Binding PreviousPageTooltip, Source={StaticResource PdfViewerResources}}" Height="22" Width="22" Style="{StaticResource ClearStyleButtonStyle}" Background="Transparent" BorderThickness="0" c1:ClearStyleExtensions.MouseOverBrush="{TemplateBinding c1:ClearStyleExtensions.MouseOverBrush}" c1:ClearStyleExtensions.PressedBrush="{TemplateBinding c1:ClearStyleExtensions.PressedBrush}" c1:ClearStyleExtensions.FocusBrush="{TemplateBinding c1:ClearStyleExtensions.FocusBrush}" c1:ClearStyleExtensions.CornerRadius="2">
                                    <Grid Height="10" Width="6">
                                        <Path Data="M5,0.5 L5,9.5 L0.5,5 z" Stretch="Fill" VerticalAlignment="Top" Height="10" Style="{StaticResource PdfViewerArrowStyle}" />
                                    </Grid>
                                </Button>
                                <TextBlock Text="{Binding PageLabel, Source={StaticResource PdfViewerResources}}" VerticalAlignment="Center" Margin="2,0" />
                                <c1:C1TextBoxBase x:Name="PageNumber" TextAlignment="Right" Height="20" Width="40" Padding="2 1" BorderBrush="{TemplateBinding BorderBrush}" />
                                <TextBlock Text="/" VerticalAlignment="Top" Margin="2,2,0,0" />
                                <ContentPresenter Content="{Binding Viewer.PageCount, RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="Top" Margin="0,3,2,0" />
                                <Button Command="{Binding Viewer.NextPageCommand, RelativeSource={RelativeSource TemplatedParent}}" ToolTipService.ToolTip="{Binding NextPageTooltip, Source={StaticResource PdfViewerResources}}" Height="22" Width="22" Style="{StaticResource ClearStyleButtonStyle}" Background="Transparent" BorderThickness="0" c1:ClearStyleExtensions.CornerRadius="2">
                                    <Grid Height="10" Width="6">
                                        <Path Data="M5,0.5 L5,9.5 L0.5,5 z" Stretch="Fill" Style="{StaticResource PdfViewerArrowStyle}" VerticalAlignment="Top" RenderTransformOrigin="0.5,0.5" Height="10" HorizontalAlignment="Left" Width="6">
                                            <Path.RenderTransform>
                                                <ScaleTransform ScaleX="-1" />
                                            </Path.RenderTransform>
                                        </Path>
                                    </Grid>
                                </Button>
                                <Button Command="{Binding Viewer.LastPageCommand, RelativeSource={RelativeSource TemplatedParent}}" ToolTipService.ToolTip="{Binding LastPageTooltip, Source={StaticResource PdfViewerResources}}" Height="22" Width="22" Style="{StaticResource ClearStyleButtonStyle}" Background="Transparent" BorderThickness="0" c1:ClearStyleExtensions.CornerRadius="2">
                                    <Grid Height="10" Width="10">
                                        <Path Data="M9.5,0.5 L9.5,9.5 L4.5,5 z M0.5,0.5 L2.5,0.5 L2.5,9.5 L0.5,9.5 z" Height="10" Stretch="Fill" Style="{StaticResource PdfViewerArrowStyle}" VerticalAlignment="Top" RenderTransformOrigin="0.5,0.5" Grid.ColumnSpan="2">
                                            <Path.RenderTransform>
                                                <ScaleTransform ScaleX="-1" />
                                            </Path.RenderTransform>
                                        </Path>
                                    </Grid>
                                </Button>
                                <Border Width="2" Background="{Binding Output, ElementName=SeparatorBrush}" BorderThickness="0,0,1,1" BorderBrush="#B2FFFFFF" Height="18" Margin="6,0" />
                            </StackPanel>

                            <!-- zoom -->
                            <Button Command="{Binding Viewer.DecreaseZoomCommand, RelativeSource={RelativeSource TemplatedParent}}" ToolTipService.ToolTip="{Binding ZoomOutTooltip, Source={StaticResource PdfViewerResources}}" Height="22" Width="22" Style="{StaticResource ClearStyleButtonStyle}" Background="Transparent" BorderThickness="0" c1:ClearStyleExtensions.CornerRadius="2" c1:ClearStyleExtensions.MouseOverBrush="{TemplateBinding c1:ClearStyleExtensions.MouseOverBrush}" c1:ClearStyleExtensions.PressedBrush="{TemplateBinding c1:ClearStyleExtensions.PressedBrush}" c1:ClearStyleExtensions.FocusBrush="{TemplateBinding c1:ClearStyleExtensions.FocusBrush}">
                                <Grid Height="16" Width="16">
                                    <Rectangle Fill="#FFFFDA6F" Height="8" Margin="6,0,2,0" Stroke="#FFF37B4D" VerticalAlignment="Bottom" Width="4" RadiusX="1" RadiusY="1" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Right">
                                        <Rectangle.RenderTransform>
                                            <RotateTransform Angle="-45" />
                                        </Rectangle.RenderTransform>
                                    </Rectangle>
                                    <Ellipse HorizontalAlignment="Left" Stroke="#FF5B6168" Width="12" Height="12" VerticalAlignment="Top" Margin="1,1,0,0">
                                        <Ellipse.Fill>
                                            <RadialGradientBrush GradientOrigin="0.288,0.253">
                                                <GradientStop Color="#FFF2FFFF" Offset="0.328" />
                                                <GradientStop Color="#FF8ECEF5" Offset="1" />
                                            </RadialGradientBrush>
                                        </Ellipse.Fill>
                                    </Ellipse>
                                    <Rectangle Fill="#FF565E7E" Height="2" Margin="4,6,6,0" VerticalAlignment="Top" HorizontalAlignment="Left" Width="6" />
                                </Grid>
                            </Button>
                            <Button Command="{Binding Viewer.IncreaseZoomCommand, RelativeSource={RelativeSource TemplatedParent}}" ToolTipService.ToolTip="{Binding ZoomInTooltip, Source={StaticResource PdfViewerResources}}" Height="22" Width="22" Style="{StaticResource ClearStyleButtonStyle}" Background="Transparent" BorderThickness="0" Margin="0,0,2,0" c1:ClearStyleExtensions.CornerRadius="2" c1:ClearStyleExtensions.MouseOverBrush="{TemplateBinding c1:ClearStyleExtensions.MouseOverBrush}" c1:ClearStyleExtensions.PressedBrush="{TemplateBinding c1:ClearStyleExtensions.PressedBrush}" c1:ClearStyleExtensions.FocusBrush="{TemplateBinding c1:ClearStyleExtensions.FocusBrush}">
                                <Grid Height="16" Width="16">
                                    <Rectangle Fill="#FFFFDA6F" Height="8" Margin="6,0,2,0" Stroke="#FFF37B4D" VerticalAlignment="Bottom" Width="4" RadiusX="1" RadiusY="1" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Right">
                                        <Rectangle.RenderTransform>
                                            <RotateTransform Angle="-45" />
                                        </Rectangle.RenderTransform>
                                    </Rectangle>
                                    <Ellipse HorizontalAlignment="Left" Stroke="#FF5B6168" Width="12" Height="12" VerticalAlignment="Top" Margin="1,1,0,0">
                                        <Ellipse.Fill>
                                            <RadialGradientBrush GradientOrigin="0.288,0.253">
                                                <GradientStop Color="#FFF2FFFF" Offset="0.328" />
                                                <GradientStop Color="#FF8ECEF5" Offset="1" />
                                            </RadialGradientBrush>
                                        </Ellipse.Fill>
                                    </Ellipse>
                                    <Path Data="M2,0 L4,0 L4,2 L6,2 L6,4 L4,4 L4,6 L2,6 L2,4 L0,4 L0,2 L2,2 z" Fill="#FF565E7E" Margin="4,4,6,6" Stretch="Fill" />
                                </Grid>
                            </Button>
                            <c1:C1ComboBox x:Name="Zoom" BorderBrush="{TemplateBinding BorderBrush}" ButtonBackground="{TemplateBinding Background}" ButtonForeground="{TemplateBinding c1:ClearStyleExtensions.ButtonForeground}" Width="82" DropDownWidth="100">
                                <c1:C1ComboBox.ItemTemplate>
                                    <DataTemplate>
                                        <Grid>
                                            <Grid.Resources>
                                                <c1dv:PdfZoomConverter x:Key="converter" />
                                            </Grid.Resources>
                                            <TextBlock Text="{Binding Converter={StaticResource converter}}" />
                                        </Grid>
                                    </DataTemplate>
                                </c1:C1ComboBox.ItemTemplate>
                            </c1:C1ComboBox>
                            <StackPanel Orientation="Horizontal" Visibility="{Binding Viewer.IsFlowing, ConverterParameter=not, Converter={StaticResource boolToVisibility}, RelativeSource={RelativeSource TemplatedParent}}">
                                <ToggleButton x:Name="FitWidth" ToolTipService.ToolTip="{Binding FitWidthTooltip, Source={StaticResource PdfViewerResources}}" Height="22" Width="22" Style="{StaticResource ClearStyleButtonStyle}" Background="Transparent" BorderThickness="0" Margin="2,0,0,0" c1:ClearStyleExtensions.CornerRadius="2" c1:ClearStyleExtensions.MouseOverBrush="{TemplateBinding c1:ClearStyleExtensions.MouseOverBrush}" c1:ClearStyleExtensions.PressedBrush="{TemplateBinding c1:ClearStyleExtensions.PressedBrush}" c1:ClearStyleExtensions.FocusBrush="{TemplateBinding c1:ClearStyleExtensions.FocusBrush}">
                                    <Grid Height="14" Width="16">
                                        <Rectangle Margin="1,0">
                                            <Rectangle.Stroke>
                                                <LinearGradientBrush EndPoint="1,1" StartPoint="0,0">
                                                    <GradientStop Color="#FFB2C2D8" Offset="0.48" />
                                                    <GradientStop Color="#FF354963" Offset="0.52" />
                                                </LinearGradientBrush>
                                            </Rectangle.Stroke>
                                            <Rectangle.Fill>
                                                <LinearGradientBrush EndPoint="1,1" StartPoint="0,0">
                                                    <GradientStop Color="White" Offset="0.45" />
                                                    <GradientStop Color="#FFC7D2E1" Offset="1" />
                                                </LinearGradientBrush>
                                            </Rectangle.Fill>
                                        </Rectangle>
                                        <Path Data="M0,6 L6,6 L6,7 L0,7 z M0,4 L6,4 L6,5 L0,5 z M0,2 L6,2 L6,3 L0,3 z M0,0 L6,0 L6,1 L0,1 z" HorizontalAlignment="Right" Margin="0,4,5,3" Stretch="Fill" Width="6">
                                            <Path.Fill>
                                                <LinearGradientBrush EndPoint="1,1" StartPoint="0,0">
                                                    <GradientStop Color="#FFAED0FF" Offset="0" />
                                                    <GradientStop Color="#FF619ACD" Offset="1" />
                                                </LinearGradientBrush>
                                            </Path.Fill>
                                        </Path>
                                        <Path Data="M11,2E-07 L14,2E-07 L14,3 L11,3 z M0,0 L1,0 L2,0 L2,3 L1,3 L0,3 z" Fill="#FF628EDB" Height="3" Margin="1,6,1,0" Stretch="Fill" VerticalAlignment="Top" />
                                        <Path Data="M1,4 L2,4 L2,5 L1,5 z M14,4 L15,4 L15,5 L14,5 z M0,3 L1,3 L1,4 L0,4 z M15,3 L16,3 L16,4 L15,4 z M1,2 L2,2 L2,3 L1,3 z M14,2 L15,2 L15,3 L14,3 z M12,0 L13,0 L13,1 L14,1 L14,2 L13,2 L13,5 L14,5 L14,6 L13,6 L13,7 L12,7 z M3,0 L4,0 L4,7 L3,7 L3,6 L2,6 L2,5 L3,5 L3,2 L2,2 L2,1 L3,1 z" Fill="#FF4361D0" Height="7" Margin="0,4,0,0" Stretch="Fill" VerticalAlignment="Top" />
                                    </Grid>
                                </ToggleButton>
                                <ToggleButton x:Name="OnePage" ToolTipService.ToolTip="{Binding OnePageTooltip, Source={StaticResource PdfViewerResources}}" Height="22" Width="22" Style="{StaticResource ClearStyleButtonStyle}" Background="Transparent" BorderThickness="0" Margin="2,0,0,0" c1:ClearStyleExtensions.CornerRadius="2" c1:ClearStyleExtensions.MouseOverBrush="{TemplateBinding c1:ClearStyleExtensions.MouseOverBrush}" c1:ClearStyleExtensions.PressedBrush="{TemplateBinding c1:ClearStyleExtensions.PressedBrush}" c1:ClearStyleExtensions.FocusBrush="{TemplateBinding c1:ClearStyleExtensions.FocusBrush}">
                                    <Grid Height="14" Width="12">
                                        <Rectangle>
                                            <Rectangle.Stroke>
                                                <LinearGradientBrush EndPoint="0.907,0.859" StartPoint="0.029,0.208">
                                                    <GradientStop Color="#FFB2C2D8" Offset="0.48" />
                                                    <GradientStop Color="#FF354963" Offset="0.52" />
                                                </LinearGradientBrush>
                                            </Rectangle.Stroke>
                                            <Rectangle.Fill>
                                                <LinearGradientBrush EndPoint="1.011,0.851" StartPoint="0.003,0.173">
                                                    <GradientStop Color="White" Offset="0.45" />
                                                    <GradientStop Color="#FFC7D2E1" Offset="1" />
                                                </LinearGradientBrush>
                                            </Rectangle.Fill>
                                        </Rectangle>
                                        <Path Data="M0,6 L6,6 L6,7 L0,7 z M0,4 L6,4 L6,5 L0,5 z M0,2 L6,2 L6,3 L0,3 z M0,0 L6,0 L6,1 L0,1 z" Fill="#FF619ACD" HorizontalAlignment="Right" Margin="3,4,3,3" Stretch="Fill" Width="6" VerticalAlignment="Bottom" Height="7" />
                                    </Grid>
                                </ToggleButton>
                                
                            </StackPanel>
                            <Border Width="2" Background="{Binding Output, ElementName=SeparatorBrush}" BorderThickness="0,0,1,1" BorderBrush="#B2FFFFFF" Height="18" Margin="6,0" />

                            <!-- Find -->
                            <c1:C1TextBoxBase x:Name="Find" Padding="2,0,2,0" Watermark="{Binding FindWatermark, Source={StaticResource PdfViewerResources}}" Width="120" Height="22" BorderBrush="{TemplateBinding BorderBrush}" />
                            <StackPanel Orientation="Horizontal" VerticalAlignment="Top" Margin="0,3,2,0">
                                <TextBlock Text="{TemplateBinding FindResults}" Margin="2 0" />
                            </StackPanel>
                            <Button Command="{Binding Viewer.FindPreviousCommand, RelativeSource={RelativeSource TemplatedParent}}" ToolTipService.ToolTip="{Binding FindPreviousTooltip, Source={StaticResource PdfViewerResources}}" Height="22" Width="22" Style="{StaticResource ClearStyleButtonStyle}" Background="Transparent" BorderThickness="0" c1:ClearStyleExtensions.CornerRadius="2" c1:ClearStyleExtensions.MouseOverBrush="{TemplateBinding c1:ClearStyleExtensions.MouseOverBrush}" c1:ClearStyleExtensions.PressedBrush="{TemplateBinding c1:ClearStyleExtensions.PressedBrush}" c1:ClearStyleExtensions.FocusBrush="{TemplateBinding c1:ClearStyleExtensions.FocusBrush}">
                                <Grid Height="14" Width="14">
                                    <Path Data="M0,0 L7,0 L11,4 L11,14 L0,14 z" HorizontalAlignment="Left" Stretch="Fill" Width="11">
                                        <Path.Stroke>
                                            <LinearGradientBrush EndPoint="0.907,0.859" StartPoint="0.029,0.208">
                                                <GradientStop Color="#FFB2C2D8" Offset="0.48" />
                                                <GradientStop Color="#FF354963" Offset="0.52" />
                                            </LinearGradientBrush>
                                        </Path.Stroke>
                                        <Path.Fill>
                                            <LinearGradientBrush EndPoint="1.011,0.851" StartPoint="0.003,0.173">
                                                <GradientStop Color="White" Offset="0.45" />
                                                <GradientStop Color="#FFC7D2E1" Offset="1" />
                                            </LinearGradientBrush>
                                        </Path.Fill>
                                    </Path>
                                    <Path Data="M0,0 C0.1,0 4,3.8 4,4 C4,4 1.3,4 0,4 C0,2.7 0,0 0,0 z" Fill="#FFDBE2E8" Height="5" Margin="6,0,4,0" Stretch="Fill" VerticalAlignment="Top" Stroke="#FF738096" Width="5" />
                                    <Rectangle Fill="#FF5E6C7E" Height="1" Margin="3,6,6,0" VerticalAlignment="Top" />
                                    <Path Data="M0,2 L5,2 L5,3 L0,3 z M0,0 L5,0 L5,1 L0,1 z" Fill="#FFA8B0BA" Height="3" Margin="3,0,6,3" Stretch="Fill" VerticalAlignment="Bottom" />
                                    <Path Data="M2,0 L4,0 L4,7 L2,7 L2,5 L1,5 L0,5 L0,2 L1,2 L2,2 z" Fill="#FF61D22F" HorizontalAlignment="Right" Margin="0,3,0,4" Stretch="Fill" Width="4" Height="7" VerticalAlignment="Top" />
                                    <Path Data="M2,6 L3,6 L3,7 L2,7 z M1,5 L2,5 L2,6 L1,6 z M0,4 L1,4 L1,5 L0,5 z M1,3 L2,3 L2,4 L1,4 z M2,2 L3,2 L3,3 L2,3 z M4,0 L5,0 L5,1 L5,2 L5,7 L5,8 L5,9 L4,9 L4,8 L3,8 L3,7 L4,7 L4,2 L3,2 L3,1 L4,1 z" Fill="#FF229116" HorizontalAlignment="Right" Height="9" Stretch="Fill" VerticalAlignment="Top" Width="5" Margin="0,2,0,0" />
                                </Grid>
                            </Button>
                            <Button Command="{Binding Viewer.FindNextCommand, RelativeSource={RelativeSource TemplatedParent}}" ToolTipService.ToolTip="{Binding FindNextTooltip, Source={StaticResource PdfViewerResources}}" Height="22" Width="22" Style="{StaticResource ClearStyleButtonStyle}" Background="Transparent" BorderThickness="0" c1:ClearStyleExtensions.CornerRadius="2" c1:ClearStyleExtensions.MouseOverBrush="{TemplateBinding c1:ClearStyleExtensions.MouseOverBrush}" c1:ClearStyleExtensions.PressedBrush="{TemplateBinding c1:ClearStyleExtensions.PressedBrush}" c1:ClearStyleExtensions.FocusBrush="{TemplateBinding c1:ClearStyleExtensions.FocusBrush}">
                                <Grid Height="14" Width="14">
                                    <Path Data="M0,0 L7,0 L11,4 L11,14 L0,14 z" HorizontalAlignment="Right" Stretch="Fill" Width="11">
                                        <Path.Stroke>
                                            <LinearGradientBrush EndPoint="0.907,0.859" StartPoint="0.029,0.208">
                                                <GradientStop Color="#FFB2C2D8" Offset="0.48" />
                                                <GradientStop Color="#FF354963" Offset="0.52" />
                                            </LinearGradientBrush>
                                        </Path.Stroke>
                                        <Path.Fill>
                                            <LinearGradientBrush EndPoint="1.011,0.851" StartPoint="0.003,0.173">
                                                <GradientStop Color="White" Offset="0.45" />
                                                <GradientStop Color="#FFC7D2E1" Offset="1" />
                                            </LinearGradientBrush>
                                        </Path.Fill>
                                    </Path>
                                    <Path Data="M0,0 C0.1,0 4,3.8 4,4 C4,4 1.3,4 0,4 C0,2.7 0,0 0,0 z" Fill="#FFDBE2E8" Height="5" Margin="6,0,0,0" Stretch="Fill" VerticalAlignment="Top" Stroke="#FF738096" Width="5" HorizontalAlignment="Right" />
                                    <Rectangle Fill="#FF5E6C7E" Height="1" Margin="3,6,3,3" VerticalAlignment="Bottom" Width="5" HorizontalAlignment="Right" />
                                    <Path Data="M0,2 L5,2 L5,3 L0,3 z M0,0 L5,0 L5,1 L0,1 z" Fill="#FFA8B0BA" Height="3" Margin="3,0,3,5" Stretch="Fill" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="5" />
                                    <Path Data="M0,0 L2,0 L2,2 L4,2 L4,5 L2,5 L2,7 L0,7 z" Fill="#FF61D22F" HorizontalAlignment="Left" Margin="0,3,0,1" Stretch="Fill" Width="4" Height="7" VerticalAlignment="Bottom" />
                                    <Path Data="M0,0 L1,0 L1,1 L0,1 z" Fill="#FF229116" HorizontalAlignment="Left" Margin="4,0,0,4" Stretch="Fill" Width="1" VerticalAlignment="Bottom" Height="1" />
                                    <Path Data="M0,0 L1,0 L1,1 L2,1 L2,2 L3,2 L3,3 L4,3 L4,4 L3,4 L3,3 L2,3 L2,2 L1,2 L1,7 L2,7 L2,6 L3,6 L3,5 L4,5 L4,6 L3,6 L3,7 L2,7 L2,8 L1,8 L1,9 L0,9 z" Fill="#FF229116" HorizontalAlignment="Left" Stretch="Fill" Width="4" VerticalAlignment="Bottom" Height="9" />
                                </Grid>
                            </Button>

                        </StackPanel>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="c1dv:C1PdfViewerToolbar" BasedOn="{StaticResource C1PdfViewerToolbarDefaultStyle}" />

    <!-- Style @ PdfViewer -->
    <Style TargetType="c1dv:C1PdfViewer">
        <Setter Property="Background" Value="{StaticResource InputBackgroundBrush}" />
        <Setter Property="BorderBrush" Value="{StaticResource BorderBrush}" />
        <Setter Property="BorderThickness" Value="{StaticResource GeneralThickness}" />
        <Setter Property="Foreground" Value="{StaticResource ForegroundTextBoxBrushColor}" />
        <Setter Property="SelectionBackground" Value="#7F0050F0" />
        <Setter Property="PageSeparation" Value="6 3" />
        <Setter Property="ToolbarStyle" Value="{StaticResource C1PdfViewerToolbarDefaultStyle}" />
        <Setter Property="ScrollBarStyle" Value="{StaticResource ScrollBarClearStyle}" />
        <Setter Property="ViewportGap" Value="0.5" />
        <Setter Property="PageTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid Cursor="IBeam">
                        <Border Background="#19000000" Margin="4,4,-4,-4" CornerRadius="2" />
                        <Border Background="#19000000" Margin="3,3,-3,-3" CornerRadius="2" />
                        <Border Background="#19000000" Margin="2,2,-2,-2" CornerRadius="2" />
                        <Border Background="#19000000" Margin="1,1,-1,-1" CornerRadius="2" />
                        <Border Background="White" />
                        <ContentControl Width="{Binding Width}" Height="{Binding Height}" Content="{Binding Page}" />
                        <Border BorderThickness="1" BorderBrush="#FF858585" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="c1dv:C1PdfViewer">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition />
                        </Grid.RowDefinitions>
                        
                        <c1dv:C1PdfViewerToolbar OpenButtonVisibility="{TemplateBinding OpenButtonVisibility}" Viewer="{Binding RelativeSource={RelativeSource TemplatedParent}}" Visibility="{TemplateBinding ToolbarVisibility}" Style="{TemplateBinding ToolbarStyle}" />

                        <c1:C1ListViewer x:Name="PageList" Grid.Row="1" Background="{TemplateBinding Background}" Orientation="{TemplateBinding Orientation}" ViewportGap="{TemplateBinding ViewportGap}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" HorizontalScrollBarVisibility="{TemplateBinding HorizontalScrollBarVisibility}" VerticalScrollBarVisibility="{TemplateBinding VerticalScrollBarVisibility}" RefreshWhileScrolling="True" ItemTemplate="{TemplateBinding PageTemplate}">
                            <c1:C1ListViewer.ItemStyle>
                                <Style TargetType="c1:C1ListViewerItem">
                                    <Setter Property="Background" Value="White" />
                                    <Setter Property="Margin" Value="{Binding RelativeSource={RelativeSource AncestorType=c1dv:C1PdfViewer,Mode=FindAncestor,AncestorLevel=1}, Path=PageSeparation,Mode=TwoWay}" />
                                    <Setter Property="HorizontalAlignment" Value="Center" />
                                    <Setter Property="VerticalAlignment" Value="Center" />
                                </Style>
                            </c1:C1ListViewer.ItemStyle>
                            <c1:C1ListViewer.PreviewItemTemplate>
                                <DataTemplate>
                                    <Grid Cursor="IBeam">
                                        <Border Background="#19000000" Margin="4,4,-4,-4" CornerRadius="2" />
                                        <Border Background="#19000000" Margin="3,3,-3,-3" CornerRadius="2" />
                                        <Border Background="#19000000" Margin="2,2,-2,-2" CornerRadius="2" />
                                        <Border Background="#19000000" Margin="1,1,-1,-1" CornerRadius="2" />
                                        <Border Background="White" />
                                        <ContentControl Width="{Binding Width}" Height="{Binding Height}" />
                                        <Border BorderThickness="1" BorderBrush="#FF858585" />
                                    </Grid>
                                 
                                </DataTemplate>
                            </c1:C1ListViewer.PreviewItemTemplate>
                        </c1:C1ListViewer>
                        
                        <StackPanel x:Name="SearchIndicator" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center" Visibility="Collapsed">
                            <TextBlock HorizontalAlignment="Center" FontSize="20" Text="{Binding SearchingText, Source={StaticResource PdfViewerResources}}" />
                            <c1:C1ProgressBar IsIndeterminate="True" />
                        </StackPanel>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
