<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:noesis="clr-namespace:NoesisGUIExtensions;assembly=Noesis.GUI.Extensions"
    xmlns:sys="clr-namespace:System;assembly=mscorlib">

    <!-- LIST VIEW TEMPLATE -->
    <!--////////////////////////////////////////////////////////////////////-->
    <ControlTemplate x:Key="Template.ListViewControl" TargetType="ListView">
        <ScrollViewer
            Style="{DynamicResource Style.GridView.ScrollViewer}"
            Background="{TemplateBinding Background}"
            BorderBrush="{TemplateBinding BorderBrush}"
            BorderThickness="{TemplateBinding BorderThickness}"
            Padding="{TemplateBinding Padding}"
            Focusable="False">

            <ItemsPresenter>
                <ItemsPresenter.OpacityMask>
                    <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
                        <GradientStop Color="#FF000000" Offset="0.9"/>
                        <GradientStop Offset="0.95"/>
                    </LinearGradientBrush>
                </ItemsPresenter.OpacityMask>
            </ItemsPresenter>
        </ScrollViewer>
    </ControlTemplate>

    <Style x:Key="Style.ListViewControl" TargetType="ListView" BasedOn="{StaticResource {x:Type ItemsControl}}">
        <Setter Property="OverridesDefaultStyle" Value="True"/>
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
        <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
        <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
        <Setter Property="VirtualizingPanel.VirtualizationMode" Value="Recycling"/>
        <Setter Property="VirtualizingPanel.ScrollUnit" Value="Pixel"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="0,0,24,0"/>
        <Setter Property="Template" Value="{StaticResource Template.ListViewControl}"/>
        <Setter Property="FocusVisualStyle" Value="{DynamicResource Style.Focus}"/>
    </Style>
</ResourceDictionary>
