<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:c1dv="using:C1.Xaml.PdfViewer"
    xmlns:c1="using:C1.Xaml"
    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="ms-appx:///C1.UWP/themes/Common.xaml"/>
    </ResourceDictionary.MergedDictionaries>

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

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

    <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 @ PdfViewer -->
    <Style TargetType="c1dv:C1PdfViewer">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="Foreground" Value="{ThemeResource ForegroundTextBoxBrushColor}"/>
        <Setter Property="ViewportGap" Value="0.5" />
        <Setter Property="PageTemplate">
            <Setter.Value>
                <DataTemplate>
                    <ContentControl Width="{Binding Width}" 
                                                            Height="{Binding Height}" 
                                                            Content="{Binding Page}"/>
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="c1dv:C1PdfViewer">
                    <Grid>
                        <c1:C1ListViewer x:Name="PageList" 
                                     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="BorderBrush" Value="{ThemeResource ButtonBorderThemeBrush}"/>
                                    <Setter Property="BorderThickness" Value="{ThemeResource TextControlBorderThemeThickness}"/>
                                    <Setter Property="Margin" Value="6 3"/>
                                    <Setter Property="HorizontalAlignment" Value="Center"/>
                                    <Setter Property="VerticalAlignment" Value="Center"/>
                                </Style>
                            </c1:C1ListViewer.ItemStyle>
                            <c1:C1ListViewer.PreviewItemTemplate>
                                <DataTemplate>
                                    <ContentControl Width="{Binding Width}" 
                                                            Height="{Binding Height}"/>
                                </DataTemplate>
                            </c1:C1ListViewer.PreviewItemTemplate>
                        </c1:C1ListViewer>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
