<PopupLoadSaveTuneCuration xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    x:Class="ForzaUI.A_LoadSaveTuning"
    Style="{StaticResource A_Style_Page_Generic}"
    DataContext="{Binding RelativeSource={RelativeSource Self}}">
    <UIPageTransitionManager.TransitionManager>
        <UIPageTransitionManager
            Preset="{StaticResource A_UIPageTransitionManagerPreset_Menu}" />
    </UIPageTransitionManager.TransitionManager>
    <Page.Resources>
        <ResourceDictionary>
            <Size
                x:Key="A_Size_GamerPicSize">44,44</Size>
            <Style
                x:Key="A_Style_FZRun_LoadSaveTuning_YEAR"
                TargetType="FZRun">
                <Setter
                    Property="FontFamily"
                    Value="Horizon_B" />
            </Style>

            <CornerRadius x:Key="A_CornerRadius_Dynamic_CarouselTile">2</CornerRadius>

            <Style x:Key="A_Style_FZMaterial_ShadowBase_Dynamic"
                   TargetType="{Type FZMaterial}" 
                   BasedOn="{StaticResource A_Style_FZMaterial_ShadowBase_Dynamic}">
                <Setter Property="Margin" Value="-12"/>
            </Style>


            <NumUnitConverter
                x:Key="A_LoadSaveTuning_NumUnitConverter_CarStat"
                FractionDigits="0"
                ShowUnit="true" />
            <Int32
                x:Key="A_Int32_Column_Label">0</Int32>
            <Int32
                x:Key="A_Int32_Column_Previous">1</Int32>
            <Int32
                x:Key="A_Int32_Column_New">2</Int32>

            <Style x:Key="A_Style_FZMaterial_Stats_Background" 
                   TargetType="FZMaterial" 
                   BasedOn="{StaticResource H_Style_Container_GlassHighBlur_Description}">
                <Setter Property="Preset" Value="{StaticResource H_GlassRoundtangle_2px}" />
            </Style>
            <Style
                x:Key="A_Style_FZTextBlock_Label"
                TargetType="FZTextBlock"
                BasedOn="{StaticResource A_Style_FZTextBlock_HorizonB}">
                <Setter
                    Property="Color"
                    Value="{StaticResource H_Color_Primary_White}" />
                <Setter
                    Property="HorizontalAlignment"
                    Value="Left" />
                <Setter
                    Property="VerticalAlignment"
                    Value="Center" />
                <Setter
                    Property="CapHeight"
                    Value="18" />
                <Setter
                    Property="Opacity"
                    Value="0.5" />
            </Style>
            <Style
                x:Key="A_Style_FZTextBlock_Value"
                TargetType="FZTextBlock"
                BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}">
                <Setter
                    Property="Color"
                    Value="{StaticResource H_Color_Primary_White}" />
                <Setter
                    Property="HorizontalAlignment"
                    Value="Left" />
                <Setter
                    Property="VerticalAlignment"
                    Value="Center" />
                <Setter
                    Property="CapHeight"
                    Value="18" />
            </Style>
            <Style
                x:Key="A_Style_FZTextBlock_CarStatHeader"
                TargetType="FZTextBlock"
                BasedOn="{StaticResource H_Style_Text_DescriptionTitle}">
                <Setter
                    Property="Margin"
                    Value="0" />
                <Setter
                    Property="HorizontalAlignment"
                    Value="Left" />
            </Style>
            <Style
                x:Key="A_Style_FZTextBlock_CarStatLabel"
                TargetType="FZTextBlock"
                BasedOn="{StaticResource A_Style_FZTextBlock_Label}">
                <Setter
                    Property="Margin"
                    Value="0,0,8,0" />
            </Style>
            <Style
                x:Key="A_Style_FZTextBlock_CarStatValue"
                TargetType="FZTextBlock"
                BasedOn="{StaticResource A_Style_FZTextBlock_Value}">
                <Setter
                    Property="Margin"
                    Value="0,0,8,0" />
            </Style>
            <Style
                x:Key="A_Style_Progressbar_TuneSetup_SmallSpinner"
                TargetType="ProgressBar"
                BasedOn="{StaticResource A_Style_Progressbar_Loading_SmallSpinner}">
                <Setter
                    Property="Visibility"
                    Value="Collapsed" />
                <Style.Triggers>
                    <DataTrigger
                        Binding="{Binding FetchingItems, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}"
                        Value="True">
                        <Setter
                            Property="Visibility"
                            Value="Visible" />
                    </DataTrigger>
                    <DataTrigger
                        Binding="{Binding HasItems, ElementName=PART_ItemList}"
                        Value="True">
                        <Setter
                            Property="Visibility"
                            Value="Visible" />
                    </DataTrigger>
                </Style.Triggers>
            </Style>
            <Style
                x:Key="A_Style_FZMaterial_RowSeparator"
                TargetType="{Type FZMaterial}">
                <Setter
                    Property="Color"
                    Value="{StaticResource H_Color_Primary_White}" />
                <Setter Property="Preset" Value="{StaticResource H_GlassRoundtangle_2px}" />
                <Setter
                    Property="Height"
                    Value="2" />
                <Setter
                    Property="Opacity"
                    Value="0.1" />
                <Setter
                   Property="Margin"
                   Value="17,11" />
            </Style>
            <Style
                x:Key="A_Style_FZMaterial_RowSeparator_CarDetails"
                TargetType="{Type FZMaterial}"
                BasedOn="{StaticResource A_Style_FZMaterial_RowSeparator}">
                <Setter
                   Property="Margin"
                   Value="0,15" />
            </Style>
            <Style
                x:Key="H_Style_TemplatedWrapper_PerformanceIcon"
                TargetType="ContentControl">
                <Setter
                    Property="Height"
                    Value="30" />
                <Setter
                    Property="Width"
                    Value="{Binding ActualHeight, RelativeSource={RelativeSource Self}}" />
                <Setter
                    Property="Template">
                    <Setter.Value>
                        <ControlTemplate
                            TargetType="ContentControl">
                            <Grid>
                                <FZMaterial Color="{StaticResource H_Color_Primary_White}"  
                                            Visibility="{Binding Content, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource A_StringVisConverter}}">
                                    <FZMaterial Color="{StaticResource H_Color_Primary_Black}" 
                                                ImageSource="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}"/>
                                </FZMaterial>
                                <FZMaterial Style="{StaticResource A_Style_FZMaterial_PerformanceChangeArrowBox}" 
                                            Tag="{StaticResource H_Int32_Zero}"
                                            Visibility="{Binding Content, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource A_StringVisConverter_Inverse}}">
                                    <FZMaterial Style="{StaticResource A_Style_FZMaterial_PerformanceChangeArrow}" 
                                                Tag="{StaticResource H_Int32_Zero}" />
                                </FZMaterial>
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <Style
                x:Key="A_Style_TemplatedElement_Row_CarStat_Numeric"
                TargetType="Control">
                <Setter
                    Property="Template">
                    <Setter.Value>
                        <ControlTemplate
                            TargetType="Control">
                            <Grid Height="30" Margin="18,0">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition
                                        Width="230*" />
                                    <ColumnDefinition
                                        Width="173*" />
                                    <ColumnDefinition
                                        Width="173*" />
                                </Grid.ColumnDefinitions>
                                <FZTextBlock
                                    Text="{DynamicDataBinding CarStatLabel}"
                                    Style="{StaticResource A_Style_FZTextBlock_CarStatLabel}"
                                    FontFamily="Horizon_B"
                                    Grid.Column="{StaticResource A_Int32_Column_Label}" />
                                <FZTextBlock
                                    Text="{DynamicDataBinding CarStatPrevious}"
                                    FontFamily="Horizon_B"
                                    Style="{StaticResource A_Style_FZTextBlock_CarStatValue}"
                                    Grid.Column="{StaticResource A_Int32_Column_Previous}" />
                                <DockPanel
                                    Grid.Column="{StaticResource A_Int32_Column_New}">
                                    <ContentControl
                                        DockPanel.Dock="Left"
                                        Margin="0,0,8,0"
                                        Style="{StaticResource H_Style_TemplatedWrapper_PerformanceChangeBox}"
                                        Content="{DynamicDataBinding CarStatChange}" />
                                    <FZTextBlock
                                        Text="{DynamicDataBinding CarStatNew}"
                                        Style="{StaticResource A_Style_FZTextBlock_CarStatValue}" />
                                </DockPanel>
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <Style
                x:Key="A_Style_TemplatedElement_Row_CarStat_Textual"
                TargetType="Control">
                <Style.Resources>
                    <ResourceDictionary>
                        <Style
                            x:Key="A_Style_FZMaterial_CarStat_TextContainer"
                            TargetType="FZMaterial">
                            <Setter
                                Property="Color"
                                Value="#80f7f7f7" />
                            <Setter
                                Property="HorizontalAlignment"
                                Value="Left" />
                            <Setter
                                Property="VerticalAlignment"
                                Value="Center" />
                            <Setter
                                Property="Width"
                                Value="118" />
                            <Setter
                                Property="Margin"
                                Value="0,7,16,7" />
                            <Setter
                                Property="Preset">
                                <Setter.Value>
                                    <FZMaterialPresetRoundtangleStroke
                                        CornerRadius="2"
                                        Thickness="2" />
                                </Setter.Value>
                            </Setter>
                        </Style>
                    </ResourceDictionary>
                </Style.Resources>
                <Setter
                    Property="Template">
                    <Setter.Value>
                        <ControlTemplate
                            TargetType="Control">
                            <Grid Margin="18,0">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition
                                        Width="230*" />
                                    <ColumnDefinition
                                        Width="173*" />
                                    <ColumnDefinition
                                        Width="173*" />
                                </Grid.ColumnDefinitions>
                                <FZTextBlock
                                    Text="{DynamicDataBinding CarStatLabel}"
                                    Style="{StaticResource A_Style_FZTextBlock_CarStatLabel}"
                                    Grid.Column="{StaticResource A_Int32_Column_Label}" />
                                <DockPanel
                                    Grid.Column="{StaticResource A_Int32_Column_Previous}">
                                    <ContentControl
                                        DockPanel.Dock="Left"
                                        Margin="0,0,8,0"
                                        Style="{StaticResource H_Style_TemplatedWrapper_PerformanceIcon}"
                                        Content="{DynamicDataBinding CarStatIconPrevious}" />
                                    <FZTextBlock Text="{DynamicDataBinding CarStatPrevious}"
                                                 FontFamily="Horizon_B"
                                                 Style="{StaticResource A_Style_FZTextBlock_CarStatValue}"/>
                                </DockPanel>
                                <DockPanel Grid.Column="{StaticResource A_Int32_Column_New}">
                                    <ContentControl
                                        DockPanel.Dock="Left"
                                        Margin="0,0,8,0"
                                        Style="{StaticResource H_Style_TemplatedWrapper_PerformanceIcon}"
                                        Content="{DynamicDataBinding CarStatIconNew}" />
                                    <FZTextBlock Text="{DynamicDataBinding CarStatNew}"   
                                        Style="{StaticResource A_Style_FZTextBlock_CarStatValue}"/>
                                </DockPanel>
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <Style
                x:Key="A_Style_TemplatedElement_Row_CarStat_Icons"
                TargetType="Control">
                <Style.Resources>
                    <ResourceDictionary>
                        <Style
                            x:Key="A_Style_FZMaterial_CarStat_TextContainer"
                            TargetType="FZMaterial">
                            <Setter
                                Property="Color"
                                Value="#80f7f7f7" />
                            <Setter
                                Property="HorizontalAlignment"
                                Value="Left" />
                            <Setter
                                Property="VerticalAlignment"
                                Value="Center" />
                            <Setter
                                Property="Width"
                                Value="118" />
                            <Setter
                                Property="Margin"
                                Value="0,7,16,7" />
                            <Setter
                                Property="Preset">
                                <Setter.Value>
                                    <FZMaterialPresetRoundtangleStroke
                                        CornerRadius="2"
                                        Thickness="2" />
                                </Setter.Value>
                            </Setter>
                        </Style>
                    </ResourceDictionary>
                </Style.Resources>
                <Setter
                    Property="Template">
                    <Setter.Value>
                        <ControlTemplate
                            TargetType="Control">
                            <Grid Margin="18,0">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition
                                        Width="230*" />
                                    <ColumnDefinition
                                        Width="173*" />
                                    <ColumnDefinition
                                        Width="173*" />
                                </Grid.ColumnDefinitions>
                                <FZTextBlock
                                    Text="{DynamicDataBinding CarStatLabel}"
                                    Style="{StaticResource A_Style_FZTextBlock_CarStatLabel}"
                                    Grid.Column="{StaticResource A_Int32_Column_Label}" />
                                <Control Grid.Column="{StaticResource A_Int32_Column_Previous}"
                                        Margin="0,0,8,0"
                                        Height="34"
                                        Width="116"
                                        HorizontalAlignment="Left"
                                        BindingProxy.A="{DynamicDataBinding CarStatPrevious}"
                                        Style="{DynamicResource A_Style_Control_CarStat_Icon}"/>
                                <Control Grid.Column="{StaticResource A_Int32_Column_New}"
                                        Margin="0,0,8,0"
                                        Height="34"
                                        Width="116"
                                        HorizontalAlignment="Left"
                                        BindingProxy.A="{DynamicDataBinding CarStatNew}"
                                        Style="{DynamicResource A_Style_Control_CarStat_Icon}"/>
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <Style x:Key="A_Style_ContentControl_Carousel_ContainerStyle_Tunings" 
                   BasedOn="{StaticResource A_Style_ContentControl_Carousel_ContainerStyle}" 
                   TargetType="ContentControl">
                <Setter Property="Margin" Value="0,0,4,4"/>
            </Style>

            <Style x:Key="A_Style_FZMaterial_Thumbnail" 
                   TargetType="FZMaterial">
                <Style.Triggers>
                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding (ItemContainerGenerator.ItemForItemContainer), RelativeSource={RelativeSource FindAncestor, AncestorType=ListBoxItem}, Converter={StaticResource A_Converter_IsNotNull}}" Value="True" />
                            <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource FindAncestor, AncestorType=ListBoxItem}}" Value="True" />
                        </MultiDataTrigger.Conditions>
                        <Setter Property="AncestorPropertySetter.Type" Value="{x:Type WrapListBox}"/>
                        <Setter Property="AncestorPropertySetter.AttachedPropertyType" Value="BindingProxy"/>
                        <Setter Property="AncestorPropertySetter.Property" Value="A" />
                        <Setter Property="AncestorPropertySetter.Value" Value="{Binding ImageSource, RelativeSource={RelativeSource Self}}"/>                
                    </MultiDataTrigger>
                </Style.Triggers>
            </Style>
            
            <DataTemplate
                x:Key="A_DataTemplate_Carousel_SimpleCarItem_Tuning">
                <Grid>
                    <FZMaterial
                        x:Name="Icon"
                        Style="{StaticResource A_Style_FZMaterial_Thumbnail}"
                        ImageSource="{Binding Thumbnail}"
                        Stretch="Uniform"
                        Margin="0,0,0,30"/>
                    <Grid
                        Margin="8"
                        Visibility="{Binding IsNewItem, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}">
                        <ContentControl
                            Style="{StaticResource H_Style_TemplatedWrapper_PerformanceChangeBox}"
                            Content="{Binding Stats.PerformanceIndexChange}"
                            HorizontalAlignment="Left"
                            VerticalAlignment="Top" />
                        <Grid VerticalAlignment="Bottom">
                            <Control
                                HorizontalAlignment="Left"
                                Height="34"
                                Style="{StaticResource A_Style_Control_CarClassBadge_Small}"
                                Name="CarClassBadge"
                                BindingProxy.A="{Binding Stats.Upgraded.PerformanceIndex}"
                                BindingProxy.B="{Binding Stats.Upgraded.ClassID}"/>
                        </Grid>
                    </Grid>
                </Grid>
                <DataTemplate.Triggers>
                    <DataTrigger
                        Binding="{Binding IsNewItem}"
                        Value="True">
                        <Setter
                            TargetName="Icon"
                            Property="Color"
                            Value="{StaticResource H_Color_Primary_Black}" />
                        <Setter
                            TargetName="Icon"
                            Property="ImageSource"
                            Value="\Textures\Data_Bound\Anthem\Icons\NewSaveIcon.png" />
                    </DataTrigger>
                    <DataTrigger
                        Binding="{Binding IsSavingMode, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}"
                        Value="True">
                        <Setter
                            TargetName="CarClassBadge"
                            Property="BindingProxy.A"
                            Value="{Binding Stats.Current.PerformanceIndex}" />
                        <Setter
                            TargetName="CarClassBadge"
                            Property="BindingProxy.B"
                            Value="{Binding Stats.Current.ClassID}" />
                    </DataTrigger>
                </DataTemplate.Triggers>
            </DataTemplate>

            <Style x:Key="A_Style_FZTextBlock_PolyStatsValueText"
                   TargetType="{x:Type local:FZTextBlock}">
                <Setter Property="Text" Value="{Binding Tag, RelativeSource={RelativeSource Self}, Converter={NumUnitConverter FractionDigits=1}}"/>
                <Setter Property="FontFamily" Value="Horizon_A"/>
                <Setter Property="Stretch" Value="None"/>
                <Setter Property="CapHeight" Value="20"/>
                <Setter Property="Color" Value="{StaticResource H_Color_Primary_White}"/>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding Tag, RelativeSource={RelativeSource Self}}" Value="10">
                        <Setter Property="Text" Value="{Binding Tag, RelativeSource={RelativeSource Self}, Converter={NumUnitConverter FractionDigits=0}}"/>
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <AutoScrollSettings x:Key="A_AutoScrollSettings_LoadSaveTurning"
                ScrollSeparation="50"
                Speed="20"
                ScrollOrientation="Horizontal"
                InitialPause="0"/>

            <Style x:Key="A_Style_FZTextBlock_AutoScroll_CarName" TargetType="FZTextBlock">
                <Setter Property="CapHeight" Value="21" />
                <Setter Property="Color" Value="{StaticResource H_Color_Primary_White}" />
                <Setter Property="Stretch" Value="None" />
                <Setter Property="Margin" Value="0,0,0,14" />
                <Setter Property="AutoScroll.AllowScrolling" Value="True" />
                <Setter Property="AutoScroll" Value="{StaticResource A_AutoScrollSettings_LoadSaveTurning}" />
            </Style>
        </ResourceDictionary>
    </Page.Resources>
    <Grid
        x:Name="PART_LayoutRoot">
        <Control
            Style="{StaticResource A_Style_Control_ScreenBackground}" />
        <ContentControl
            Style="{StaticResource A_Style_ButtonBar}">
            <ContentControl
                x:Name="PART_DefaultHelpPanel"
                Style="{StaticResource A_Style_ContentControl_DefaultButtonBar}" />
        </ContentControl>
        <Border
            Style="{StaticResource A_Style_Border_ScenePadding_Opus}">
            <StackPanel
                VerticalAlignment="Center"
                HorizontalAlignment="Center"
                Width="1712"
                Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_0}">
                <ContentControl
                    x:Name="ContentControl_SceneTitle"
                    Content="{Binding Title}"
                    Style="{StaticResource A_Style_ContentControl_ScreenTitleBlock}"
                    HorizontalAlignment="Left" />
                <FZTabButtonsSelector x:Name="PART_CategoryList"
                        Style="{StaticResource H_Style_TabBar}"
                        ItemsSource="{Binding Categories}"
                        Width="1712"
                        HorizontalAlignment="Stretch"
                        HorizontalContentAlignment="Left"/>
                <StackPanel
                    Orientation="Horizontal"
                    Width="464"
                    HorizontalAlignment="Left"
                    x:Name="MainContent"
                    DataContext="{Binding SelectedItem, ElementName=PART_ItemList}"
                    Height="594"
                    Margin="0,0,0,4">
                    <DockPanel x:Name="CarInfoPanel" Width="464" Margin="0,0,4,0">
                        <ContentControl DockPanel.Dock="Top"
                                        Content="{Binding DisplayName}"
                                        Style="{StaticResource A_Style_ContentControl_Header}" />
                        <FZMaterial
                             Style="{StaticResource A_Style_FZMaterial_Stats_Background}">
                            <Grid>
                                <FZMaterial ImageSource="/ForzaUI;component/Textures/Anthem/Tuning/vehicle_background.png" 
                                            Stretch="Uniform" 
                                            Margin="0,-150,0,0"/>
                                <DockPanel 
                                    Visibility="{Binding HasCarInfoPanelLoaded, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}, Converter={StaticResource A_FZBooleanToVisibilityConverter_UseHidden}}"
                                    Margin="0,35,0,16">
                                    <StackPanel DockPanel.Dock="Bottom" Margin="17,0">
                                        <FZMaterial Style="{StaticResource A_Style_FZMaterial_RowSeparator_CarDetails}" Margin="0,15,0,5"/>
                                        <Grid>
                                            <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
                                                <Grid Height="{Binding Height, Source={StaticResource A_Size_GamerPicSize}}" 
                                                      Width="{Binding Width, Source={StaticResource A_Size_GamerPicSize}}"
                                                      Margin="0,0,15,0">
                                                    <FZMaterial x:Name="GamerPic"
                                                                ImageSource="{Binding UserProfile, ConverterParameter={StaticResource A_Size_GamerPicSize}, Converter={StaticResource A_GamerPicConverter}}"
                                                                Visibility="{Binding Downloaded, RelativeSource={RelativeSource Self}, Converter={FZBooleanToVisibilityConverter}}" />
                                                    <ProgressBar Style="{StaticResource A_Style_Progressbar_Loading_SmallSpinner}" 
                                                                 HorizontalAlignment="Stretch"
                                                                 VerticalAlignment="Stretch"
                                                                 Height="Auto"
                                                                 Width="Auto"
                                                                 Margin="0"
                                                                 Visibility="{Binding Downloaded, ElementName=GamerPic, Converter={FZBooleanToVisibilityConverter InvertResult=True}}" />
                                                </Grid>
                                                <FZTextBlock Name="GamerTag" 
                                                             Style="{StaticResource A_Style_FZTextBlock_Value}"
                                                             Text="{Binding UserProfile.FormattedGamertag}"
                                                             HorizontalAlignment="Stretch"
                                                             FontFamily="Horizon_B"
                                                             Stretch="None"
                                                             TextAlignment="Right"
                                                             AutoScroll.AllowScrolling="True"
                                                             AutoScroll="{StaticResource A_AutoScrollSettings_LoadSaveTurning}"/>
                                            </StackPanel>

                                        </Grid>
                                        <FZMaterial Style="{StaticResource A_Style_FZMaterial_RowSeparator_CarDetails}" Margin="0,5,0,18"/>
                                        <DockPanel Margin="2" LastChildFill="False">
                                            <FZTextBlock DockPanel.Dock="Left" 
                                                         Text="{Loc Storefront.IDS_Tuning_Rank}"
                                                         Style="{StaticResource A_Style_FZTextBlock_Label}" />
                                            <FZTextBlock DockPanel.Dock="Right" 
                                                         Text="{Binding UserProfile.ThreadLevels.TuningThread.ThreadValue, FallbackValue=0, Converter={NumUnitConverter FractionDigits=0}}"
                                                         Style="{StaticResource A_Style_FZTextBlock_Value}" />
                                        </DockPanel>
                                        <FZMaterial Style="{StaticResource A_Style_FZMaterial_RowSeparator_CarDetails}" />
                                        <DockPanel Margin="2" LastChildFill="False">
                                            <FZTextBlock DockPanel.Dock="Left"
                                                         Text="{Loc Storefront.IDS_LabelDate}" 
                                                         Style="{StaticResource A_Style_FZTextBlock_Label}" />
                                            <FZTextBlock DockPanel.Dock="Right"
                                                         Text="{Binding DateCreated}"
                                                         Style="{StaticResource A_Style_FZTextBlock_Value}" />
                                        </DockPanel>
                                        <FZMaterial Style="{StaticResource A_Style_FZMaterial_RowSeparator_CarDetails}" />
                                        <DockPanel Margin="2" LastChildFill="False">
                                            <FZTextBlock DockPanel.Dock="Left"
                                                         Text="{Loc Storefront.IDS_LabelPopularity}"
                                                         Style="{StaticResource A_Style_FZTextBlock_Label}" />
                                            <DeltaProgressBar DockPanel.Dock="Right" 
                                                              Style="{StaticResource A_Style_DeltaProgressBar_Popularity}"
                                                              Height="24"
                                                              BaseValue="{Binding Popularity}"
                                                              NewValue="{Binding Popularity}" />
                                        </DockPanel>
                                    </StackPanel>
                                    <DockPanel>
                                        <StackPanel DockPanel.Dock="Top"
                                                    Orientation="Vertical"
                                                    HorizontalAlignment="Center"
                                                    VerticalAlignment="Center">
                                            <FZTextBlock Style="{StaticResource A_Style_FZTextBlock_AutoScroll_CarName}"  
                                                         Text="{Binding CarDisplayName, Converter={StringToUpper}}"
                                                         HorizontalAlignment="Center"/>
                                            <FZTextBlock Style="{StaticResource A_Style_FZTextBlock_Label}" 
                                                         CapHeight="21"
                                                         HorizontalAlignment="Center"  
                                                         MultiStringFormatter.Format="{Loc CarFlow.IDS_CarDisplayMakeAndYear_Format}" 
                                                         MultiStringFormatter.Param0="{Binding CarYear, ConverterParameter=year_time, Converter={NumUnitConverter FractionDigits=0}}"
                                                         MultiStringFormatter.Param1="{Binding CarMakeName, Converter={StringToUpper}}"
                                                         Text="{Binding (MultiStringFormatter.Output), RelativeSource={RelativeSource Self}}"/>
                                        </StackPanel>
                                        <Grid>
                                            <FZMaterial ImageSource="{Binding (BindingProxy.A), ElementName=PART_ItemList}" Stretch="Uniform" />
                                        </Grid>
                                    </DockPanel>
                                </DockPanel>
                                <Decorator HorizontalAlignment="Center" 
                                           VerticalAlignment="Center" 
                                           Visibility="{Binding HasCarInfoPanelLoaded, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}">
                                    <ProgressBar Style="{StaticResource A_Style_Progressbar_TuneSetup_SmallSpinner}" />
                                </Decorator>
                            </Grid>
                        </FZMaterial>
                    </DockPanel>
                    <DockPanel x:Name="PerformancePanel" Width="617" Margin="0,0,4,0">
                        <DockPanel>
                            <ContentControl
                                DockPanel.Dock="Top"
                                Content="{Loc Tuning.IDS_Performance}"
                                Style="{StaticResource A_Style_ContentControl_Header}" />
                            <FZMaterial
                                Style="{StaticResource A_Style_FZMaterial_Stats_Background}">
                                <Grid>
                                    <Grid
                                        Margin="30,-60,30,30"
                                        Visibility="{Binding HasPerformancePanelLoaded, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}, Converter={StaticResource A_FZBooleanToVisibilityConverter_UseHidden}}">
                                        <Grid x:Name="Grid_PerformanceBars">
                                            <FZMaterial 
                                                ImageSource="game:/media/ui/textures/anthem/tuning/polystats_grid.png"
                                                Width="260" 
                                                Height="260"
                                                HorizontalAlignment="Center"
                                                VerticalAlignment="Center"/>
                                            <Grid 
                                                Width="234" 
                                                Height="234"
                                                HorizontalAlignment="Center"
                                                VerticalAlignment="Center">
                                                <PolyStatsControl 
                                                    Max="10" 
                                                    Filter="compare" 
                                                    Values="{Binding Stats.Current, Converter={CarStatsToDoubleCollectionConverter}}"/>
                                                <PolyStatsControl 
                                                    Max="10" 
                                                    Filter="stats" 
                                                    Values="{Binding Stats.Upgraded, Converter={CarStatsToDoubleCollectionConverter}}"/>
                                            </Grid>
                                            <Canvas Width="0" Height="0">
                                                <Grid Canvas.Bottom="125" Width="0">
                                                    <StackPanel HorizontalAlignment="Center" Width="120">
                                                        <StackPanel Orientation="Horizontal" Margin="0,0,0,10">
                                                            <FZTextBlock Text="{Binding Source={local:Loc CarFlow.IDS_Stat_Accel}}" 
                                                                         Style="{StaticResource A_Style_FZTextBlock_CarStatLabel}" 
                                                                         CapHeight="16" 
                                                                         Margin="0,0,7,0" 
                                                                         TextAlignment="Center" 
                                                                         VerticalAlignment="Bottom"/>
                                                            <FZTextBlock Style="{StaticResource A_Style_FZTextBlock_PolyStatsValueText}"
                                                                         VerticalAlignment="Bottom"
                                                                         Tag="{Binding Stats.Upgraded.AccelerationRating}"/>
                                                        </StackPanel>
                                                        <ContentControl
                                                            HorizontalAlignment="Center"
                                                            Style="{StaticResource H_Style_TemplatedWrapper_PerformanceChangeBox}"
                                                            Content="{Binding Stats.AccelerationRatingChange}" />
                                                    </StackPanel>
                                                </Grid>
                                                <Grid Canvas.Top="125" Width="0" >
                                                    <StackPanel HorizontalAlignment="Center" Width="120">
                                                        <ContentControl
                                                            HorizontalAlignment="Center"
                                                            Style="{StaticResource H_Style_TemplatedWrapper_PerformanceChangeBox}"
                                                            Content="{Binding Stats.OffroadRatingChange}" />
                                                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,10,0,0">
                                                            <FZTextBlock Text="{Binding Source={local:Loc CarFlow.IDS_Stat_Offroad}}"
                                                                         Style="{StaticResource A_Style_FZTextBlock_CarStatLabel}"
                                                                         CapHeight="16"
                                                                         Margin="0,0,7,0"
                                                                         TextAlignment="Center"
                                                                         VerticalAlignment="Bottom"/>
                                                            <FZTextBlock Tag="{Binding Stats.Upgraded.OffroadRating}"
                                                                         Style="{StaticResource A_Style_FZTextBlock_PolyStatsValueText}"
                                                                         VerticalAlignment="Bottom"/>
                                                        </StackPanel>
                                                    </StackPanel>
                                                </Grid>
                                                <Grid Canvas.Left="106" Canvas.Bottom="64">
                                                    <StackPanel Orientation="Horizontal">
                                                        <ContentControl
                                                            Style="{StaticResource H_Style_TemplatedWrapper_PerformanceChangeBox}"
                                                            Content="{Binding Stats.SpeedRatingChange}" 
                                                            Margin="0,0,9,0"/>
                                                        <StackPanel VerticalAlignment="Center" Orientation="Horizontal">
                                                            <FZTextBlock Text="{Binding Source={local:Loc CarFlow.IDS_Stat_Speed}}"
                                                                         Style="{StaticResource A_Style_FZTextBlock_CarStatLabel}"
                                                                         CapHeight="16"
                                                                         VerticalAlignment="Bottom"
                                                                         Margin="0,0,7,0"/>
                                                            <FZTextBlock  
                                                                    Tag="{Binding Stats.Upgraded.SpeedRating}"
                                                                    Style="{StaticResource A_Style_FZTextBlock_PolyStatsValueText}"/>
                                                        </StackPanel>
                                                    </StackPanel>
                                                </Grid>
                                                <Grid Canvas.Left="106" Canvas.Top="61">
                                                    <StackPanel Orientation="Horizontal">
                                                        <ContentControl
                                                            Style="{StaticResource H_Style_TemplatedWrapper_PerformanceChangeBox}"
                                                            Content="{Binding Stats.BrakingRatingChange}" 
                                                            Margin="0,0,9,0" />
                                                        <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                                                            <FZTextBlock Text="{Binding Source={local:Loc CarFlow.IDS_Stat_Braking}}"
                                                                         Style="{StaticResource A_Style_FZTextBlock_CarStatLabel}"
                                                                         CapHeight="16"
                                                                         Margin="0,0,7,0"
                                                                         VerticalAlignment="Bottom"/>
                                                            <FZTextBlock Tag="{Binding Stats.Upgraded.BrakingRating}" Style="{StaticResource A_Style_FZTextBlock_PolyStatsValueText}"/>
                                                        </StackPanel>
                                                    </StackPanel>
                                                </Grid>
                                                <Grid Canvas.Right="106" Canvas.Bottom="64">
                                                    <StackPanel Orientation="Horizontal">
                                                        <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,9,0">
                                                            <FZTextBlock Text="{Binding Source={local:Loc CarFlow.IDS_Stat_Handling}}" 
                                                                         Style="{StaticResource A_Style_FZTextBlock_CarStatLabel}" 
                                                                         CapHeight="16"
                                                                         Margin="0,0,7,0"
                                                                         VerticalAlignment="Bottom"/>
                                                            <FZTextBlock Tag="{Binding Stats.Upgraded.HandlingRating}" 
                                                                         Style="{StaticResource A_Style_FZTextBlock_PolyStatsValueText}"
                                                                         VerticalAlignment="Bottom"/>
                                                        </StackPanel>

                                                        <ContentControl Style="{StaticResource H_Style_TemplatedWrapper_PerformanceChangeBox}" 
                                                                        Content="{Binding Stats.HandlingRatingChange}" />
                                                    </StackPanel>
                                                </Grid>
                                                <Grid Canvas.Right="106" Canvas.Top="61">
                                                    <StackPanel Orientation="Horizontal">
                                                        <StackPanel VerticalAlignment="Center" Orientation="Horizontal">
                                                            <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,9,0">
                                                                <FZTextBlock 
                                                                    Text="{Binding Source={local:Loc CarFlow.IDS_Stat_Launch}}"
                                                                    Style="{StaticResource A_Style_FZTextBlock_CarStatLabel}"
                                                                    CapHeight="16"
                                                                    Margin="0,0,7,0"
                                                                    VerticalAlignment="Bottom"/>
                                                                <FZTextBlock 
                                                                    Tag="{Binding Stats.Upgraded.LaunchRating}"
                                                                    Style="{StaticResource A_Style_FZTextBlock_PolyStatsValueText}"
                                                                    VerticalAlignment="Bottom"/>
                                                            </StackPanel>
                                                            <ContentControl Style="{StaticResource H_Style_TemplatedWrapper_PerformanceChangeBox}"
                                                                                Content="{Binding Stats.LaunchRatingChange}" />
                                                        </StackPanel>
                                                    </StackPanel>
                                                </Grid>
                                            </Canvas>
                                        </Grid>
                                    </Grid>
                                    <Grid VerticalAlignment="Bottom">
                                        <Decorator HorizontalAlignment="Center"
                                                   VerticalAlignment="Center"
                                                   Visibility="{Binding HasCarStatPanelLoaded, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}">
                                            <ProgressBar Style="{StaticResource A_Style_Progressbar_TuneSetup_SmallSpinner}" />
                                        </Decorator>
                                        <DockPanel Margin="148,0,148,35" 
                                                   Visibility="{Binding HasCarStatPanelLoaded, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}, Converter={StaticResource A_FZBooleanToVisibilityConverter}}">
                                            <DockPanel Dock="Top" LastChildFill="False">
                                                <StackPanel DockPanel.Dock="Left">
                                                    <StackPanel Orientation="Horizontal" Margin="0,0,0,11">
                                                        <Border BorderBrush="#ff36bbcc" BorderThickness="2.5" Margin="0,0,9,0" Width="18" Height="18">
                                                            <FZMaterial Color="#5136bbcc"/>
                                                        </Border>
                                                        <FZTextBlock Style="{StaticResource A_Style_FZTextBlock_CarStatLabel}" 
                                                                     Text="{Loc UpgradeCar.IDS_TuneCompare_Old}"
                                                                     VerticalAlignment="Center"
                                                                     Margin="0"
                                                                     CapHeight="16"/>
                                                    </StackPanel>
                                                </StackPanel>

                                                <StackPanel DockPanel.Dock="Right">
                                                    <StackPanel Orientation="Horizontal" Margin="0,0,0,11">
                                                        <FZTextBlock Style="{StaticResource A_Style_FZTextBlock_CarStatLabel}" 
                                                                     Text="{Loc UpgradeCar.IDS_TuneCompare_New}"
                                                                     VerticalAlignment="Center"
                                                                     Margin="0,0,9,0"
                                                                     CapHeight="16"/>
                                                        <Border BorderBrush="#ffffde39" BorderThickness="2.5" Width="18" Height="18">
                                                            <FZMaterial Color="#51ffde39"/>
                                                        </Border>
                                                    </StackPanel>
                                                </StackPanel>
                                            </DockPanel>
                                            <DockPanel Dock="Bottom">
                                                <StackPanel DockPanel.Dock="Left">
                                                    <Control 
                                                         Style="{StaticResource H_Style_TemplatedElement_CarClassBadge}" 
                                                         BindingProxy.A="{Binding Stats.Current.PerformanceIndex}"
                                                         BindingProxy.B="{Binding Stats.Current.ClassID}" />
                                                </StackPanel>

                                                <StackPanel DockPanel.Dock="Right">
                                                    <Control Style="{StaticResource H_Style_TemplatedElement_CarClassBadge}"
                                                         BindingProxy.A="{Binding Stats.Upgraded.PerformanceIndex}" 
                                                         BindingProxy.B="{Binding Stats.Upgraded.ClassID}" />
                                                </StackPanel>
                                                <Decorator>
                                                    <ContentControl Style="{StaticResource H_Style_TemplatedWrapper_PerformanceChangeBox}"
                                                        Content="{Binding Stats.PerformanceIndexChange}"
                                                        HorizontalAlignment="Center" />
                                                </Decorator>

                                            </DockPanel>
                                        </DockPanel>
                                    </Grid>
                                    <Grid
                                        HorizontalAlignment="Center"
                                        VerticalAlignment="Center"
                                        Visibility="{Binding HasPerformancePanelLoaded, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}">
                                        <FZTextBlock
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Center"
                                            Text="{Loc Storefront.IDS_NoTunesFound}"
                                            Color="{StaticResource A_Color_SubHeader_Text}">
                                            <FZTextBlock.Style>
                                                <Style
                                                    TargetType="{Type FZTextBlock}"
                                                    BasedOn="{StaticResource A_Style_FZTextBlock_HeaderBlock}">
                                                    <Setter
                                                        Property="Visibility"
                                                        Value="Collapsed" />
                                                    <Style.Triggers>
                                                        <MultiDataTrigger>
                                                            <MultiDataTrigger.Conditions>
                                                                <Condition
                                                                    Binding="{Binding HasItems, ElementName=PART_ItemList}"
                                                                    Value="False" />
                                                                <Condition
                                                                    Binding="{Binding FetchingItems, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}"
                                                                    Value="False" />
                                                            </MultiDataTrigger.Conditions>
                                                            <Setter
                                                                Property="Visibility"
                                                                Value="Visible" />
                                                        </MultiDataTrigger>
                                                    </Style.Triggers>
                                                </Style>
                                            </FZTextBlock.Style>
                                        </FZTextBlock>
                                        <ProgressBar
                                            Style="{StaticResource A_Style_Progressbar_TuneSetup_SmallSpinner}"
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Center" />
                                    </Grid>
                                </Grid>
                            </FZMaterial>
                        </DockPanel>
                    </DockPanel>
                    <DockPanel x:Name="CarStatsPanel" Width="623">
                        <DockPanel.Resources>
                            <ResourceDictionary>
                                <Thickness
                                    x:Key="CarStatsMargin">18,0</Thickness>
                            </ResourceDictionary>
                        </DockPanel.Resources>
                        <ContentControl
                            DockPanel.Dock="Top"
                            Style="{StaticResource A_Style_ContentControl_Header_Custom}"
                            HorizontalContentAlignment="Stretch">
                            <Grid
                                Margin="{StaticResource CarStatsMargin}">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition
                                        Width="230*" />
                                    <ColumnDefinition
                                        Width="173*" />
                                    <ColumnDefinition
                                        Width="173*" />
                                </Grid.ColumnDefinitions>
                                <FZTextBlock
                                    Style="{StaticResource A_Style_FZTextBlock_CarStatHeader}"
                                    Text="{Loc Upgrades_flow.IDS_CarStat}"
                                    Grid.Column="{StaticResource A_Int32_Column_Label}" />
                                <FZTextBlock
                                    Style="{StaticResource A_Style_FZTextBlock_CarStatHeader}"
                                    Text="{Loc Upgrades_flow.IDS_Previous}"
                                    Grid.Column="{StaticResource A_Int32_Column_Previous}" />
                                <FZTextBlock
                                    Style="{StaticResource A_Style_FZTextBlock_CarStatHeader}"
                                    Text="{Loc Upgrades_flow.IDS_New}"
                                    Grid.Column="{StaticResource A_Int32_Column_New}" />
                            </Grid>
                        </ContentControl>
                        <FZScrollViewer Style="{StaticResource A_Style_FZScrollViewer_Default_Vertical}"
                                        CanContentScroll="True"
                                        Margin="0,0,4,0"
                                        VerticalScrollBarVisibility="Visible"
                                        HorizontalScrollBarVisibility="Disabled"
                                        Focusable="True"
                                        KeepSelectionOnScreen="True"
                                        AllowUnFocusedScrolling="True">
                            <FZMaterial
                            Style="{StaticResource A_Style_FZMaterial_Stats_Background}">
                                <Grid>
                                    <Decorator
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    Visibility="{Binding HasCarStatPanelLoaded, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}">
                                        <ProgressBar
                                        Style="{StaticResource A_Style_Progressbar_TuneSetup_SmallSpinner}" />
                                    </Decorator>
                                    <StackPanel Margin="0,14,0,0"
                                            DataContext="{Binding Stats}"
                                            Visibility="{Binding HasCarStatPanelLoaded, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"
                                            x:Name="StatsGrid">
                                        <Control Style="{StaticResource A_Style_TemplatedElement_Row_CarStat_Numeric}">
                                            <DynamicData.Data>
                                                <DynamicDataSource>
                                                    <DynamicDataItem
                                                    Name="CarStatLabel"
                                                    DataType="String"
                                                    Value="{Loc CarFlow.IDS_Stat_TopSpeed}" />
                                                    <DynamicDataItem
                                                    Name="CarStatPrevious"
                                                    DataType="String"
                                                    Value="{Binding CurrentTuneBenchmark.TopSpeedStat, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" />
                                                    <DynamicDataItem
                                                    Name="CarStatNew"
                                                    DataType="String"
                                                    Value="{Binding CompareTuneBenchmark.TopSpeedStat, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" />
                                                    <DynamicDataItem
                                                    Name="CarStatChange"
                                                    DataType="Int32"
                                                    Value="{Binding TopSpeedChange, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" />
                                                </DynamicDataSource>
                                            </DynamicData.Data>
                                        </Control>
                                        <FZMaterial Style="{StaticResource A_Style_FZMaterial_RowSeparator}"/>
                                        <Control Style="{StaticResource A_Style_TemplatedElement_Row_CarStat_Numeric}" 
                                                 Visibility="{Binding IsUsingMPH, Converter={StaticResource A_FZBooleanToVisibilityConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}">
                                            <DynamicData.Data>
                                                <DynamicDataSource>
                                                    <DynamicDataItem
                                                    Name="CarStatLabel"
                                                    DataType="String"
                                                    Value="{Loc CarFlow.IDS_Stat_60mph}" />
                                                    <DynamicDataItem
                                                    Name="CarStatPrevious"
                                                    DataType="String"
                                                    Value="{Binding CurrentTuneBenchmark.Accel60Stat, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" />
                                                    <DynamicDataItem
                                                    Name="CarStatNew"
                                                    DataType="String"
                                                    Value="{Binding CompareTuneBenchmark.Accel60Stat, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" />
                                                    <DynamicDataItem
                                                    Name="CarStatChange"
                                                    DataType="Int32"
                                                    Value="{Binding Mph60Change, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" />
                                                </DynamicDataSource>
                                            </DynamicData.Data>
                                        </Control>
                                        <Control Style="{StaticResource A_Style_TemplatedElement_Row_CarStat_Numeric}"
                                        Visibility="{Binding IsUsingMPH, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}">
                                            <DynamicData.Data>
                                                <DynamicDataSource>
                                                    <DynamicDataItem
                                                    Name="CarStatLabel"
                                                    DataType="String"
                                                    Value="{Loc CarFlow.IDS_Stat_100kmh}" />
                                                    <DynamicDataItem
                                                    Name="CarStatPrevious"
                                                    DataType="String"
                                                    Value="{Binding CurrentTuneBenchmark.Accel100Stat, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" />
                                                    <DynamicDataItem
                                                    Name="CarStatNew"
                                                    DataType="String"
                                                    Value="{Binding CompareTuneBenchmark.Accel100Stat, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" />
                                                    <DynamicDataItem
                                                    Name="CarStatChange"
                                                    DataType="Int32"
                                                    Value="{Binding kmh100Change, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" />
                                                </DynamicDataSource>
                                            </DynamicData.Data>
                                        </Control>
                                        <FZMaterial
                                        Style="{StaticResource A_Style_FZMaterial_RowSeparator}"/>
                                        <Control Style="{StaticResource A_Style_TemplatedElement_Row_CarStat_Numeric}">
                                            <DynamicData.Data>
                                                <DynamicDataSource>
                                                    <DynamicDataItem
                                                    Name="CarStatLabel"
                                                    DataType="String"
                                                    Value="{Loc CarFlow.IDS_Stat_Power}" />
                                                    <DynamicDataItem
                                                    Name="CarStatPrevious"
                                                    DataType="String"
                                                    Value="{Binding Current.SimPeakPower, ConverterParameter=power, FallbackValue=?, Converter={StaticResource A_LoadSaveTuning_NumUnitConverter_CarStat}}" />
                                                    <DynamicDataItem
                                                    Name="CarStatNew"
                                                    DataType="String"
                                                    Value="{Binding Upgraded.SimPeakPower, ConverterParameter=power, FallbackValue=?, Converter={StaticResource A_LoadSaveTuning_NumUnitConverter_CarStat}}" />
                                                    <DynamicDataItem
                                                    Name="CarStatChange"
                                                    DataType="Int32"
                                                    Value="{Binding SimPeakPowerChange}" />
                                                </DynamicDataSource>
                                            </DynamicData.Data>
                                        </Control>
                                        <FZMaterial
                                        Style="{StaticResource A_Style_FZMaterial_RowSeparator}" />
                                        <Control Style="{StaticResource A_Style_TemplatedElement_Row_CarStat_Numeric}">
                                            <DynamicData.Data>
                                                <DynamicDataSource>
                                                    <DynamicDataItem
                                                    Name="CarStatLabel"
                                                    DataType="String"
                                                    Value="{Loc CarFlow.IDS_Stat_Torque}" />
                                                    <DynamicDataItem
                                                    Name="CarStatPrevious"
                                                    DataType="String"
                                                    Value="{Binding Current.SimPeakTorque, ConverterParameter=torque, FallbackValue=?, Converter={StaticResource A_LoadSaveTuning_NumUnitConverter_CarStat}}" />
                                                    <DynamicDataItem
                                                    Name="CarStatNew"
                                                    DataType="String"
                                                    Value="{Binding Upgraded.SimPeakTorque, ConverterParameter=torque, FallbackValue=?, Converter={StaticResource A_LoadSaveTuning_NumUnitConverter_CarStat}}" />
                                                    <DynamicDataItem
                                                    Name="CarStatChange"
                                                    DataType="Int32"
                                                    Value="{Binding SimPeakTorqueChange}" />
                                                </DynamicDataSource>
                                            </DynamicData.Data>
                                        </Control>
                                        <FZMaterial Style="{StaticResource A_Style_FZMaterial_RowSeparator}"/>
                                        <Control Style="{StaticResource A_Style_TemplatedElement_Row_CarStat_Numeric}">
                                            <DynamicData.Data>
                                                <DynamicDataSource>
                                                    <DynamicDataItem
                                                    Name="CarStatLabel"
                                                    DataType="String"
                                                    Value="{Loc CarFlow.IDS_Stat_Weight}" />
                                                    <DynamicDataItem
                                                    Name="CarStatPrevious"
                                                    DataType="String"
                                                    Value="{Binding Current.CurbWeight, ConverterParameter=mass, FallbackValue=?, Converter={StaticResource A_LoadSaveTuning_NumUnitConverter_CarStat}}" />
                                                    <DynamicDataItem
                                                    Name="CarStatNew"
                                                    DataType="String"
                                                    Value="{Binding Upgraded.CurbWeight, ConverterParameter=mass, FallbackValue=?, Converter={StaticResource A_LoadSaveTuning_NumUnitConverter_CarStat}}" />
                                                    <DynamicDataItem
                                                    Name="CarStatChange"
                                                    DataType="Int32"
                                                    Value="{Binding CurbWeightChange}" />
                                                </DynamicDataSource>
                                            </DynamicData.Data>
                                        </Control>
                                        <FZMaterial Style="{StaticResource A_Style_FZMaterial_RowSeparator}" />
                                        <Control Style="{StaticResource A_Style_TemplatedElement_Row_CarStat_Numeric}">
                                            <DynamicData.Data>
                                                <DynamicDataSource>
                                                    <DynamicDataItem
                                                    Name="CarStatLabel"
                                                    DataType="String"
                                                    Value="{Loc CarFlow.IDS_Stat_PowerToWeight}" />
                                                    <DynamicDataItem
                                                    Name="CarStatPrevious"
                                                    DataType="String"
                                                    Value="{Binding CurrentTuneBenchmark.PowerToWeight,RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" />
                                                    <DynamicDataItem
                                                    Name="CarStatNew"
                                                    DataType="String"
                                                    Value="{Binding CompareTuneBenchmark.PowerToWeight, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" />
                                                    <DynamicDataItem
                                                    Name="CarStatChange"
                                                    DataType="Int32"
                                                    Value="{Binding PowerToWeightChange, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" />
                                                </DynamicDataSource>
                                            </DynamicData.Data>
                                        </Control>
                                        <FZMaterial Style="{StaticResource A_Style_FZMaterial_RowSeparator}" />
                                        <Control Style="{StaticResource A_Style_TemplatedElement_Row_CarStat_Numeric}">
                                            <DynamicData.Data>
                                                <DynamicDataSource>
                                                    <DynamicDataItem
                                                    Name="CarStatLabel"
                                                    DataType="String"
                                                    Value="{Loc CarFlow.IDS_Stat_LateralGs}" />
                                                    <DynamicDataItem
                                                    Name="CarStatPrevious"
                                                    DataType="String"
                                                    Value="{Binding CurrentTuneBenchmark.LatG60Stat, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" />
                                                    <DynamicDataItem
                                                    Name="CarStatNew"
                                                    DataType="String"
                                                    Value="{Binding CompareTuneBenchmark.LatG60Stat, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" />
                                                    <DynamicDataItem
                                                    Name="CarStatChange"
                                                    DataType="Int32"
                                                    Value="{Binding LateralGsChange, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" />
                                                </DynamicDataSource>
                                            </DynamicData.Data>
                                        </Control>
                                        <FZMaterial Style="{StaticResource A_Style_FZMaterial_RowSeparator}" />

                                        <Control Style="{StaticResource A_Style_TemplatedElement_Row_CarStat_Numeric}">
                                            <DynamicData.Data>
                                                <DynamicDataSource>
                                                    <DynamicDataItem
                                                    Name="CarStatLabel"
                                                    DataType="String"
                                                    Value="{Loc CarFlow.IDS_Stat_AeroEfficiency}" />
                                                    <DynamicDataItem
                                                    Name="CarStatPrevious"
                                                    DataType="String"
                                                    Value="{Binding CurrentTuneBenchmark.AeroEfficiency, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" />
                                                    <DynamicDataItem
                                                    Name="CarStatNew"
                                                    DataType="String"
                                                    Value="{Binding CompareTuneBenchmark.AeroEfficiency, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" />
                                                    <DynamicDataItem
                                                    Name="CarStatChange"
                                                    DataType="Int32"
                                                    Value="{Binding AeroEfficiency, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" />
                                                </DynamicDataSource>
                                            </DynamicData.Data>
                                        </Control>
                                        <FZMaterial Style="{StaticResource A_Style_FZMaterial_RowSeparator}" />

                                        <Control Style="{StaticResource A_Style_TemplatedElement_Row_CarStat_Numeric}">
                                            <DynamicData.Data>
                                                <DynamicDataSource>
                                                    <DynamicDataItem
                                                    Name="CarStatLabel"
                                                    DataType="String"
                                                    Value="{Loc CarFlow.IDS_Stat_AeroBalance}" />
                                                    <DynamicDataItem
                                                    Name="CarStatPrevious"
                                                    DataType="String"
                                                    Value="{Binding CurrentTuneBenchmark.AeroBalance, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" />
                                                    <DynamicDataItem
                                                    Name="CarStatNew"
                                                    DataType="String"
                                                    Value="{Binding CompareTuneBenchmark.AeroBalance, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" />
                                                    <DynamicDataItem
                                                    Name="CarStatChange"
                                                    DataType="Int32"
                                                    Value="{Binding AeroBalance, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" />
                                                </DynamicDataSource>
                                            </DynamicData.Data>
                                        </Control>
                                        <FZMaterial Style="{StaticResource A_Style_FZMaterial_RowSeparator}" />

                                        <Control Style="{StaticResource A_Style_TemplatedElement_Row_CarStat_Numeric}">
                                            <DynamicData.Data>
                                                <DynamicDataSource>
                                                    <DynamicDataItem
                                                    Name="CarStatLabel"
                                                    DataType="String"
                                                    Value="{Loc CarFlow.IDS_Stat_RoadBalance}" />
                                                    <DynamicDataItem
                                                    Name="CarStatPrevious"
                                                    DataType="String"
                                                    Value="{Binding CurrentTuneBenchmark.RoadBalance, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" />
                                                    <DynamicDataItem
                                                    Name="CarStatNew"
                                                    DataType="String"
                                                    Value="{Binding CompareTuneBenchmark.RoadBalance, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" />
                                                    <DynamicDataItem
                                                    Name="CarStatChange"
                                                    DataType="Int32"
                                                    Value="{Binding RoadBalance, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" />
                                                </DynamicDataSource>
                                            </DynamicData.Data>
                                        </Control>
                                        <FZMaterial Style="{StaticResource A_Style_FZMaterial_RowSeparator}" />

                                        <Control Style="{StaticResource A_Style_TemplatedElement_Row_CarStat_Numeric}">
                                            <DynamicData.Data>
                                                <DynamicDataSource>
                                                    <DynamicDataItem
                                                    Name="CarStatLabel"
                                                    DataType="String"
                                                    Value="{Loc CarFlow.IDS_Stat_Suspension}" />
                                                    <DynamicDataItem
                                                    Name="CarStatPrevious"
                                                    DataType="String"
                                                    Value="{Binding CurrentTuneSuspension, ConverterParameter=text, FallbackValue=?, Converter={StaticResource H_Converter_SuspensionToShortText}, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" />
                                                    <DynamicDataItem
                                                    Name="CarStatNew"
                                                    DataType="String"
                                                    Value="{Binding CompareTuneSuspension, ConverterParameter=text, FallbackValue=?, Converter={StaticResource H_Converter_SuspensionToShortText}, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" />
                                                </DynamicDataSource>
                                            </DynamicData.Data>
                                        </Control>
                                        <FZMaterial Style="{StaticResource A_Style_FZMaterial_RowSeparator}"/>
                                        <Control Style="{StaticResource A_Style_TemplatedElement_Row_CarStat_Textual}">
                                            <DynamicData.Data>
                                                <DynamicDataSource>
                                                    <DynamicDataItem
                                                    Name="CarStatLabel"
                                                    DataType="String"
                                                    Value="{Loc CarFlow.IDS_Stat_TyreCompound}" />
                                                    <DynamicDataItem 
                                                    Name="CarStatIconPrevious" 
                                                    DataType="String" 
                                                    Value="{Binding CurrentTuneTyreCompound, ConverterParameter=text, Converter={StaticResource H_Converter_TyreLevelToIcon}, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" />
                                                    <DynamicDataItem 
                                                    Name="CarStatIconNew" 
                                                    DataType="String"
                                                    Value="{Binding CompareTuneTyreCompound, ConverterParameter=text, Converter={StaticResource H_Converter_TyreLevelToIcon}, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" />
                                                    <DynamicDataItem
                                                    Name="CarStatPrevious"
                                                    DataType="String"
                                                    Value="{Binding CurrentTuneTyreCompound, ConverterParameter=text, FallbackValue=?, Converter={StaticResource PART_H_Converter_TyreToShortText}, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" />
                                                    <DynamicDataItem
                                                    Name="CarStatNew"
                                                    DataType="String"
                                                    Value="{Binding CompareTuneTyreCompound, ConverterParameter=text, FallbackValue=?, Converter={StaticResource PART_H_Converter_TyreToShortText}, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" />
                                                </DynamicDataSource>
                                            </DynamicData.Data>
                                        </Control>
                                        <FZMaterial Style="{StaticResource A_Style_FZMaterial_RowSeparator}"/>
                                        <Control Style="{StaticResource A_Style_TemplatedElement_Row_CarStat_Icons}">
                                            <Control.Resources>
                                                <Style x:Key="A_Style_Control_CarStat_Icon" 
                                                   TargetType="{Type Control}">
                                                    <Setter Property="Template" Value="{StaticResource A_ControlTemplate_DriveTrainDisplay}"/>
                                                </Style>
                                            </Control.Resources>
                                            <DynamicData.Data>
                                                <DynamicDataSource>
                                                    <DynamicDataItem
                                                    Name="CarStatLabel"
                                                    DataType="String"
                                                    Value="{Loc CarFlow.IDS_Stat_Drivetrain}" />
                                                    <DynamicDataItem
                                                    Name="CarStatPrevious"
                                                    DataType="Int32"
                                                    Value="{Binding Current.PowertrainID}" />
                                                    <DynamicDataItem
                                                    Name="CarStatNew"
                                                    DataType="Int32"
                                                    Value="{Binding Upgraded.PowertrainID}" />
                                                </DynamicDataSource>
                                            </DynamicData.Data>
                                        </Control>
                                    </StackPanel>
                                </Grid>
                            </FZMaterial>
                        </FZScrollViewer>
                    </DockPanel>
                </StackPanel>
                <WrapListBox
                    x:Name="PART_ItemList"
                    ItemsSource="{Binding ItemsCollection}"
                    Style="{StaticResource H_Style_Carousel_Square_10Items}"
                    BindingProxy.A="{x:Null}"
                    SelectedIndex="0"
                    Width="1716"
                    SelectionLimitTop="156"
                    ItemContainerStyle="{StaticResource A_Style_ContentControl_Carousel_ContainerStyle_Tunings}"
                    ItemTemplate="{StaticResource A_DataTemplate_Carousel_SimpleCarItem_Tuning}" 
                    EmptyItemStyle="{StaticResource H_Style_Control_UpgradeGrid_EmptyItemStyle}">
                    <WrapListBox.Resources>
                        <ResourceDictionary>
                            <Color x:Key="A_Color_Stat_Neutral_Light">#FF969696</Color>
                            <ColorAlias x:Key="A_Color_Stat_Neutral" Color="{StaticResource H_Color_Primary_White}" />
                        </ResourceDictionary>
                    </WrapListBox.Resources>
                </WrapListBox>
            </StackPanel>
        </Border>
    </Grid>
</PopupLoadSaveTuneCuration>