<ListView x:Class="APE.presentation.List"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
			 xmlns:pr="clr-namespace:APE.presentation" pr:ListItem.RangeSelected="OnRangeSelected" SelectionMode="Multiple">
	<ListView.Resources>
		<pr:TileView x:Key="TileView" />
		<LinearGradientBrush x:Key="NormalSelection"
						 StartPoint="0.5,0"
						 EndPoint="0.5,1">
			<GradientStop Offset="0"
					  Color="#dff5fd" />
			<GradientStop Offset="0.4"
					  Color="#d2f1fd" />
			<GradientStop Offset="0.6"
					  Color="#d2f1fd" />
			<GradientStop Offset="1"
					  Color="#c3edfd" />
		</LinearGradientBrush>
		<LinearGradientBrush x:Key="HardSelection"
						 StartPoint="0.5,0"
						 EndPoint="0.5,1">
			<GradientStop Offset="0"
					  Color="#82ceea" />
			<GradientStop Offset="0.4"
					  Color="#6ac8ec" />
			<GradientStop Offset="0.6"
					  Color="#6ac8ec" />
			<GradientStop Offset="1"
					  Color="#00aeef" />
		</LinearGradientBrush>
	</ListView.Resources>
	<ListView.ItemContainerStyle>
		<Style TargetType="{x:Type pr:ListItem}">
			<Setter Property="Background" Value="Transparent"/>
			<Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
			<Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
			<Setter Property="Padding" Value="0,2,0,0"/>
			<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type pr:ListItem}">
						<Border x:Name="outerBd" SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" Margin="0, 0, 3, 3">
							<Border x:Name="innerBd" BorderThickness="1">
							<ContentPresenter HorizontalAlignment="{TemplateBinding ListViewItem.HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding ListViewItem.VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding ListViewItem.SnapsToDevicePixels}"/>
							</Border>
						</Border>
						<ControlTemplate.Triggers>
							<Trigger Property="ListViewItem.IsSelected" Value="true">
								<Setter Property="Background" Value="{StaticResource NormalSelection}"/>
								<Setter Property="Foreground" Value="Black"/>
								<Setter TargetName="outerBd" Property="BorderBrush" Value="#00a8ff"/>
								<Setter TargetName="innerBd" Property="BorderBrush" Value="#d2f1fd"/>
							</Trigger>
							<Trigger Property="IsHardSelected" Value="true">
								<Setter Property="Background" Value="{StaticResource HardSelection}"/>
								<Setter Property="Foreground" Value="White"/>
								<Setter TargetName="outerBd" Property="BorderBrush" Value="#00aeef"/>
								<Setter TargetName="innerBd" Property="BorderBrush" Value="#6ac8ec"/>
							</Trigger>
							<Trigger Property="MarkedForCopy" Value="true">
								<Setter TargetName="outerBd" Property="BorderBrush" Value="#18a006"/>
								<Setter TargetName="innerBd" Property="BorderBrush" Value="#18a006"/>
							</Trigger>
							<Trigger Property="MarkedForMove" Value="true">
								<Setter TargetName="outerBd" Property="BorderBrush" Value="#df006e"/>
								<Setter TargetName="innerBd" Property="BorderBrush" Value="#df006e"/>
							</Trigger>
						</ControlTemplate.Triggers>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
	</ListView.ItemContainerStyle>
</ListView>
