<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>
        <GridLength x:Key="A_GridLength_Cell_Height">32</GridLength>
        <GridLength x:Key="A_GridLength_Spacer_Height">2</GridLength>

        <Style x:Key="A_Style_FZMaterial_GlassPanel" TargetType="local:FZMaterial">
            <Setter Property="Preset" Value="{StaticResource H_GlassRoundtangle_2px}"/>
            <Setter Property="Color" Value="{StaticResource H_Color_Glass_Purple_40pc}"/>
        </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>
                
        <ControlTemplate x:Key="A_Template_CommonListBox_Vertical" TargetType="{x:Type local:CommonListBox}">
            <StackPanel Margin="0,0,0,0" Orientation="Vertical" IsItemsHost="True" Focusable="False"/>
        </ControlTemplate>
        
        <Color x:Key="A_Graph_Bar_Color">#FFFFFF</Color>
        <Color x:Key="A_Color_Benchmark_CPUSimulation">#FFCAFF02</Color>
        <Color x:Key="A_Color_Benchmark_CPURender">#FF38E9FC</Color>
        <Color x:Key="A_Color_Benchmark_GPU">#FFF76F00</Color>
        <Color x:Key="A_Color_Benchmark_FPS">#FFFF0088</Color>
        <Color x:Key="A_Color_BenchmarkInValid">#FFFF1A46</Color>

        <Style x:Key="A_Style_FZMaterial_Benchmark_GraphBars" TargetType="local:FZMaterial">
            <Setter Property="Color" Value="{StaticResource A_Graph_Bar_Color}"/>
            <Setter Property="Opacity" Value="0.4"/>
        </Style>

        <Style x:Key="A_Style_FZRun_BenchmarkState_PlainText" TargetType="{x:Type local:FZRun}">
            <Setter Property="Color" Value="{StaticResource H_Color_Primary_White}"/>
            <Setter Property="CapHeight" Value="15"/>
        </Style>

        <MappingConverter x:Key="A_MappingConverter_PlainText" >
            <MappingConverterEntry Key="{NoCase TEXT}" Value="{StaticResource A_Style_FZRun_BenchmarkState_PlainText}"/>
        </MappingConverter>

        <ControlTemplate x:Key="A_Control_Template_BenchmarkStateText">
            <StackPanel Margin="16,10"
                        VerticalAlignment="Bottom">
                <FZTextBlock x:Name="BenchmarkStateTitle" 
                             Text="{Loc Benchmark.IDS_BenchmarkValid}"
                             CapHeight="24" 
                             HorizontalAlignment="Right" 
                             Color="{StaticResource H_Color_Primary_Yellow}"/>
                <FZTextBlock x:Name="BenchmarkStateText"
                             Text="{Loc Benchmark.IDS_BenchmarkInValid_Text}"
                             CapHeight="15"
                             Color="{StaticResource H_Color_Primary_White}"
                             HorizontalAlignment="Right"
                             Visibility="Collapsed"
                             Margin="0,10,0,0"/>
            </StackPanel>
            <ControlTemplate.Triggers>
                <DataTrigger Binding="{Binding IsBenchmarkValid}" Value="False">
                    <Setter TargetName="BenchmarkStateTitle" Property="Text" Value="{local:Loc Benchmark.IDS_BenchmarkInValid}"/>
                    <Setter TargetName="BenchmarkStateTitle" Property="Color" Value="{StaticResource A_Color_BenchmarkInValid}"/>
                    <Setter TargetName="BenchmarkStateText" Property="Visibility" Value="Visible"/>
                </DataTrigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>

        <Style x:Key="A_FZMaterial_Benchmark_Header_Background" TargetType="FZMaterial">
            <Setter Property="Color" Value="{StaticResource H_Color_Primary_Green}"/>
            <Setter Property="Height" Value="50"/>
            <Setter Property="Preset" Value="{StaticResource H_Roundtangle_Outer_2px}"/>
        </Style>

        <Style x:Key="A_FZTextBlock_Benchmark_Header" TargetType="{x:Type local:FZTextBlock}">
            <Setter Property="FontFamily" Value="Horizon_C"/>
            <Setter Property="CapHeight" Value="19"/>
            <Setter Property="HorizontalAlignment" Value="Center"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
            <Setter Property="Color" Value="{StaticResource H_Color_Primary_Black}"/>
        </Style>

        <Style x:Key="A_FZTextBlock_Benchmark_ContentBase" TargetType="{x:Type local:FZTextBlock}">
            <Setter Property="FontFamily" Value="Horizon_A"/> 
            <Setter Property="CapHeight" Value="15"/>
            <Setter Property="Margin" Value="16,0"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
            <Setter Property="Stretch" Value="None"/>
            <Setter Property="Color" Value="{StaticResource H_Color_Primary_White}"/>
        </Style>

        <AutoScrollSettings x:Key="H_AutoScrollSettings_Horizontal_Title_2" 
                            ScrollSeparation="50"
                            ScrollOrientation="Horizontal"
                            Speed="20"
                            InitialPause="0:0:0.75"
                            ApplyClip="True"/>

        <Style x:Key="A_FZTextBlock_Benchmark_ContentLabel" TargetType="{x:Type local:FZTextBlock}" 
            BasedOn="{StaticResource A_FZTextBlock_Benchmark_ContentBase}">
            <Setter Property="HorizontalAlignment" Value="Left"/>
            <Setter Property="FontFamily" Value="Horizon_B"/> 
            <Setter Property="AutoScroll.AllowScrolling" Value="True"/>
            <Setter Property="AutoScroll" Value="{StaticResource H_AutoScrollSettings_Horizontal_Title_2}"/>
        </Style>

        <Style x:Key="A_FZTextBlock_Benchmark_ContentData" TargetType="{x:Type local:FZTextBlock}" 
            BasedOn="{StaticResource A_FZTextBlock_Benchmark_ContentBase}">
            <Setter Property="Color" Value="{StaticResource H_Color_Primary_White}"/>
            <Setter Property="HorizontalAlignment" Value="Right"/>
        </Style>

        <Style x:Key="A_FZTextBlock_Benchmark_GraphAxisLabel" TargetType="{x:Type local:FZTextBlock}" 
            BasedOn="{StaticResource A_Style_FZTextBlock_Body_Minimum}">
            <Setter Property="FontFamily" Value="Horizon_B"/>
            <Setter Property="Color" Value="{StaticResource H_Color_Primary_White}"/>
            <Setter Property="Stretch" Value="None"/>
            <Setter Property="HorizontalAlignment" Value="Center"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
        </Style>

        <Style x:Key="A_FZTextBlock_Benchmark_GraphDataLabel" TargetType="FZTextBlock"
            BasedOn="{StaticResource A_FZTextBlock_Benchmark_GraphAxisLabel}">
            <Setter Property="FontFamily" Value="Horizon_A"/>
        </Style>

        <Style x:Key="A_FZTextBlock_Benchmark_GraphAxisValues" TargetType="{x:Type local:FZTextBlock}" 
            BasedOn="{StaticResource A_FZTextBlock_Benchmark_ContentLabel}">
            <Setter Property="HorizontalAlignment" Value="Center"/>
        </Style>

        <Style x:Key="A_FZTextBlock_Benchmark_GraphDataContent" TargetType="{x:Type local:FZTextBlock}" 
            BasedOn="{StaticResource A_FZTextBlock_Benchmark_ContentData}">
            <Setter Property="HorizontalAlignment" Value="Center"/>
        </Style>

        <Style x:Key="A_Control_Template_VisualSettingItemSeperator" 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="16,0"
                                              Height="2"
                                              Style="{StaticResource H_Style_Divider_ListOption}" 
                                              Visibility="Visible"/>
                            <ContentPresenter Margin="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>
        
        <Style x:Key="A_Style_FZRun_SUPERSCRIPT" TargetType="local:FZRun">
            <Setter Property="SubscriptScale" Value="-0.75" />
        </Style>
        <MappingConverter x:Key="A_MappingConverter_VisualSettingItem">
            <MappingConverterEntry Key="{NoCase SUPERSCRIPT}" Value="{StaticResource A_Style_FZRun_SUPERSCRIPT}"/>
        </MappingConverter>

        <DataTemplate x:Key="A_Control_Template_VisualSettingItem">
            <DockPanel Margin="0"
                       Height="33">
                <local:FZTextBlock DockPanel.Dock="Right" 
                                   Text="{Binding SelectedItem.Name}" 
                                   Style="{StaticResource A_FZTextBlock_Benchmark_ContentData}"/>
                <local:FZTextBlock DockPanel.Dock="Left"
                                   MarkupConverter="{StaticResource A_MappingConverter_VisualSettingItem}" 
                                   Text="{Binding Name}" 
                                   Style="{StaticResource A_FZTextBlock_Benchmark_ContentLabel}"/>
            </DockPanel>

        </DataTemplate>
    </Page.Resources>
    
    <Grid>
        <!-- Background Blur -->
        <Control Style="{StaticResource A_Style_Control_ScreenBackground}" />
        <ContentControl x:Name="BottomBar" Style="{StaticResource A_Style_ButtonBar}">
            <local:ControllerButtonPanel x:Name="PART_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_TiledScene}"
            SnapsToDevicePixels="True"
            UseLayoutRounding="True"
            Padding="80,76,80,135">
            <Grid x:Name="PART_LayoutRoot" VerticalAlignment="Center">

                <DockPanel Height="870">
                    <StackPanel x:Name="TitleBar" 
                                DockPanel.Dock="Top" 
                                Orientation="Horizontal" 
                                Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_0}"
                                Margin="0,0,0,20">
                        <ContentControl Tag="{local:Loc ScreenTitles.IDS_BenchmarkResults}" 
                                        Content="{local:Loc ScreenTitles.IDS_BenchmarkResults}"
                                        Style="{StaticResource A_Style_ContentControl_ScreenTitleBlock}" 
                                        Focusable="False" 
                                        Margin="0"
                                        MinWidth="439"/>
                        <local:FZMaterial Height="50" 
                                          Margin="4,0,0,0"
                                          Style="{StaticResource A_Style_FZMaterial_GlassPanel}"
                                          Color="{StaticResource H_Color_Glass_Purple_20pc}"
                                          MaxWidth="1318">
                            <local:FZTextBlock Text="{Binding SessionId}"
                                               Style="{StaticResource A_FZTextBlock_Benchmark_Header}"
                                               FontFamily="Horizon_A"
                                               CapHeight="20"
                                               Color="{StaticResource H_Color_Primary_White}"
                                               Margin="20,0,20,0"/>
                        </local:FZMaterial>
                    </StackPanel>

                    <Grid x:Name="Content" DockPanel.Dock="Bottom">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>

                        <DockPanel x:Name="SystemSettings" 
                                   Grid.Column="0">
                            <local:FZMaterial DockPanel.Dock="Top" 
                                              Style="{StaticResource A_FZMaterial_Benchmark_Header_Background}"
                                              Margin="0,0,2,2">
                                <local:FZTextBlock Text="{local:Loc Benchmark.IDS_SystemConfiguration}" 
                                                   Style="{StaticResource A_FZTextBlock_Benchmark_Header}"/>
                            </local:FZMaterial>

                            <Grid x:Name="SystemConfiguration" DockPanel.Dock="Top">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="*"/>
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="118"/>
                                    <RowDefinition Height="75"/>
                                </Grid.RowDefinitions>
                                <local:FZMaterial x:Name="SystemConfigLeft" 
                                                  Style="{StaticResource A_Style_FZMaterial_GlassPanel}"
                                                  Grid.Column="0"
                                                  Grid.Row="0"
                                                  Margin="0,2,2,2">
                                    <Grid VerticalAlignment="Center">
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="{StaticResource A_GridLength_Cell_Height}"/>
                                            <RowDefinition Height="{StaticResource A_GridLength_Spacer_Height}"/>
                                            <RowDefinition Height="{StaticResource A_GridLength_Cell_Height}"/>
                                            <RowDefinition Height="{StaticResource A_GridLength_Spacer_Height}"/>
                                            <RowDefinition Height="{StaticResource A_GridLength_Cell_Height}"/>
                                        </Grid.RowDefinitions>

                                        <DockPanel Grid.Row="0">
                                            <local:FZTextBlock DockPanel.Dock="Right" Text="{Binding GameBuildVersion}" Style="{StaticResource A_FZTextBlock_Benchmark_ContentData}"/>
                                            <local:FZTextBlock DockPanel.Dock="Left" Text="{Loc Benchmark.IDS_GameVersion}" Style="{StaticResource A_FZTextBlock_Benchmark_ContentLabel}"/>
                                        </DockPanel>

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

                                        <DockPanel Grid.Row="2">
                                            <local:FZTextBlock DockPanel.Dock="Right" Text="{Binding GPUDriverVersion}" Style="{StaticResource A_FZTextBlock_Benchmark_ContentData}"/>
                                            <local:FZTextBlock DockPanel.Dock="Left" Text="{Loc Benchmark.IDS_DriverVersion}" Style="{StaticResource A_FZTextBlock_Benchmark_ContentLabel}"/>
                                        </DockPanel>

                                        <local:FZMaterial Grid.Row="3" Style="{StaticResource H_Style_Divider_ListOption}"/>

                                        <DockPanel Grid.Row="4">
                                            <local:FZTextBlock DockPanel.Dock="Right" Text="{Binding WindowsPlatformVersion}" Style="{StaticResource A_FZTextBlock_Benchmark_ContentData}"/>
                                            <local:FZTextBlock DockPanel.Dock="Left" Text="{Loc Benchmark.IDS_WindowsVersion}" Style="{StaticResource A_FZTextBlock_Benchmark_ContentLabel}"/>
                                        </DockPanel>

                                    </Grid>
                                </local:FZMaterial>
                                <local:FZMaterial x:Name="SystemConfigRight" 
                                                  Style="{StaticResource A_Style_FZMaterial_GlassPanel}"
                                                  Grid.Column="1"
                                                  Grid.Row="0"
                                                  Margin="2,2,2,2">
                                    <Grid VerticalAlignment="Center">
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="{StaticResource A_GridLength_Cell_Height}"/>
                                            <RowDefinition Height="{StaticResource A_GridLength_Spacer_Height}"/>
                                            <RowDefinition Height="{StaticResource A_GridLength_Cell_Height}"/>
                                            <RowDefinition Height="{StaticResource A_GridLength_Spacer_Height}"/>
                                            <RowDefinition Height="{StaticResource A_GridLength_Cell_Height}"/>
                                        </Grid.RowDefinitions>

                                        <DockPanel Grid.Row="0">
                                            <local:FZTextBlock DockPanel.Dock="Right" Text="{Binding DisplayInformation}" Style="{StaticResource A_FZTextBlock_Benchmark_ContentData}"/>
                                            <local:FZTextBlock DockPanel.Dock="Left" Text="{Loc Benchmark.IDS_Screen}" Style="{StaticResource A_FZTextBlock_Benchmark_ContentLabel}"/>
                                        </DockPanel>

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

                                        <DockPanel Grid.Row="2">
                                            <local:FZTextBlock DockPanel.Dock="Right" Text="{Binding VideoMemory}" Style="{StaticResource A_FZTextBlock_Benchmark_ContentData}"/>
                                            <local:FZTextBlock DockPanel.Dock="Left" Text="{Loc Benchmark.IDS_VideoMemory}" Style="{StaticResource A_FZTextBlock_Benchmark_ContentLabel}"/>
                                        </DockPanel>

                                        <local:FZMaterial Grid.Row="3" Style="{StaticResource H_Style_Divider_ListOption}"/>

                                        <DockPanel Grid.Row="4">
                                            <local:FZTextBlock DockPanel.Dock="Right" Text="{Binding SystemMemory}" Style="{StaticResource A_FZTextBlock_Benchmark_ContentData}"/>
                                            <local:FZTextBlock DockPanel.Dock="Left" Text="{Loc Benchmark.IDS_SystemMemory}" Style="{StaticResource A_FZTextBlock_Benchmark_ContentLabel}"/>
                                        </DockPanel>
                                    </Grid>
                                </local:FZMaterial>
                                <local:FZMaterial x:Name="SystemConfigBottom" 
                                                  Style="{StaticResource A_Style_FZMaterial_GlassPanel}"
                                                  Grid.ColumnSpan="2"
                                                  Grid.Row="1"
                                                  Margin="0,2,2,2">
                                    <Grid VerticalAlignment="Center">
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="{StaticResource A_GridLength_Cell_Height}"/>
                                            <RowDefinition Height="{StaticResource A_GridLength_Spacer_Height}"/>
                                            <RowDefinition Height="{StaticResource A_GridLength_Cell_Height}"/>
                                        </Grid.RowDefinitions>
                                        <DockPanel Grid.Row="0">
                                            <local:FZTextBlock DockPanel.Dock="Right" Text="{Binding GPUName}" Style="{StaticResource A_FZTextBlock_Benchmark_ContentData}"/>
                                            <local:FZTextBlock DockPanel.Dock="Left" Text="{Loc Benchmark.IDS_GPUModel}" Style="{StaticResource A_FZTextBlock_Benchmark_ContentLabel}"/>
                                        </DockPanel>

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

                                        <DockPanel Grid.Row="2">
                                            <local:FZTextBlock DockPanel.Dock="Right" Text="{Binding CPUName}" Style="{StaticResource A_FZTextBlock_Benchmark_ContentData}"/>
                                            <local:FZTextBlock DockPanel.Dock="Left" Text="{Loc Benchmark.IDS_CPUModel}" Style="{StaticResource A_FZTextBlock_Benchmark_ContentLabel}"/>
                                        </DockPanel>
                                    </Grid>
                                </local:FZMaterial>
                            </Grid>

                            <local:FZMaterial DockPanel.Dock="Top"
                                              Style="{StaticResource A_FZMaterial_Benchmark_Header_Background}"
                                              Margin="0,2,2,2">
                                <local:FZTextBlock Text="{local:Loc Benchmark.IDS_VisualSettings }" 
                                                   Style="{StaticResource A_FZTextBlock_Benchmark_Header}"/>
                            </local:FZMaterial>

                            <Grid x:Name="VisualSettings" DockPanel.Dock="Top">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="*"/>
                                </Grid.ColumnDefinitions>

                                <local:FZMaterial x:Name="VisualSettingsLeft" 
                                                  Style="{StaticResource A_Style_FZMaterial_GlassPanel}"
                                                  Grid.Column="0"
                                                  Margin="0,2,2,0">
                                    <Grid Margin="0,8">
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="{StaticResource A_GridLength_Cell_Height}"/>
                                            <RowDefinition Height="{StaticResource A_GridLength_Spacer_Height}"/>
                                            <RowDefinition Height="{StaticResource A_GridLength_Cell_Height}"/>
                                            <RowDefinition Height="{StaticResource A_GridLength_Spacer_Height}"/>
                                            <RowDefinition Height="*"/>
                                        </Grid.RowDefinitions>

                                        <DockPanel Grid.Row="0">
                                            <local:FZTextBlock DockPanel.Dock="Right" Text="{Binding SuggestedPreset}" Style="{StaticResource A_FZTextBlock_Benchmark_ContentData}" Color="{StaticResource H_Color_Primary_Yellow}"/>
                                            <local:FZTextBlock DockPanel.Dock="Left" Text="{Loc Benchmark.IDS_SuggestedPreset}" Style="{StaticResource A_FZTextBlock_Benchmark_ContentLabel}" Color="{StaticResource H_Color_Primary_Yellow}"/>
                                        </DockPanel>

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

                                        <DockPanel Grid.Row="2"> 
                                            <local:FZTextBlock DockPanel.Dock="Right" Text="{Binding Preset.SelectedItem.Name}" Style="{StaticResource A_FZTextBlock_Benchmark_ContentData}" Color="{StaticResource H_Color_Primary_Yellow}"/>
                                            <local:FZTextBlock DockPanel.Dock="Left" Text="{Loc Benchmark.IDS_CurrentPreset}" Style="{StaticResource A_FZTextBlock_Benchmark_ContentLabel}" Color="{StaticResource H_Color_Primary_Yellow}"/>
                                        </DockPanel>

                                        <local:FZMaterial Grid.Row="3" Style="{StaticResource H_Style_Divider_ListOption}"/>

                                        <local:CommonListBox Grid.Row="4"
                                                             ItemsSource="{Binding GraphicsOptionsLeft}" 
                                                             ScrollViewer.VerticalScrollBarVisibility="Disabled"
                                                             ItemTemplate="{StaticResource A_Control_Template_VisualSettingItem}"
                                                             Template="{StaticResource A_Template_CommonListBox_Vertical}"
                                                             ItemContainerStyle="{StaticResource A_Control_Template_VisualSettingItemSeperator}">
                                        </local:CommonListBox>
                                    </Grid>

                                </local:FZMaterial>

                                <local:FZMaterial x:Name="VisualSettingsRight" 
                                                  Style="{StaticResource A_Style_FZMaterial_GlassPanel}"
                                                  Grid.Column="1"
                                                  Margin="2,2,2,0">
                                    <local:CommonListBox ItemsSource="{Binding GraphicsOptionsRight}" 
                                                         ScrollViewer.VerticalScrollBarVisibility="Disabled"
                                                         ItemTemplate="{StaticResource A_Control_Template_VisualSettingItem}"
                                                         Template="{StaticResource A_Template_CommonListBox_Vertical}"
                                                         ItemContainerStyle="{StaticResource A_Control_Template_VisualSettingItemSeperator}"
                                                         Margin="0,8"/>

                                </local:FZMaterial>
                            </Grid>
                        </DockPanel>

                        <DockPanel Grid.Column="1"
                                    x:Name="PerformanceSummary">

                            <local:FZMaterial DockPanel.Dock="Top"
                                              Style="{StaticResource A_FZMaterial_Benchmark_Header_Background}"
                                              Margin="2,0,0,2">
                                <local:FZTextBlock Text="{local:Loc Benchmark.IDS_PerformanceSummary}" 
                                                   Style="{StaticResource A_FZTextBlock_Benchmark_Header}"/>
                            </local:FZMaterial>

                            <Grid DockPanel.Dock="Bottom">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="562"/>
                                    <RowDefinition Height="*"/>
                                </Grid.RowDefinitions>
                                <local:FZMaterial x:Name="GraphArea" 
                                                  Style="{StaticResource A_Style_FZMaterial_GlassPanel}"
                                                  Grid.Row="0"
                                                  Margin="2,2,0,2">
                                    <DockPanel>

                                        <!-- FPS Graph-->
                                        <local:FZMaterial DockPanel.Dock="Top" 
                                                          Color="Transparent" 
                                                          Height="365">
                                            <DockPanel Margin="0,30,0,0">
                                                <!-- Graph Title -->
                                                <Decorator HorizontalAlignment="Center" 
                                                        VerticalAlignment="Top" 
                                                        DockPanel.Dock="Top">
                                                    <FZTextBlock Text="{Loc Benchmark.IDS_BenchmarkGraphTitle}" 
                                                                    Style="{StaticResource A_FZTextBlock_Benchmark_ContentLabel}"
                                                                    HorizontalAlignment="Center"
                                                                    FontFamily="Horizon_A"
                                                                    CapHeight="17"/>
                                                </Decorator>
                                                <!-- Y axis label -->
                                                <Decorator HorizontalAlignment="Left" 
                                                           VerticalAlignment="Center" 
                                                           DockPanel.Dock="Left">
                                                    <FZTextBlock Text="{local:Loc Benchmark.IDS_FPS}" 
                                                                 FontFamily="Horizon_A"
                                                                 CapHeight="17"
                                                                 Style="{StaticResource A_FZTextBlock_Benchmark_ContentLabel}"/>
                                                </Decorator>
                                                <!--X axis Label-->
                                                <Decorator HorizontalAlignment="Center" 
                                                           VerticalAlignment="Bottom"
                                                           DockPanel.Dock="Bottom"
                                                           Margin="0,10,0,0">
                                                    <FZTextBlock Text="{local:Loc Benchmark.IDS_Time}" 
                                                                 FontFamily="Horizon_A"
                                                                 CapHeight="17"
                                                                 Style="{StaticResource A_FZTextBlock_Benchmark_ContentLabel}"/>
                                                </Decorator>
                                                <Grid Margin="0,30,35,30">
                                                    <local:FZMaterial Height="1"
                                                                      VerticalAlignment="Bottom" 
                                                                      Style="{StaticResource A_Style_FZMaterial_Benchmark_GraphBars}" 
                                                                      Margin="43,0,0,0"
                                                                      Opacity="1"/>
                                                    <local:FZMaterial Width="1"
                                                                      HorizontalAlignment="Left" 
                                                                      Style="{StaticResource A_Style_FZMaterial_Benchmark_GraphBars}" 
                                                                      Margin="43,0,0,0"
                                                                      Opacity="1"/>
                                                                    
                                                    <local:FZTextBlock Style="{StaticResource A_FZTextBlock_Benchmark_GraphAxisLabel}" 
                                                                       Text="0"  
                                                                       Margin="22,0,0,-19"
                                                                       TextAlignment="Right"
                                                                       VerticalAlignment="Bottom"
                                                                       HorizontalAlignment="Left"
                                                                       AlignToCapAndBaseLines="True"/>

                                                    <!-- draw the YAxis labels -->
                                                    <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">
                                                                    <FZTextBlock x:Name="AxisName"
                                                                                 Style="{StaticResource A_FZTextBlock_Benchmark_GraphAxisLabel}" 
                                                                                 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_Benchmark_GraphBars}" 
                                                                                    Height="1"/>
                                                                </DockPanel>
                                                                <DataTemplate.Triggers>
                                                                    <DataTrigger Binding="{Binding Value}" Value="0">
                                                                        <Setter Property="Opacity" Value="0.0" TargetName="AxisName"/>
                                                                    </DataTrigger>
                                                                </DataTemplate.Triggers>
                                                            </DataTemplate>
                                                        </ItemsControl.ItemTemplate>
                                                    </ItemsControl>

                                                    <ItemsControl ItemsSource="{Binding FPSGraph.XAxisLabels}" AlternationCount="2" Margin="43,0,0,0">
                                                        <ItemsControl.ItemsPanel>
                                                            <ItemsPanelTemplate>
                                                                <DockPanel LastChildFill="False"></DockPanel>
                                                            </ItemsPanelTemplate>
                                                        </ItemsControl.ItemsPanel>
                                                        <ItemsControl.ItemContainerStyle>
                                                            <Style TargetType="{x:Type ContentPresenter}">
                                                                <Setter Property="VerticalAlignment" Value="Top" />
                                                                <Setter Property="RenderTransform" >
                                                                    <Setter.Value>
                                                                        <TransformGroup>
                                                                            <TranslateTransform X="{Binding Position}" />
                                                                        </TransformGroup>
                                                                    </Setter.Value>
                                                                </Setter>
                                                            </Style>
                                                        </ItemsControl.ItemContainerStyle>
                                                        <ItemsControl.ItemTemplate>
                                                            <DataTemplate>
                                                                <DockPanel Width="0" 
                                                                           Height="250">
                                                                    <FZTextBlock x:Name="AxisName"
                                                                                 Style="{StaticResource A_FZTextBlock_Benchmark_GraphAxisLabel}" 
                                                                                 DockPanel.Dock="Bottom"  
                                                                                 Margin="0,6,0,0"
                                                                                 Text="{Binding Value, Converter={StaticResource A_NumUnitConverter_NoUnit_0dp}}" 
                                                                                 TextAlignment="Center"
                                                                                 HorizontalAlignment="Center" 
                                                                                 AlignToCapAndBaseLines="True"/>
                                                                    <local:FZMaterial x:Name="AxisBar" 
                                                                                      Width="1"
                                                                                      Style="{StaticResource A_Style_FZMaterial_Benchmark_GraphBars}"/>
                                                                </DockPanel>
                                                                <DataTemplate.Triggers>
                                                                    <DataTrigger Binding="{Binding Value}" Value="0">
                                                                        <Setter Property="Opacity" Value="0.0" TargetName="AxisName"/>
                                                                    </DataTrigger>
                                                                </DataTemplate.Triggers>
                                                            </DataTemplate>
                                                        </ItemsControl.ItemTemplate>
                                                    </ItemsControl>

                                                    <local:MapCustomRenderElement Margin="42,2,2,-1"
                                                                                MapProfile="benchmark"
                                                                                MapId="{Binding FPSGraph.MapId}" 
                                                                                MapView="{Binding FPSGraph.MapView}"/>
                                                </Grid>
                                            </DockPanel>
                                        </local:FZMaterial>

                                        <!-- FPS Table -->
                                        <Grid x:Name="GraphData" 
                                                VerticalAlignment="Bottom"
                                                Margin="16,0,16,16">
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="240" />
                                                <ColumnDefinition Width="1*" />
                                                <ColumnDefinition Width="1*" />
                                                <ColumnDefinition Width="1*" />
                                            </Grid.ColumnDefinitions>
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="2" />
                                                <RowDefinition Height="32" />
                                                <RowDefinition Height="2" />
                                                <RowDefinition Height="32" />
                                                <RowDefinition Height="2" />
                                                <RowDefinition Height="32" />
                                                <RowDefinition Height="2" />
                                                <RowDefinition Height="32" />
                                            </Grid.RowDefinitions>

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

                                            <!-- Column Titles -->
                                            <local:FZTextBlock Grid.Row="1" Grid.Column="1" Text="{local:Loc UserConfig.IDS_Benchmark_FPSAverage}" Style="{StaticResource A_FZTextBlock_Benchmark_GraphDataLabel}" />
                                            <local:FZTextBlock Grid.Row="1" Grid.Column="2" Text="{local:Loc UserConfig.IDS_Benchmark_FPSMax}" Style="{StaticResource A_FZTextBlock_Benchmark_GraphDataLabel}" />
                                            <local:FZTextBlock Grid.Row="1" Grid.Column="3"  Text="{local:Loc UserConfig.IDS_Benchmark_FPSMin}" Style="{StaticResource A_FZTextBlock_Benchmark_GraphDataLabel}" />
                                            
                                            <local:FZMaterial Grid.Row="1" Grid.Column="0" Color="{StaticResource A_Color_Benchmark_FPS}" Margin="0,2" HorizontalAlignment="Left">
                                                <local:FZTextBlock Text="{local:Loc UserConfig.IDS_Benchmark_FPSAverage}" 
                                                                    Style="{StaticResource A_FZTextBlock_Benchmark_ContentLabel}" 
                                                                    Color="{StaticResource H_Color_Primary_White}"
                                                                    FontFamily="Horizon_A"
                                                                    Margin="8,0"/>
                                            </local:FZMaterial>

                                            <local:FZMaterial Grid.Row="3" Grid.Column="0" Color="{StaticResource A_Color_Benchmark_CPUSimulation}" Margin="0,2" HorizontalAlignment="Left">
                                                <local:FZTextBlock Text="{local:Loc UserConfig.IDS_Benchmark_CPUSimulation}" 
                                                                    Style="{StaticResource A_FZTextBlock_Benchmark_ContentLabel}" 
                                                                    Color="{StaticResource H_Color_Primary_Black}" 
                                                                    FontFamily="Horizon_A"
                                                                    Margin="8,0"/>
                                            </local:FZMaterial>
                                            <local:FZMaterial Grid.Row="5" Grid.Column="0" Color="{StaticResource A_Color_Benchmark_CPURender}" Margin="0,2" HorizontalAlignment="Left">
                                                <local:FZTextBlock Text="{local:Loc UserConfig.IDS_Benchmark_CPURender}" 
                                                                    Style="{StaticResource A_FZTextBlock_Benchmark_ContentLabel}" 
                                                                    Color="{StaticResource H_Color_Primary_Black}"
                                                                    FontFamily="Horizon_A"
                                                                    Margin="8,0"/>
                                            </local:FZMaterial>
                                            <local:FZMaterial Grid.Row="7" Grid.Column="0" Color="{StaticResource A_Color_Benchmark_GPU}" Margin="0,2" HorizontalAlignment="Left">
                                                <local:FZTextBlock Text="{local:Loc UserConfig.IDS_Benchmark_GPU}" 
                                                                    Style="{StaticResource A_FZTextBlock_Benchmark_ContentLabel}" 
                                                                    Color="{StaticResource H_Color_Primary_White}"
                                                                    FontFamily="Horizon_A"
                                                                    Margin="8,0"/>
                                            </local:FZMaterial>

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

                                            <local:FZTextBlock Grid.Row="3" Grid.Column="2" Text="{Binding MaxSim, Converter={StaticResource A_NumUnitConverter_NoUnit_1dp}}" Style="{StaticResource A_FZTextBlock_Benchmark_GraphDataContent}" />
                                            <local:FZTextBlock Grid.Row="5" Grid.Column="2"  Text="{Binding MaxRender, Converter={StaticResource A_NumUnitConverter_NoUnit_1dp}}" Style="{StaticResource A_FZTextBlock_Benchmark_GraphDataContent}" />
                                            <local:FZTextBlock Grid.Row="7" Grid.Column="2"  Text="{Binding MaxGPU, Converter={StaticResource A_NumUnitConverter_NoUnit_1dp}}" Style="{StaticResource A_FZTextBlock_Benchmark_GraphDataContent}" />
                                            
                                            <local:FZTextBlock Grid.Row="3" Grid.Column="3"  Text="{Binding MinSim, Converter={StaticResource A_NumUnitConverter_NoUnit_1dp}}" Style="{StaticResource A_FZTextBlock_Benchmark_GraphDataContent}" />
                                            <local:FZTextBlock Grid.Row="5" Grid.Column="3" Text="{Binding MinRender, Converter={StaticResource A_NumUnitConverter_NoUnit_1dp}}" Style="{StaticResource A_FZTextBlock_Benchmark_GraphDataContent}" />
                                            <local:FZTextBlock Grid.Row="7" Grid.Column="3"  Text="{Binding MinGPU, Converter={StaticResource A_NumUnitConverter_NoUnit_1dp}}" Style="{StaticResource A_FZTextBlock_Benchmark_GraphDataContent}" />

                                        </Grid>
                                    </DockPanel>

                                </local:FZMaterial>
                                <DockPanel Grid.Row="1">
                                    <local:FZMaterial x:Name="DisplayDetails" 
                                                      DockPanel.Dock="Left" 
                                                      Style="{StaticResource A_Style_FZMaterial_GlassPanel}"
                                                      Grid.Column="0"
                                                      Margin="2,2,2,0"
                                                      Width="658">
                                        <DockPanel>
                                            <Grid Margin="0,8"
                                                  DockPanel.Dock="Top">
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="1*" />
                                                    <ColumnDefinition Width="200" />
                                                </Grid.ColumnDefinitions>
                                                <Grid.RowDefinitions>
                                                    <RowDefinition Height="{StaticResource A_GridLength_Cell_Height}" />
                                                    <RowDefinition Height="{StaticResource A_GridLength_Spacer_Height}" />
                                                    <RowDefinition Height="{StaticResource A_GridLength_Cell_Height}" />
                                                    <RowDefinition Height="{StaticResource A_GridLength_Spacer_Height}" />
                                                    <RowDefinition Height="{StaticResource A_GridLength_Cell_Height}" />
                                                    <RowDefinition Height="{StaticResource A_GridLength_Spacer_Height}" />
                                                </Grid.RowDefinitions>
                                                <local:FZTextBlock Grid.Column="0" Grid.Row="0" Text="{local:Loc UserConfig.IDS_Benchmark_StutterFrames}" Style="{StaticResource A_FZTextBlock_Benchmark_ContentLabel}" />
                                                <local:FZTextBlock Grid.Column="1" Grid.Row="0" Text="{Binding NumStutters, Converter={StaticResource A_NumUnitConverter_NoUnit_0dp}}" Style="{StaticResource A_FZTextBlock_Benchmark_ContentData}" />
                                                <local:FZMaterial  Grid.ColumnSpan="2" Grid.Row="1" Style="{StaticResource H_Style_Divider_ListOption}"/>

                                                <local:FZTextBlock Grid.Column="0" Grid.Row="2" Text="{local:Loc UserConfig.IDS_Benchmark_PercentageGPULimited}" Style="{StaticResource A_FZTextBlock_Benchmark_ContentLabel}" />
                                                <local:FZTextBlock Grid.Column="1" Grid.Row="2" Text="{Binding PercentGPUBound, Converter={StaticResource A_NumUnitConverter_NoUnit_1dp}}" Style="{StaticResource A_FZTextBlock_Benchmark_ContentData}" />
                                                <local:FZMaterial Grid.ColumnSpan="2" Grid.Row="3" Style="{StaticResource H_Style_Divider_ListOption}"/>

                                                <local:FZTextBlock Grid.Column="0" Grid.Row="4" Text="{local:Loc UserConfig.IDS_Benchmark_AverageLatency}" Style="{StaticResource A_FZTextBlock_Benchmark_ContentLabel}" />
                                                <local:FZTextBlock Grid.Column="1" Grid.Row="4" Text="{Binding AverageLatency, Converter={StaticResource A_NumUnitConverter_NoUnit_1dp}}" Style="{StaticResource A_FZTextBlock_Benchmark_ContentData}" />
                                                <local:FZMaterial Grid.ColumnSpan="2" Grid.Row="5" Style="{StaticResource H_Style_Divider_ListOption}"/>

                                            </Grid>
                                            <Control Template="{StaticResource A_Control_Template_BenchmarkStateText}"/>
                                        </DockPanel>

                                    </local:FZMaterial>
                                    <local:FZMaterial x:Name="FPSDisplay" 
                                                      DockPanel.Dock="Left" 
                                                      Color="{StaticResource H_Color_Primary_Pink}"
                                                      Grid.Column="1"
                                                      Margin="2,2,0,0"
                                                      Preset="{StaticResource H_Roundtangle_Outer_2px}">
                                        <StackPanel Orientation="Vertical"
                                                    VerticalAlignment="Center"
                                                    HorizontalAlignment="Center">
                                            <local:FZTextBlock Text="{local:Loc Benchmark.IDS_Achieved}"
                                                               FontFamily="Horizon_A"
                                                               Margin="0,0,0,20"
                                                               HorizontalAlignment="Center"
                                                               Style="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelHeaderTitle}"/>
                                            <StackPanel Orientation="Horizontal">
                                                <local:FZTextBlock Text="{Binding AverageFPS, Converter={StaticResource A_NumUnitConverter_NoUnit_0dp}}" 
                                                                   CapHeight="45" 
                                                                   FontFamily="Horizon_A" 
                                                                   Margin="0,0,5,0"
                                                                   Style="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelHeaderTitle}" />
                                                <local:FZTextBlock Text="{local:Loc Benchmark.IDS_FPS}"
                                                                   CapHeight="45" 
                                                                   FontFamily="Horizon_A" 
                                                                   Margin="5,0,0,0"
                                                                   Style="{StaticResource A_Style_FZTextBlock_Benchmark_StatsPanelHeaderTitle}" />
                                            </StackPanel>
                                        </StackPanel>
                                    </local:FZMaterial>

                                </DockPanel>
                            </Grid>
                        </DockPanel>

                    </Grid>
                </DockPanel>
            </Grid>
        </Border>
    </Grid>
</Page>
