<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ForzaUI"
                    xmlns:System="clr-namespace:System;assembly=mscorlib">

    <!-- Colors -->

    <!-- Template for each Notice -->

    <!-- Template for items on the LiveTile -->


    <!-- Colors -->
    <Color x:Key="A_Color_ScrollBarForeground">#FF202020</Color>
    <Color x:Key="A_Color_ScrollBarBackground_Noticeboard">#4E202020</Color>

    <!-- Brushes -->
    <SolidColorBrush x:Key="A_Brush_ScrollBarForeground" Color="{StaticResource A_Color_ScrollBarForeground}" />
    <SolidColorBrush x:Key="A_Brush_ScrollBarBackground_Noticeboard" Color="{StaticResource A_Color_ScrollBarBackground_Noticeboard}" />

    <!-- Textures -->
    <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPresetRoundtangle_HorizontalFadeViewer_MultiplyBlendFader" AlphaMode="Multiply" Softness="40" Unlit="True" />
    <ControlTemplate x:Key="A_ControlTemplate_HorizontalFadeViewer" TargetType="ContentControl" >
        <!--<Grid Effect="{StaticResource A_MotionBlurEffect}" local:MotionBlurEffect.MotionBlurPositionYControl="{Binding VerticalOffset, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:FZScrollViewer}}}">-->
        <Grid Effect="{StaticResource A_MotionBlurEffect}">
            <ContentPresenter Content="{TemplateBinding Content}" />
            <DockPanel ClipToBounds="True" Height="40" VerticalAlignment="Top" Visibility="{Binding IsAtTop, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:FZScrollViewer}}, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}">
                <local:FZMaterial Margin="-40,-15,-40,-40" Color="White" Preset="{StaticResource A_FZMaterialPresetRoundtangle_HorizontalFadeViewer_MultiplyBlendFader}" />
            </DockPanel>
            <DockPanel ClipToBounds="True" Height="40" VerticalAlignment="Bottom" Visibility="{Binding IsAtBottom, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:FZScrollViewer}}, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}">
                <local:FZMaterial Margin="-40,-40,-40,-15" Color="White" Preset="{StaticResource A_FZMaterialPresetRoundtangle_HorizontalFadeViewer_MultiplyBlendFader}" />
            </DockPanel>
        </Grid>
    </ControlTemplate>
    <Style x:Key="A_ContentControl_HorizontalFadeViewer" TargetType="ContentControl" >
        <Setter Property="Template" Value="{StaticResource A_ControlTemplate_HorizontalFadeViewer}" />
        <Setter Property="Focusable" Value="False" />
    </Style>
    
    <!-- ScrollViewer Style -->
    <ControlTemplate x:Key="A_ControlTemplate_FZScrollViewer_LargeScrollableNoticePanel" TargetType="{x:Type local:FZScrollViewer}">
        <Grid>
            <ContentControl Style="{StaticResource A_ContentControl_HorizontalFadeViewer}"
                Margin="{Binding (local:BindingProxy.A), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:CommonListBox}}}">
                <ScrollContentPresenter HorizontalAlignment="Right" CanContentScroll="True" />
            </ContentControl>
            <ScrollBar x:Name="PART_VerticalScrollBar"
                    Background="{StaticResource A_Brush_ScrollBarBackground_Noticeboard}"
                    Foreground="{StaticResource A_Brush_ScrollBarForeground}"
                    HorizontalAlignment="Right"
                    Minimum="0" 
                    Maximum="{TemplateBinding ScrollableHeight}" 
                    ViewportSize="{TemplateBinding ViewportHeight}" 
                    Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource Mode=TemplatedParent}}" 
                    Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" 
                    Margin="0, 0, -25, 0"
                    Style="{StaticResource A_Style_ScrollBar_Default}">
            </ScrollBar>
        </Grid>
    </ControlTemplate>

    <!-- ListBox Style -->
    <Style x:Key="A_Style_CommonListBox_LargeScrollableNoticePanel" TargetType="{x:Type local:CommonListBox}">
        <Setter Property="local:BindingProxy.A">
            <Setter.Value>
                <Thickness>0</Thickness>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:CommonListBox}">
                    <local:FZScrollViewer 
                                Style="{StaticResource {x:Static GridView.GridViewScrollViewerStyleKey}}" 
                                Template="{StaticResource A_ControlTemplate_FZScrollViewer_LargeScrollableNoticePanel}"
                                VerticalScrollBarVisibility="Auto"
                                CanContentScroll="True"
                                KeepSelectionOnScreen="True" >
                        <ItemsPresenter />
                    </local:FZScrollViewer>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>    

    
</ResourceDictionary>