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

    <Style TargetType="{x:Type GameDetails}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type GameDetails}">
                    <Grid Background="{DynamicResource MainBackgourndBrush}"
                          x:Name="PART_ViewHost"
                          d:DesignWidth="{StaticResource DesignWidth}"
                          d:DesignHeight="{StaticResource DesignHeight}"
                          d:DataContext="{x:Static DesignMainViewModel.DesignSelectedGameIntance}"
                          KeyboardNavigation.DirectionalNavigation="Contained"
                          KeyboardNavigation.TabNavigation="Cycle"
                          KeyboardNavigation.ControlTabNavigation="Cycle">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="350" />
                            <ColumnDefinition Width="6*" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="3*" />
                            <RowDefinition Height="4*" />
                        </Grid.RowDefinitions>
                        
                        <FadeImage HorizontalAlignment="Center" VerticalAlignment="Top"
                                   Grid.ColumnSpan="4" Grid.RowSpan="2"
                                   x:Name="PART_ImageBackground" />

                        <Border Background="{DynamicResource GameDetailsBackgroundBrush}"
                                Grid.ColumnSpan="4" Grid.Row="1" />

                        <Border CornerRadius="3" BorderThickness="3" BorderBrush="{DynamicResource ControlBackgroundBrush}"
                                Margin="14" Grid.Column="1" Grid.Row="1"
                                VerticalAlignment="Top"
                                HorizontalAlignment="Right">
                            <Image x:Name="PART_ImageCover" />
                        </Border>

                        <Image Grid.Column="1" Grid.Row="1"
                               VerticalAlignment="Top"
                               HorizontalAlignment="Right"
                               Margin="24"
                               Source="{Binding LibraryPlugin.LibraryIcon}"
                               Height="48" RenderOptions.BitmapScalingMode="Fant">
                            <Image.Effect>
                                <DropShadowEffect Color="White" BlurRadius="20" ShadowDepth="0"
                                                  RenderingBias="Quality" Opacity="1"/>
                            </Image.Effect>
                        </Image>

                        <DockPanel Grid.Column="2" Grid.Row="1"
                                   Margin="20"
                                   HorizontalAlignment="Left">

                            <TextBlock Style="{DynamicResource TextBlockBaseStyle}"
                                       Text="{Binding DisplayName}"
                                       Foreground="White" FontFamily="{DynamicResource FontTitilliumWebBold}"
                                       FontSize="38" DockPanel.Dock="Top">
                                <TextBlock.Effect>
                                    <DropShadowEffect ShadowDepth="2" Color="Black"
                                                      RenderingBias="Quality" Opacity="1"/>
                                </TextBlock.Effect>
                            </TextBlock>

                            <StackPanel Orientation="Horizontal" DockPanel.Dock="Top" Margin="0,20,20,20">
                                <StackPanel>
                                    <TextBlock Style="{DynamicResource TextBlockBaseStyle}"
                                               FontFamily="{DynamicResource FontTitilliumWebBold}"
                                               Text="{DynamicResource LOCTimePlayed}"
                                               Margin="0,0,0,10" />
                                    <TextBlock Style="{DynamicResource TextBlockBaseStyle}"
                                               Text="{Binding Playtime, Converter={StaticResource PlayTimeToStringConverter}}" />
                                </StackPanel>
                                
                                <StackPanel Margin="50,0,0,0">
                                    <TextBlock Style="{DynamicResource TextBlockBaseStyle}"
                                               FontFamily="{DynamicResource FontTitilliumWebBold}"
                                               Text="{DynamicResource LOCGameLastActivityTitle}"
                                               Margin="0,0,0,10" />
                                    <TextBlock Style="{DynamicResource TextBlockBaseStyle}"
                                               Text="{Binding LastActivity, Converter={StaticResource DateTimeToLastPlayedConverter}}" />
                                </StackPanel>

                                <StackPanel Margin="50,0,0,0">
                                    <TextBlock Style="{DynamicResource TextBlockBaseStyle}"
                                               FontFamily="{DynamicResource FontTitilliumWebBold}"
                                               Text="{DynamicResource LOCGameReleaseDateTitle}"
                                               Margin="0,0,0,10" />
                                    <TextBlock Style="{DynamicResource TextBlockBaseStyle}"
                                               Text="{Binding ReleaseDate}" />
                                </StackPanel>

                                <StackPanel Margin="50,0,0,0">
                                    <TextBlock Style="{DynamicResource TextBlockBaseStyle}"
                                               FontFamily="{DynamicResource FontTitilliumWebBold}"
                                               Text="{DynamicResource LOCGamePlatformTitle}"
                                               Margin="0,0,0,10" />
                                    <TextBlock Style="{DynamicResource TextBlockBaseStyle}"
                                               Text="{Binding Platforms, Converter={StaticResource ListToStringConverter}}" />
                                </StackPanel>
                            </StackPanel>
                            
                            <StackPanel Orientation="Horizontal" DockPanel.Dock="Top">
                                <ButtonEx x:Name="PART_ButtonContext"
                                          Margin="2" BorderThickness="2" MinWidth="220" HorizontalContentAlignment="Center" />
                                <ButtonEx x:Name="PART_ButtonOptions"
                                          Content="{DynamicResource LOCGameOptions}"
                                          Margin="5,2,2,2" BorderThickness="2" MinWidth="220" HorizontalContentAlignment="Center" />
                            </StackPanel>
      
                            <ScrollViewerEx Margin="0,20,0,0" DockPanel.Dock="Top"
                                            x:Name="PART_ScrollHtmlDescription">
                                <HtmlTextView x:Name="PART_HtmlDescription"
                                                HtmlFontSize="16"
                                                HtmlForeground="{DynamicResource TextColor}"
                                                LinkForeground="{DynamicResource GlyphColor}"
                                                FocusVisualStyle="{x:Null}" />
                            </ScrollViewerEx>
                        </DockPanel>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>