1: <UserControl x:Class="FilmList.Views.FilmView"
2: xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4: xmlns:Converters="clr-namespace:FilmList.Converters">
5: <UserControl.Resources>
6: <Converters:ImagePathConverter x:Key="ImagePathConverter"/>
7: </UserControl.Resources>
8: <Border BorderThickness="2" CornerRadius="10" Padding="4" Margin="2"
9: Background="{Binding Path=Background, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListBoxItem}}}">
10: <Grid>
11: <Grid.RowDefinitions>
12: <RowDefinition/>
13: <RowDefinition/>
14: </Grid.RowDefinitions>
15: <Grid.ColumnDefinitions>
16: <ColumnDefinition Width="70"></ColumnDefinition>
17: <ColumnDefinition Width="300"></ColumnDefinition>
18: <ColumnDefinition Width="*"></ColumnDefinition>
19: </Grid.ColumnDefinitions>
20: <Border Grid.Column="0" Grid.RowSpan="2" VerticalAlignment="Stretch" Background="White" Margin="0,0,10,0" CornerRadius="4">
21: <Image Source="{Binding Path=Cover, Converter={StaticResource ImagePathConverter}, ConverterParameter=../Images}"
22: Margin="2,2,2,2" VerticalAlignment="Center" Height="64"/>
23: </Border>
24: <TextBlock Grid.Row="0" Grid.Column="1" Style="{StaticResource SubTitleStyle}" Text="{Binding Path=Title}" MinWidth="50" Margin="0,0,5,0" />
25: <TextBlock Grid.Row="1" Grid.Column="2" Style="{StaticResource SubTitleStyle}" Text="{Binding Path=Genre}" FontSize="20" MinWidth="50" Margin="0,0,5,0" />
26: <TextBlock Grid.Row="1" Grid.Column="1" Style="{StaticResource SubTitleStyle}" Text="{Binding Path=OriginalTitle}" FontSize="20" MinWidth="50" Margin="0,0,5,0" />
27: </Grid>
28: <Border.Style>
29: <Style>
30: <Style.Triggers>
31: <DataTrigger Binding="{Binding Path=IsSelected,
32: RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListBoxItem}}}" Value="True">
33: <Setter Property="Border.BorderBrush" Value="#FF0561CE"/>
34: </DataTrigger>
35: <DataTrigger Binding="{Binding Path=IsSelected,
36: RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListBoxItem}}}" Value="False">
37: <Setter Property="Border.BorderBrush" Value="#FF9B9B9B"/>
38: </DataTrigger>
39: </Style.Triggers>
40: </Style>
41: </Border.Style>
42: </Border>
43: </UserControl>