<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
                    mc:Ignorable="d">

    <Style x:Key="GridViewItemTemplate" TargetType="{x:Type GameListItem}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type GameListItem}">
                    <Border BorderThickness="{Settings GridItemMargin}" BorderBrush="{DynamicResource GridItemBackgroundBrush}">
                        <StackPanel Name="PART_PanelHost"
                                    d:DataContext="{x:Static DesignMainViewModel.DesignSelectedGameIntance}">

                            <Grid Width="{Settings GridItemWidth}"
                              Height="{Settings GridItemHeight}">
                                <Image Name="PART_ImageCover"
                                   RenderOptions.BitmapScalingMode="Fant" StretchDirection="Both"
                                   HorizontalAlignment="Center" VerticalAlignment="Center"
                                   Stretch="{Settings CoverArtStretch}" />
                                <Border Background="#99000000" x:Name="TextGameName" Visibility="Collapsed">
                                    <TextBlock Text="{Binding DisplayName}"
                                           TextWrapping="Wrap" Margin="5"
                                           Style="{StaticResource BaseTextBlockStyle}"
                                           TextTrimming="CharacterEllipsis" TextAlignment="Center"
                                           HorizontalAlignment="Center" VerticalAlignment="Center"/>
                                </Border>
                                <Border Background="#AA000000" x:Name="BorderMouseOver" Visibility="Collapsed" />
                                <Viewbox VerticalAlignment="Center" HorizontalAlignment="Center"
                                         Name="GameControls"  Visibility="Collapsed">
                                    <StackPanel Orientation="Horizontal">
                                        <Button Name="PART_ButtonPlay" Style="{StaticResource SimpleButton}"
                                                Margin="20,0,2,0" VerticalAlignment="Center"
                                                Content="&#xec74;" FontFamily="{StaticResource FontIcoFont}" />
                                        <Button Name="PART_ButtonInfo" Style="{StaticResource SimpleButton}"
                                                Margin="2,0,20,0" VerticalAlignment="Center"
                                                Content="&#xef4f;" FontFamily="{StaticResource FontIcoFont}" />
                                    </StackPanel>
                                </Viewbox>
                            </Grid>
                            <TextBlock Text="{Binding DisplayName}"
                                   Style="{DynamicResource BaseTextBlockStyle}"                                                                   
                                   TextAlignment="Center" TextTrimming="CharacterEllipsis"
                                   VerticalAlignment="Center"
                                   Padding="2,5,2,5" Grid.Row="1" Grid.Column="0"
                                   Width="{Settings GridItemWidth}" 
                                   Visibility="{Settings ShowNamesUnderCovers}" />
                        </StackPanel>
                    </Border>
                    <ControlTemplate.Triggers>
                        <DataTrigger Binding="{Binding IsInstalled}" Value="False">
                            <Setter Property="Content" Value="&#xef08;" TargetName="PART_ButtonPlay" />
                        </DataTrigger>
                        <MultiDataTrigger>
                            <MultiDataTrigger.Conditions>
                                <Condition Binding="{Binding IsInstalled}" Value="False" />
                                <Condition Binding="{Settings DarkenUninstalledGamesGrid}" Value="True" />
                            </MultiDataTrigger.Conditions>
                            <Setter Property="Visibility" Value="Visible" TargetName="BorderMouseOver" />
                        </MultiDataTrigger>
                        <MultiDataTrigger>
                            <MultiDataTrigger.Conditions>
                                <Condition Binding="{Binding CoverImage}" Value="{x:Null}" />
                                <Condition Binding="{Settings ShowNameEmptyCover}" Value="True" />
                            </MultiDataTrigger.Conditions>
                            <Setter Property="Visibility" Value="Visible" TargetName="TextGameName"/>
                        </MultiDataTrigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Visibility" Value="Visible" TargetName="BorderMouseOver"/>
                            <Setter Property="Visibility" Value="Visible" TargetName="GameControls"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>