<Page xmlns:local="clr-namespace:ForzaUI"
	  xmlns:System="clr-namespace:System;assembly=mscorlib"
      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"  
	  x:Class="ForzaUI.Scenes.Anthem.A_BenchmarkResults"
      mc:Ignorable="d"
	  Style="{DynamicResource A_Style_Page_Generic}"
      DataContext="{Binding Results, RelativeSource={RelativeSource Self}}"
      >

    <local:UIPageTransitionManager.TransitionManager>
        <local:UIPageTransitionManager Preset="{StaticResource A_UIPageTransitionManagerPreset_Menu}"/>
    </local:UIPageTransitionManager.TransitionManager>

    <Page.Resources>
        <Style x:Key="A_Style_FZMaterial_Graph_Bars" TargetType="local:FZMaterial">
            <Setter Property="Color" Value="{StaticResource A_Color_White}"/>
        </Style>

        <Style x:Key="A_Style_FZTextBlock_Axis_Key" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}">
            <Setter Property="Color" Value="{StaticResource A_Color_White}"/>
        </Style>

        <Color x:Key="A_Color_Green_CPU">#FF06F406</Color>
        <Color x:Key="A_Color_Blue_Render">#FF0062FF</Color>
        <Color x:Key="A_Color_Yello_GPU">#FFFFE600</Color>
        <Color x:Key="A_Color_Red_Flip">#FFCC2121</Color>
        <Color x:Key="A_Color_Orange_FPS">#FFFF5500</Color>
        <Color x:Key="A_Color_BenchmarkValid">#FF20CE20</Color>
        <Color x:Key="A_Color_BenchmarkInValid">#FFCC2121</Color>

        <Style x:Key="A_Style_FZMaterial_RowSeperator" TargetType="local:FZMaterial">
            <Setter Property="Height" Value="1.5"/>
            <Setter Property="Width" Value="Auto"/>
            <Setter Property="Margin" Value="7,0"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
            <Setter Property="Color" Value="#40FFFFFF"/>
        </Style>

        <Style x:Key="A_Style_FZTextBlock_Benchmark_StatsPanelHeaderTitle" TargetType="{x:Type local:FZTextBlock}" BasedOn="{StaticResource A_Style_FZTextBlock_HorizonC}">
            <Setter Property="Color" Value="White" />
            <Setter Property="HorizontalAlignment" Value="Left" />
            <Setter Property="VerticalAlignment" Value="Center" />
            <Setter Property="Margin" Value="12,12" />
            <Setter Property="FontSize" Value="22" />
        </Style>
        
        <Style x:Key="A_Style_FZTextBlock_Benchmark_StatsPanelResult" TargetType="{x:Type local:FZTextBlock}" BasedOn="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelHeaderTitle}">
            <Setter Property="HorizontalAlignment" Value="Center" />
        </Style>
        <Style x:Key="A_Style_FZTextBlock_Benchmark_StatsPanelTitle" TargetType="{x:Type local:FZTextBlock}" BasedOn="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelHeaderTitle}">
            <Setter Property="FontFamily" Value="Horizon_D" />
            <Setter Property="HorizontalAlignment" Value="Left" />
        </Style>
        <Style x:Key="A_Style_FZTextBlock_Benchmark_SystemTitle" TargetType="{x:Type local:FZTextBlock}" BasedOn="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelTitle}">
            <Setter Property="FontFamily" Value="Horizon_D" />
            <Setter Property="Margin" Value="12,0,12,6"/>
            <Setter Property="HorizontalAlignment" Value="Left" />
        </Style>
        <Style x:Key="A_Style_FZTextBlock_Benchmark_SystemInfo" TargetType="{x:Type local:FZTextBlock}" BasedOn="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelResult}">
            <Setter Property="HorizontalAlignment" Value="Left" />
            <Setter Property="Margin" Value="12,0"/>
        </Style>
        <Style x:Key="A_Style_FZTextBlock_Benchmark_SessionId" TargetType="{x:Type local:FZTextBlock}" BasedOn="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelResult}">
            <Setter Property="HorizontalAlignment" Value="Right" />
        </Style>
        <Style x:Key="A_Style_FZTextBlock_Benchmark_VideoSettingName" TargetType="{x:Type local:FZTextBlock}" BasedOn="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelTitle}">
            <Setter Property="FontFamily" Value="Horizon_D" />
            <Setter Property="Margin" Value="0,0,0,0"/>
            <Setter Property="HorizontalAlignment" Value="Left" />
        </Style>
        <Style x:Key="A_Style_FZTextBlock_Benchmark_VideoSettingValue" TargetType="{x:Type local:FZTextBlock}" BasedOn="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelResult}">
            <Setter Property="HorizontalAlignment" Value="Right" />
            <Setter Property="Margin" Value="0,0"/>
        </Style>
        <Style x:Key="A_Style_FZMaterial_Benchmark_Legend" TargetType="{x:Type local:FZMaterial}" BasedOn="{StaticResource A_Style_FZMaterial_FlatPanel_Tile}">
            <Setter Property="Margin" Value="8,10" />
            <Setter Property="Width" Value="30" />
            <Setter Property="Height" Value="30" />
        </Style>

        <ControlTemplate x:Key="A_Control_Template_BenchmarkStateBar">
            <local:FZMaterial x:Name="ColorPill" Style="{StaticResource A_Style_FZMaterial_GlassPanel_Pill}" Width="Auto" Height="Auto" Margin="0">
                <local:FZTextBlock x:Name="BenchmarkStateText" Text="{local:Loc Benchmark.IDS_BenchmarkValid}" CapHeight="12" HorizontalAlignment="Center" Style="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelHeaderTitle}"/>
            </local:FZMaterial>
            <ControlTemplate.Triggers>
                <DataTrigger Binding="{Binding IsBenchmarkValid}" Value="False">
                    <Setter TargetName="ColorPill" Property="Color" Value="{StaticResource A_Color_BenchmarkInValid}"/>
                    <Setter TargetName="BenchmarkStateText" Property="Text" Value="{local:Loc Benchmark.IDS_BenchmarkInValid}"/>
                </DataTrigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>

        <ControlTemplate x:Key="A_Template_CommonListBox_Vertical" TargetType="{x:Type local:CommonListBox}">
            <StackPanel Margin="0,16,0,0" Orientation="Vertical" IsItemsHost="True" Focusable="False"/>
        </ControlTemplate>
        <Style x:Key="A_Control_Template_ItemSeperator" TargetType="{x:Type ListBoxItem}">
            <Setter Property="Focusable" Value="False"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ListBoxItem}">
                        <StackPanel>
                            <local:FZMaterial x:Name="RowSeperator" Margin="6,10" Style="{StaticResource A_Style_FZMaterial_RowSeperator}" />
                            <ContentPresenter Margin="24,0" />
                        </StackPanel>
                        <ControlTemplate.Triggers>
                            <DataTrigger Binding="{Binding RelativeSource={RelativeSource PreviousData}}" Value="{x:Null}">
                                <Setter Property="Visibility" TargetName="RowSeperator" Value="Collapsed"/>
                            </DataTrigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <DataTemplate x:Key="A_Control_Template_VideoSettingItem">
            <Grid Margin="0,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="1*" />
                    <ColumnDefinition Width="200" />
                </Grid.ColumnDefinitions>
                <local:FZTextBlock Grid.Column="0" Text="{Binding Name}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_VideoSettingName}" FontSize="15"/>
                <local:FZTextBlock Grid.Column="1" Text="{Binding SelectedItem.Name}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_VideoSettingValue}" FontSize="15"/>
            </Grid>
        </DataTemplate>
    </Page.Resources>
    <Grid>
        <!-- Background Blur -->
       <Control Style="{StaticResource A_Style_Control_ScreenBackground}" />

        <!--local:PlayerBarControl x:Name="TopBar" Style="{StaticResource A_Style_PlayerBarControl}" /-->

        <ContentControl x:Name="BottomBar" Style="{StaticResource A_Style_ButtonBar}">
            <local:ControllerButtonPanel x:Name="HelpPanel"
                                        Style="{StaticResource A_Style_ControllerButtonPanel_Default}">
                <local:ControllerButtonControl Button="A"
                                            Description="{local:Loc HelpButtons.IDS_Continue}" />
                <local:ControllerButtonControl Button="B"
                                            Description="{local:Loc HelpButtons.IDS_VideoOptions}" />
                <local:ControllerButtonControl Button="Y"
                                            Description="{local:Loc HelpButtons.IDS_Restart}"/>
            </local:ControllerButtonPanel>
        </ContentControl>

        <Border Style="{StaticResource A_Style_Border_ScenePadding}"
            SnapsToDevicePixels="True"
            UseLayoutRounding="True" >
            <Grid x:Name="LayoutRoot" Margin="0,40,0,0">
                <DockPanel Name="BasicOptions" VerticalAlignment="Top" Width="1776" HorizontalAlignment="Center" Margin="0,0,0,40">
                    <StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_0}">
                        <ContentControl Tag="{local:Loc ScreenTitles.IDS_BenchmarkResults}" Content="{local:Loc ScreenTitles.IDS_BenchmarkResults}"
                                    local:BindingProxy.A="/ForzaUI;component/Textures/Anthem/Icons/Titles/Options.png" 
                                    Style="{StaticResource A_Style_ContentControl_ScreenTitleBlock}" 
                                    Focusable="False" />
                    </StackPanel>

                    <DockPanel DockPanel.Dock="Left" Width="1280" Margin="0,0,0,0">
                        <!--Status Bar -->
                        <Control DockPanel.Dock="Bottom" HorizontalAlignment="Stretch" Margin="0,0,4,0" Template="{StaticResource A_Control_Template_BenchmarkStateBar}" />

                        <!--Archieved FPS Performance Summary-->
                        <Grid Margin="0,8,0,8" DockPanel.Dock="Bottom" HorizontalAlignment="Left" Width="450">
                            <DockPanel HorizontalAlignment="Stretch" Height="200">
                                <local:FZMaterial DockPanel.Dock="Top" Style="{StaticResource A_Style_FZMaterial_FlatPanel_HeaderPanel}" Height="49">
                                    <local:FZTextBlock Text="{local:Loc Benchmark.IDS_PerformanceSummary}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelHeaderTitle}" HorizontalAlignment="Center"/>
                                </local:FZMaterial>
                                <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_GlassPanel_BodyPanel}">
                                    <Grid Margin="0,12,0,0">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="75*" />
                                            <ColumnDefinition Width="75*" />
                                        </Grid.ColumnDefinitions>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="50*" />
                                            <RowDefinition Height="2" />
                                            <RowDefinition Height="50*" />
                                        </Grid.RowDefinitions>
                                        <local:FZTextBlock Grid.Column="0" Grid.Row="0" Text="{local:Loc Benchmark.IDS_Target}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelHeaderTitle}" 
                                                           FontFamily="Horizon_D" HorizontalAlignment="Left" Margin="18"/>
                                        <local:FZTextBlock Grid.Column="1" Grid.Row="0" Text="{Binding TargetFPS.SelectedItem.Name}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelHeaderTitle}" 
                                                           CapHeight="25" HorizontalAlignment="Right" Margin="0,0,18,0" FontFamily="Horizon_A"/>

                                        <local:FZMaterial  Grid.ColumnSpan="2" Grid.Row="1" Style="{StaticResource A_Style_FZMaterial_RowSeperator}"/>

                                        <StackPanel Grid.Column="0" Grid.Row="2" Orientation="Horizontal" >
                                            <local:FZTextBlock Text="{local:Loc Benchmark.IDS_Achieved}" FontFamily="Horizon_D" Style="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelHeaderTitle}" 
                                                           HorizontalAlignment="Left" Margin="18"/>
                                            <local:FZMaterial Color="{StaticResource A_Color_Orange_FPS}" Style="{StaticResource A_Style_FZMaterial_Benchmark_Legend}" Margin="-2,9,8,11" />
                                        </StackPanel>
                                        <!--FPS String Creation - Offset margin to match up position -->
                                        <StackPanel  Grid.Column="1" Grid.Row="2" Margin="-12,0,18,0" HorizontalAlignment="Right" Orientation="Horizontal">
                                            <local:FZTextBlock Text="{Binding AverageFPS, Converter={StaticResource A_NumUnitConverter_NoUnit_0dp}}" CapHeight="25" FontFamily="Horizon_A" Style="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelHeaderTitle}" />
                                            <local:FZTextBlock Text="{local:Loc Benchmark.IDS_FPS}" Margin="-6,0,0,0" CapHeight="25" FontFamily="Horizon_A" Style="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelHeaderTitle}" />
                                        </StackPanel>
                                    </Grid>
                                </local:FZMaterial>
                            </DockPanel>
                        </Grid>

                        <!--System Stats -->
                        <DockPanel VerticalAlignment="Stretch" Width="450">
                            <local:FZMaterial DockPanel.Dock="Top" Style="{StaticResource A_Style_FZMaterial_FlatPanel_HeaderPanel}" Height="72">
                                <local:FZTextBlock Text="{local:Loc Benchmark.IDS_System}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelHeaderTitle}" FontFamily="Horizon_A" CapHeight="24" HorizontalAlignment="Center"/>
                            </local:FZMaterial>
                            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_GlassPanel_BodyPanel}">
                                <StackPanel Margin="12" VerticalAlignment="Center">
                                    <StackPanel Margin="0,0,0,16">
                                        <local:FZTextBlock Text="{local:Loc Benchmark.IDS_GameVersion}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_SystemTitle}"/>
                                        <local:FZTextBlock Text="{Binding GameBuildVersion}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_SystemInfo}"/>
                                    </StackPanel>
                                    <StackPanel Margin="0,0,0,16" Visibility="{Binding WindowsPlatformVersion, Converter={StaticResource A_StringVisConverter}}">
                                        <local:FZTextBlock Text="{local:Loc Benchmark.IDS_WindowsVersion}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_SystemTitle}"/>
                                        <local:FZTextBlock Text="{Binding WindowsPlatformVersion}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_SystemInfo}"/>
                                    </StackPanel>
                                    <StackPanel Margin="0,0,0,16">
                                        <local:FZTextBlock Text="{local:Loc Benchmark.IDS_DriverVersion}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_SystemTitle}"/>
                                        <local:FZTextBlock Text="{Binding GPUDriverVersion}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_SystemInfo}"/>
                                    </StackPanel>
                                    <StackPanel Margin="0,0,0,16">
                                        <local:FZTextBlock Text="{local:Loc Benchmark.IDS_GPUModel}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_SystemTitle}"/>
                                        <local:FZTextBlock Text="{Binding GPUName}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_SystemInfo}"/>
                                    </StackPanel>
                                    <StackPanel Margin="0,0,0,16">
                                        <local:FZTextBlock Text="{local:Loc Benchmark.IDS_CPUModel}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_SystemTitle}"/>
                                        <local:FZTextBlock Text="{Binding CPUName}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_SystemInfo}"/>
                                    </StackPanel>
                                    <StackPanel Margin="0,0,0,16">
                                        <local:FZTextBlock Text="{local:Loc Benchmark.IDS_VideoMemory}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_SystemTitle}"/>
                                        <local:FZTextBlock Text="{Binding VideoMemory}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_SystemInfo}"/>
                                    </StackPanel>
                                    <StackPanel Margin="0,0,0,16">
                                        <local:FZTextBlock Text="{local:Loc Benchmark.IDS_SystemMemory}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_SystemTitle}"/>
                                        <local:FZTextBlock Text="{Binding SystemMemory}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_SystemInfo}"/>
                                    </StackPanel>
                                    <StackPanel Margin="0,0,0,0">
                                        <local:FZTextBlock Text="{local:Loc Benchmark.IDS_Screen}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_SystemTitle}"/>
                                        <local:FZTextBlock Text="{Binding DisplayInformation}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_SystemInfo}"/>
                                    </StackPanel>
                                </StackPanel>
                            </local:FZMaterial>
                        </DockPanel>

                        <DockPanel DockPanel.Dock="Right" Width="820">
                            <!-- FPS Graph-->
                            <local:FZMaterial DockPanel.Dock="Top" Style="{StaticResource A_Style_FZMaterial_GlassPanel_Pill}" Height="350" >
                                <Grid Margin="20,30,30,30">
                                    <local:FZMaterial Height="2" VerticalAlignment="Bottom" Style="{StaticResource A_Style_FZMaterial_Graph_Bars}" Margin="42,0,0,0"/>
                                    <local:FZMaterial Width="2" HorizontalAlignment="Left" Style="{StaticResource A_Style_FZMaterial_Graph_Bars}" Margin="42,0,0,0"/>
                                    <local:FZTextBlock 
                                    Style="{StaticResource A_Style_FZTextBlock_Body_Minimum}" 
                                    Color="{StaticResource A_Color_White}"
                                    Width="35"
                                    Text="0"  
                                    Margin="0,-8,2,-12"
                                    Height="20"
                                    TextAlignment="Right"
                                    VerticalAlignment="Bottom"
                                    HorizontalAlignment="Left"
                                    AlignToCapAndBaseLines="True"/>

                                    <!-- draw the YAxis labels -->
                                    <Decorator HorizontalAlignment="Left" VerticalAlignment="Center" Margin="-8,0,0,0">
                                        <local:FZTextBlock Text="{local:Loc Benchmark.IDS_FPS}" Style="{StaticResource A_Style_FZTextBlock_Axis_Key}">
                                            <local:FZTextBlock.LayoutTransform>
                                                <RotateTransform Angle="-90"/>
                                            </local:FZTextBlock.LayoutTransform>
                                        </local:FZTextBlock>
                                    </Decorator>

                                    <ItemsControl ItemsSource="{Binding FPSGraph.YAxisLabels}" AlternationCount="2">
                                        <ItemsControl.ItemsPanel>
                                            <ItemsPanelTemplate>
                                                <Grid></Grid>
                                            </ItemsPanelTemplate>
                                        </ItemsControl.ItemsPanel>
                                        <ItemsControl.ItemContainerStyle>
                                            <Style TargetType="{x:Type ContentPresenter}">
                                                <Setter Property="VerticalAlignment" Value="Top" />
                                                <Setter Property="RenderTransform" >
                                                    <Setter.Value>
                                                        <TranslateTransform Y="{Binding Position}" />
                                                    </Setter.Value>
                                                </Setter>
                                            </Style>
                                        </ItemsControl.ItemContainerStyle>
                                        <ItemsControl.ItemTemplate>
                                            <DataTemplate>
                                                <DockPanel Height="0">
                                                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_Body_Minimum}" Color="{StaticResource A_Color_White}"
                                                DockPanel.Dock="Left" Width="35" Text="{Binding Value, Converter={StaticResource A_NumUnitConverter_NoUnit_0dp}}" 
                                                Margin="0,-6,8,-12" TextAlignment="Right" AlignToCapAndBaseLines="True"/>
                                                    <local:FZMaterial x:Name="AxisBar" Style="{StaticResource A_Style_FZMaterial_Graph_Bars}" Margin="0,-1,0,-1"/>
                                                </DockPanel>
                                                <DataTemplate.Triggers>
                                                    <Trigger Property="ItemsControl.AlternationIndex" Value="1">
                                                        <Setter Property="Opacity" Value="0.4" TargetName="AxisBar"/>
                                                    </Trigger>
                                                </DataTemplate.Triggers>
                                            </DataTemplate>
                                        </ItemsControl.ItemTemplate>
                                    </ItemsControl>
                                    <local:MapCustomRenderElement Margin="44,2,0,-1"
                                MapProfile="benchmark"
                                MapId="{Binding FPSGraph.MapId}" 
                                MapView="{Binding FPSGraph.MapView}"/>

                                    <!--X axis Label-->
                                    <local:FZTextBlock Text="{local:Loc Benchmark.IDS_Time}" HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="0,0,0,-21"
                                               Style="{StaticResource A_Style_FZTextBlock_Axis_Key}"/>
                                </Grid>
                            </local:FZMaterial>

                            <StackPanel DockPanel.Dock="Top">
                                <!-- FPS Table -->
                                <Grid HorizontalAlignment="Stretch" Margin="0,8,0,6">
                                    <DockPanel VerticalAlignment="Top"  Height="200">
                                        <local:FZMaterial DockPanel.Dock="Top" Style="{StaticResource A_Style_FZMaterial_FlatPanel_HeaderPanel}" Height="49"/>
                                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_GlassPanel_BodyPanel}"/>
                                    </DockPanel>
                                    <Grid>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="40" />
                                            <ColumnDefinition Width="200" />
                                            <ColumnDefinition Width="1*" />
                                            <ColumnDefinition Width="1*" />
                                            <ColumnDefinition Width="1*" />
                                        </Grid.ColumnDefinitions>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="49" />
                                            <RowDefinition Height="50" />
                                            <RowDefinition Height="2" />
                                            <RowDefinition Height="50" />
                                            <RowDefinition Height="2" />
                                            <RowDefinition Height="50" />
                                            <!--<RowDefinition Height="2" />
                                        -->
                                            <!-- presentation -->
                                            <!--
                                        <RowDefinition Height="50" />-->
                                        </Grid.RowDefinitions>

                                        <local:FZTextBlock Grid.Row="0" Grid.Column="2" Text="{local:Loc UserConfig.IDS_Benchmark_FPSAverage}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelResult}" />
                                        <local:FZTextBlock Grid.Row="0" Grid.Column="3"  Text="{local:Loc UserConfig.IDS_Benchmark_FPSMin}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelResult}" />
                                        <local:FZTextBlock Grid.Row="0" Grid.Column="4" Text="{local:Loc UserConfig.IDS_Benchmark_FPSMax}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelResult}" />

                                        <local:FZMaterial Grid.Row="1" Grid.Column="0" Color="{StaticResource A_Color_Green_CPU}" Style="{StaticResource A_Style_FZMaterial_Benchmark_Legend}" />
                                        <local:FZMaterial Grid.Row="3" Grid.Column="0" Color="{StaticResource A_Color_Blue_Render}" Style="{StaticResource A_Style_FZMaterial_Benchmark_Legend}" />
                                        <local:FZMaterial Grid.Row="5" Grid.Column="0" Color="{StaticResource A_Color_Yello_GPU}" Style="{StaticResource A_Style_FZMaterial_Benchmark_Legend}" />
                                        <!--<local:FZMaterial Grid.Row="7" Grid.Column="0" Color="{StaticResource A_Color_Red_Flip}" Style="{StaticResource A_Style_FZMaterial_Benchmark_Legend}" />-->

                                        <local:FZMaterial Grid.Row="2" Grid.ColumnSpan="5" Style="{StaticResource A_Style_FZMaterial_RowSeperator}"/>
                                        <local:FZMaterial Grid.Row="4" Grid.ColumnSpan="5" Style="{StaticResource A_Style_FZMaterial_RowSeperator}"/>
                                        <!--<local:FZMaterial Grid.Row="6" Grid.ColumnSpan="5" Style="{StaticResource A_Style_FZMaterial_RowSeperator}"/>-->

                                        <local:FZTextBlock Grid.Row="1" Grid.Column="1" Text="{local:Loc UserConfig.IDS_Benchmark_CPUSimulation}" FontFamily="Horizon_D" Style="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelTitle}" />
                                        <local:FZTextBlock Grid.Row="3" Grid.Column="1" Text="{local:Loc UserConfig.IDS_Benchmark_CPURender}" FontFamily="Horizon_D" Style="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelTitle}" />
                                        <local:FZTextBlock Grid.Row="5" Grid.Column="1" Text="{local:Loc UserConfig.IDS_Benchmark_GPU}" FontFamily="Horizon_D" Style="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelTitle}" />
                                        <!--<local:FZTextBlock Grid.Row="7" Grid.Column="1" Text="{local:Loc UserConfig.IDS_Benchmark_Presentation}" FontFamily="Horizon_D" Style="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelTitle}" />-->

                                        <local:FZTextBlock Grid.Row="1" Grid.Column="2" Text="{Binding AverageSim, Converter={StaticResource A_NumUnitConverter_NoUnit_1dp}}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelResult}" />
                                        <local:FZTextBlock Grid.Row="3" Grid.Column="2" Text="{Binding AverageRender, Converter={StaticResource A_NumUnitConverter_NoUnit_1dp}}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelResult}" />
                                        <local:FZTextBlock Grid.Row="5" Grid.Column="2" Text="{Binding AverageGPU, Converter={StaticResource A_NumUnitConverter_NoUnit_1dp}}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelResult}" />
                                        <!--<local:FZTextBlock Grid.Row="7" Grid.Column="2" Text="{Binding AverageFPS, Converter={StaticResource A_NumUnitConverter_NoUnit_1dp}}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelResult}" />-->

                                        <local:FZTextBlock Grid.Row="1" Grid.Column="3"  Text="{Binding MinSim, Converter={StaticResource A_NumUnitConverter_NoUnit_1dp}}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelResult}" />
                                        <local:FZTextBlock Grid.Row="3" Grid.Column="3" Text="{Binding MinRender, Converter={StaticResource A_NumUnitConverter_NoUnit_1dp}}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelResult}" />
                                        <local:FZTextBlock Grid.Row="5" Grid.Column="3"  Text="{Binding MinGPU, Converter={StaticResource A_NumUnitConverter_NoUnit_1dp}}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelResult}" />
                                        <!--<local:FZTextBlock Grid.Row="7" Grid.Column="3" Text="{Binding MinFPS, Converter={StaticResource A_NumUnitConverter_NoUnit_1dp}}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelResult}" />-->

                                        <local:FZTextBlock Grid.Row="1" Grid.Column="4" Text="{Binding MaxSim, Converter={StaticResource A_NumUnitConverter_NoUnit_1dp}}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelResult}" />
                                        <local:FZTextBlock Grid.Row="3" Grid.Column="4"  Text="{Binding MaxRender, Converter={StaticResource A_NumUnitConverter_NoUnit_1dp}}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelResult}" />
                                        <local:FZTextBlock Grid.Row="5" Grid.Column="4"  Text="{Binding MaxGPU, Converter={StaticResource A_NumUnitConverter_NoUnit_1dp}}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelResult}" />
                                        <!--<local:FZTextBlock Grid.Row="7" Grid.Column="4" Text="{Binding MaxFPS, Converter={StaticResource A_NumUnitConverter_NoUnit_1dp}}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelResult}" />-->
                                    </Grid>
                                </Grid>

                                <!--stutter Count stats. GPU Limited Percentage, Average Latency -->
                                <Grid Height="Auto" HorizontalAlignment="Stretch" >
                                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_GlassPanel_Pill}">
                                        <Grid VerticalAlignment="Center">
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="1*" />
                                                <ColumnDefinition Width="200" />
                                            </Grid.ColumnDefinitions>
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="50" />
                                                <RowDefinition Height="2" />
                                                <RowDefinition Height="50" />
                                                <RowDefinition Height="2" />
                                                <RowDefinition Height="50" />
                                            </Grid.RowDefinitions>
                                            <local:FZTextBlock Grid.Column="0" Grid.Row="0" Text="{local:Loc UserConfig.IDS_Benchmark_StutterFrames}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelTitle}" />
                                            <local:FZTextBlock Grid.Column="1" Grid.Row="0" Text="{Binding NumStutters, Converter={StaticResource A_NumUnitConverter_NoUnit_0dp}}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelResult}" />
                                            <local:FZMaterial  Grid.ColumnSpan="2" Grid.Row="1" Style="{StaticResource A_Style_FZMaterial_RowSeperator}"/>
                                            <local:FZTextBlock Grid.Column="0" Grid.Row="2" Text="{local:Loc UserConfig.IDS_Benchmark_PercentageGPULimited}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelTitle}" />
                                            <local:FZTextBlock Grid.Column="1" Grid.Row="2" Text="{Binding PercentGPUBound, Converter={StaticResource A_NumUnitConverter_NoUnit_1dp}}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelResult}" />
                                            <local:FZMaterial Grid.ColumnSpan="2" Grid.Row="3" Style="{StaticResource A_Style_FZMaterial_RowSeperator}"/>
                                            <local:FZTextBlock Grid.Column="0" Grid.Row="4" Text="{local:Loc UserConfig.IDS_Benchmark_AverageLatency}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelTitle}" />
                                            <local:FZTextBlock Grid.Column="1" Grid.Row="4" Text="{Binding AverageLatency, Converter={StaticResource A_NumUnitConverter_NoUnit_1dp}}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelResult}" />
                                        </Grid>
                                    </local:FZMaterial>
                                </Grid>
                            </StackPanel>
                        </DockPanel>
                    </DockPanel>

                    <DockPanel DockPanel.Dock="Right" Width="490" >
                        <Grid Height="0" DockPanel.Dock="Bottom" >
                            <local:FZTextBlock Text="{Binding SessionId}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_SessionId}" Margin="0,0,0,-24" FontSize="16" HorizontalAlignment="Right"/>
                        </Grid>
                        <local:FZMaterial DockPanel.Dock="Top" Style="{StaticResource A_Style_FZMaterial_FlatPanel_HeaderPanel}" Height="49">
                            <Grid>
                                <local:FZTextBlock Text="{local:Loc Benchmark.IDS_Setting}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_SystemTitle}" Margin="24,0" FontSize="16" HorizontalAlignment="Left"/>
                                <local:FZTextBlock Text="{Binding Preset.SelectedItem.Name}" Style="{StaticResource A_Style_FZTextBlock_Benchmark_SystemInfo}" Margin="24,0" FontSize="16" HorizontalAlignment="Right"/>
                            </Grid>
                        </local:FZMaterial>
                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_GlassPanel_BodyPanel}" ClipToBounds="False">
                            <local:CommonListBox ItemsSource="{Binding GraphicsOptions}" ScrollViewer.VerticalScrollBarVisibility="Disabled"
                                                ItemTemplate="{StaticResource A_Control_Template_VideoSettingItem}"
                                                Template="{StaticResource A_Template_CommonListBox_Vertical}"
                                                ItemContainerStyle="{StaticResource A_Control_Template_ItemSeperator}">
                            </local:CommonListBox>
                        </local:FZMaterial>
                    </DockPanel>
                </DockPanel>
            </Grid>
        </Border>
    </Grid>
</Page>
