<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 TargetType="{x:Type GridViewGameOverview}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type GridViewGameOverview}">
                    <Border Padding="10,0,5,0" BorderBrush="{DynamicResource PanelSeparatorBrush}"
                            d:DataContext="{x:Static DesignMainViewModel.DesignSelectedGameDetailsIntance}">
                        <Border.Style>
                            <Style TargetType="Border">
                                <Setter Property="BorderThickness" Value="1,0,0,0" />
                                <Style.Triggers>
                                    <DataTrigger Binding="{Settings GridViewDetailsPosition}" Value="Left">
                                        <Setter Property="BorderThickness" Value="0,0,1,0" />
                                    </DataTrigger>
                                    <DataTrigger Binding="{Settings ShowPanelSeparators}" Value="False">
                                        <Setter Property="BorderThickness" Value="0" />
                                    </DataTrigger>
                                </Style.Triggers>
                            </Style>
                        </Border.Style>
                        <DockPanel>
                            <Button HorizontalAlignment="Right" VerticalAlignment="Top"
                                    Content="r" FontFamily="Marlett"
                                    Style="{DynamicResource SimpleButton}"
                                    Command="{MainViewModel CloseGameSideBarCommand}"
                                    DockPanel.Dock="Top" Margin="0,10,15,5" />

                            <TextBlock Text="{DynamicResource LOCErrorNoGameSelected}" 
                                   Margin="0,20,0,0" DockPanel.Dock="Top"
                                   HorizontalAlignment="Center" VerticalAlignment="Center">
                                <TextBlock.Style>
                                    <Style TargetType="TextBlock" BasedOn="{StaticResource BaseTextBlockStyle}">
                                        <Setter Property="Visibility" Value="Collapsed" />
                                        <Style.Triggers>
                                            <Trigger Property="DataContext" Value="{x:Null}">
                                                <Setter Property="Visibility" Value="Visible" />
                                            </Trigger>
                                        </Style.Triggers>
                                    </Style>
                                </TextBlock.Style>
                            </TextBlock>

                            <DockPanel DockPanel.Dock="Top">
                                <DockPanel.Style>
                                    <Style TargetType="DockPanel">
                                        <Style.Triggers>
                                            <Trigger Property="DataContext" Value="{x:Null}">
                                                <Setter Property="Visibility" Value="Collapsed" />
                                            </Trigger>
                                        </Style.Triggers>
                                    </Style>
                                </DockPanel.Style>

                                <DockPanel DockPanel.Dock="Top">
                                    <Image Name="PART_ImageIcon" DockPanel.Dock="Left" MaxHeight="32" MaxWidth="32"
                                           RenderOptions.BitmapScalingMode="Fant" Margin="0,0,10,0" />
                                    <TextBlock Name="PART_TextDisplayName" FontSize="{DynamicResource FontSizeLarger}"
                                               TextWrapping="Wrap" DockPanel.Dock="Left"
                                               VerticalAlignment="Center" Foreground="{DynamicResource TextBrush}">
                                        <TextBlock.Effect>
                                            <DropShadowEffect ShadowDepth="3"/>
                                        </TextBlock.Effect>
                                    </TextBlock>
                                </DockPanel>

                                <Grid DockPanel.Dock="Top" Margin="0,10,0,10" Background="Transparent">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="*" MaxWidth="150" />
                                        <ColumnDefinition Width="*" MaxWidth="150" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <Button Name="PART_ButtonPlayAction" Grid.Column="0"
                                            Height="40" Style="{DynamicResource PlayButton}" />
                                    <Button Name="PART_ButtonContextAction"
                                            Height="40" Grid.Column="0" />
                                    <Button Name="PART_ButtonMoreActions"
                                            Content="{DynamicResource LOCMoreAction}"
                                            Height="40" Grid.Column="1" Margin="10,0,0,0" />
                                    <Button x:Name="PART_ButtonEditGame" Grid.Column="2"
                                            Margin="10,0,5,0" Height="40" Focusable="False"
                                            Content="&#xeded;" FontFamily="{DynamicResource FontIcoFont}">
                                        <Button.Style>
                                            <Style TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
                                                <Setter Property="Visibility" Value="Hidden" />
                                                <Style.Triggers>
                                                    <DataTrigger Binding="{Binding IsMouseOver, RelativeSource={RelativeSource AncestorType=Grid}}"  Value="True">
                                                        <Setter Property="Visibility" Value="Visible" />
                                                    </DataTrigger>
                                                </Style.Triggers>
                                            </Style>
                                        </Button.Style>
                                    </Button>
                                </Grid>

                                <ScrollViewer DockPanel.Dock="Top" HorizontalAlignment="Stretch"
                                              HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto"
                                              x:Name="PART_ScrollViewHost">
                                    <DockPanel>
                                        <StackPanel DockPanel.Dock="Top" Margin="5,0,0,0">
                                            <StackPanel.Resources>
                                                <Style TargetType="ItemsControl">
                                                    <Setter Property="VerticalAlignment" Value="Center" />
                                                </Style>
                                                <Style TargetType="Label" BasedOn="{StaticResource {x:Type Label}}">
                                                    <Setter Property="Margin" Value="0,4,8,4" />
                                                    <Setter Property="VerticalAlignment" Value="Top" />
                                                    <Setter Property="Foreground" Value="{DynamicResource TextBrush}" />
                                                </Style>
                                                <Style TargetType="Button" BasedOn="{StaticResource PropertyItemButton}" />
                                            </StackPanel.Resources>

                                            <GridEx Margin="0,5,0,10"
                                                    ColumnCount="2" StarColumns="1"
                                                    RowCount="25" AutoLayoutColumns="2">
                                                <Grid.Resources>
                                                    <Style TargetType="TextBlock" BasedOn="{StaticResource BaseTextBlockStyle}" />
                                                </Grid.Resources>

                                                <Label Name="PART_ElemAdded" Content="{DynamicResource LOCDateAddedLabel}" />
                                                <TextBlock Name="PART_TextAdded" VerticalAlignment="Center" />
                                                
                                                <Label Name="PART_ElemPlayTime" Content="{DynamicResource LOCTimePlayed}" />
                                                <TextBlock Name="PART_TextPlayTime" VerticalAlignment="Center" />

                                                <Label Name="PART_ElemLastPlayed" Content="{DynamicResource LOCLastPlayed}" />
                                                <TextBlock Name="PART_TextLastActivity" VerticalAlignment="Center" />

                                                <Label Name="PART_ElemCompletionStatus" Content="{DynamicResource LOCCompletionStatus}" />
                                                <Button Name="PART_ButtonCompletionStatus" VerticalAlignment="Center" />

                                                <Label Name="PART_ElemInstallDirectory" Content="{DynamicResource LOCGameInstallDirTitle}" />
                                                <Button Name="PART_ButtonInstallDirectory" VerticalAlignment="Center" />
                                                
                                                <Label Name="PART_ElemInstallSize" Content="{DynamicResource LOCInstallSizeLabel}" />
                                                <TextBlock Name="PART_TextInstallSize" VerticalAlignment="Center" />
                                                
                                                <Label Name="PART_ElemLibrary" Content="{DynamicResource LOCGameProviderTitle}" />
                                                <Button Name="PART_ButtonLibrary" VerticalAlignment="Center" />

                                                <Label Name="PART_ElemPlatform" Content="{DynamicResource LOCPlatformTitle}" />
                                                <ItemsControl Name="PART_ItemsPlatforms" />

                                                <Label Name="PART_ElemGenres" Content="{DynamicResource LOCGenreLabel}" />
                                                <ItemsControl Name="PART_ItemsGenres"  />

                                                <Label Name="PART_ElemDevelopers" Content="{DynamicResource LOCDeveloperLabel}" />
                                                <ItemsControl Name="PART_ItemsDevelopers" />

                                                <Label Name="PART_ElemPublishers" Content="{DynamicResource LOCPublisherLabel}" />
                                                <ItemsControl Name="PART_ItemsPublishers" />

                                                <Label Name="PART_ElemReleaseDate" Content="{DynamicResource LOCGameReleaseDateTitle}" />
                                                <Button Name="PART_ButtonReleaseDate" VerticalAlignment="Center" />

                                                <Label Name="PART_ElemCategories" Content="{DynamicResource LOCGameCategoriesTitle}" />
                                                <ItemsControl Name="PART_ItemsCategories" />

                                                <Label Name="PART_ElemFeatures" Content="{DynamicResource LOCFeaturesLabel}" />
                                                <ItemsControl Name="PART_ItemsFeatures" />

                                                <Label Name="PART_ElemTags" Content="{DynamicResource LOCTagsLabel}" />
                                                <ItemsControl Name="PART_ItemsTags" />

                                                <Label Name="PART_ElemAgeRating" Content="{DynamicResource LOCAgeRatingLabel}" />
                                                <ItemsControl Name="PART_ItemsAgeRatings" />

                                                <Label Name="PART_ElemSeries" Content="{DynamicResource LOCSeriesLabel}" />
                                                <ItemsControl Name="PART_ItemsSeries" />

                                                <Label Name="PART_ElemSource" Content="{DynamicResource LOCSourceLabel}" />
                                                <Button Name="PART_ButtonSource" VerticalAlignment="Center" />

                                                <Label Name="PART_ElemRegion" Content="{DynamicResource LOCRegionLabel}" />
                                                <ItemsControl Name="PART_ItemsRegions" />

                                                <Label Name="PART_ElemVersion" Content="{DynamicResource LOCVersionLabel}" />
                                                <Button Name="PART_ButtonVersion" VerticalAlignment="Center" />

                                                <Label Name="PART_ElemCommunityScore" Content="{DynamicResource LOCCommunityScore}" />
                                                <TextBlock Name="PART_TextCommunityScore" VerticalAlignment="Center"
                                                           Style="{DynamicResource TextBlockGameScore}" />

                                                <Label Name="PART_ElemCriticScore" Content="{DynamicResource LOCCriticScore}" />
                                                <TextBlock Name="PART_TextCriticScore" VerticalAlignment="Center"
                                                           Style="{DynamicResource TextBlockGameScore}" />

                                                <Label Name="PART_ElemUserScore" Content="{DynamicResource LOCUserScore}" />
                                                <TextBlock Name="PART_TextUserScore" VerticalAlignment="Center"
                                                           Style="{DynamicResource TextBlockGameScore}" />

                                                <Label Name="PART_ElemLinks" Content="{DynamicResource LOCLinksLabel}" />
                                                <ItemsControl Name="PART_ItemsLinks" />
                                            </GridEx>
                                        </StackPanel>
                                        
                                        <StackPanel Name="PART_ElemNotes" DockPanel.Dock="Top"
                                                    Margin="5,0,5,15">
                                            <TextBlock Text="{DynamicResource LOCNotesLabel}"
                                                       Style="{DynamicResource BaseTextBlockStyle}" />
                                            <Separator Background="{DynamicResource PanelSeparatorBrush}" Margin="0,5,0,5" />
                                            <TextBox Name="PART_TextNotes" IsReadOnly="True"
                                                     BorderThickness="0"
                                                     AcceptsReturn="True" TextWrapping="Wrap"
                                                     Margin="-1,0,-1,0" Padding="0"/>
                                        </StackPanel>

                                        <StackPanel Name="PART_ElemDescription" DockPanel.Dock="Top"
                                                    Margin="5,0,5,0">
                                            <TextBlock Text="{DynamicResource LOCGameDescriptionTitle}"
                                                       Style="{DynamicResource BaseTextBlockStyle}" />
                                            <Separator Background="{DynamicResource PanelSeparatorBrush}" Margin="0,5,0,5" />
                                            <HtmlTextView Name="PART_HtmlDescription"
                                                          HtmlFontSize="{DynamicResource FontSize}"
                                                          HtmlFontFamily="{DynamicResource FontFamily}"
                                                          HtmlForeground="{DynamicResource TextColor}"
                                                          LinkForeground="{DynamicResource GlyphColor}"                                      
                                                          ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                                                          ScrollViewer.VerticalScrollBarVisibility="Disabled"/>
                                        </StackPanel>
                                    </DockPanel>
                                </ScrollViewer>
                            </DockPanel>
                        </DockPanel>
                    </Border>                    
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>