<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:System="clr-namespace:System;assembly=mscorlib"
                    xmlns:local="clr-namespace:ForzaUI"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <Color x:Key="A_Color_List_King_Background_LeaderBoards">#FFFFF200</Color>
    <Color x:Key="A_Color_Trophy_Gold">#FFFFDE39</Color>
    <Color x:Key="A_Color_Trophy_Silver">#FFDBDBDB</Color>
    <Color x:Key="A_Color_Trophy_Bronze">#FFDB9865</Color>

    <System:Double x:Key="A_Size_ColumnWidthPopoutIcon">48</System:Double>

    <Margin x:Key="A_Margin_Prestige_Info">1,0,11,0</Margin>
    <System:Double x:Key="A_Double_PrestigeIcon_Width">30</System:Double>
    <System:Double x:Key="A_Double_PrestigeIcon_Height">30</System:Double>

    <local:MappingConverter x:Key="A_Converter_VisibilityToBool" Default="{StaticResource A_Boolean_False}">
        <local:MappingConverterEntry Key="{x:Static Visibility.Visible}" Value="{StaticResource A_Boolean_True}" />
    </local:MappingConverter>
    <local:MappingConverter x:Key="A_Converter_VisibilityToBool_Inverse" Default="{StaticResource A_Boolean_True}">
        <local:MappingConverterEntry Key="{x:Static Visibility.Visible}" Value="{StaticResource A_Boolean_False}" />
    </local:MappingConverter>
    
    <Style x:Key="A_Style_FZMaterial_FlatPanel_LeaderboardHeader"
        TargetType="{Type local:FZMaterial}"
        BasedOn="{StaticResource A_Style_FZMaterial_FlatPanel_Base}">
        <Setter
            Property="Color"
            Value="{StaticResource H_Color_Primary_Green}" />
    </Style>

    <Style
        x:Key="A_Style_FZMaterial_GlassPanel_PositionBox"
        TargetType="{Type local:FZMaterial}"
        BasedOn="{StaticResource A_Style_FZMaterial_GlassPanel_NonInteractive}">
    </Style>


    <Style x:Key="A_Style_FZMaterial_LeaderboardRow_Selected" TargetType="local:FZMaterial"
           BasedOn="{StaticResource A_Style_FZMaterial_FlatPanel_Base}" >
        <Setter Property="Color" Value="{StaticResource H_Color_HighlightedItemBg}" />
        <Setter Property="RenderTransformOrigin" Value="0.5,0.5" />
        <Setter Property="RenderTransform">
            <Setter.Value>
                <TransformGroup>
                    <ScaleTransform />
                    <SkewTransform />
                    <RotateTransform />
                    <TranslateTransform />
                </TransformGroup>
            </Setter.Value>
        </Setter>
    </Style>

    <Style
        x:Key="A_Style_LeaderboardRow_EmptyItemStyle"
        TargetType="{Type local:FZMaterial}">
        <Setter
            Property="Focusable"
            Value="False" />
        <Setter
            Property="Height"
            Value="50" />
        <Setter
            Property="Margin"
            Value="0,0,0,4" />
        <Setter
            Property="Color"
            Value="{StaticResource H_Color_Glass_Purple_40pc}" />
        <Setter
            Property="Preset"
            Value="{StaticResource H_Roundtangle_Outer_2px}" />
    </Style>

    <Style x:Key="A_Style_FZMaterial_LeaderboardRow_FinishedStateBox" TargetType="local:FZMaterial"
       BasedOn="{StaticResource A_Style_FZMaterial_FlatPanel_Tile}">
        <Setter Property="Color" Value="{StaticResource H_Color_Glass_Purple_40pc}" />
        <Setter Property="Preset" Value="{StaticResource H_Roundtangle_Outer_2px}"/>
        <Setter Property="Opacity" Value="0.25"/>
        <Setter Property="Width" Value="{StaticResource A_Size_ColumnWidthPopoutIcon}" />
        <Setter Property="HorizontalAlignment" Value="Right" />
        <Setter Property="Margin" Value="0,0,3,0"/>
        <Style.Triggers>
            <DataTrigger Binding="{Binding EventStatus}" Value="{x:Static local:EventStatus.Finished}">
                <Setter Property="Opacity" Value="1.0"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding EventStatus}" Value="{x:Static local:EventStatus.DNF}">
                <Setter Property="Opacity" Value="1.0"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding EventStatus}" Value="{x:Static local:EventStatus.Quit}">
                <Setter Property="Opacity" Value="1.0"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding EventStatus}" Value="{x:Static local:EventStatus.OpposingTeamDisconnect}">
                <Setter Property="Opacity" Value="1.0"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <ControlTemplate x:Key="A_ControlTemplate_EmptyLeaderboard_Slots" TargetType="Control">
        <ControlTemplate.Resources>
            <Style x:Key="A_Style_FZMaterial_EmptyBox" TargetType="FZMaterial"
                BasedOn="{StaticResource A_Style_FZMaterial_GlassPanel_PositionBox}">
                <Setter Property="Width" Value="{StaticResource A_Size_ColumnWidthPopoutIcon}"/>
                <Setter Property="Height" Value="50"/>
                <Setter Property="VerticalAlignment" Value="Top"/>
                <Setter Property="Preset" Value="{StaticResource H_Roundtangle_Outer_2px}"/>
                <Setter Property="Visibility" Value="Hidden"/>
            </Style>
        </ControlTemplate.Resources>
        <DockPanel>
            <StackPanel Margin="-102,0,0,0"
                        Orientation="Horizontal">
                <FZMaterial x:Name="EmptyPositionBox"
                            Style="{StaticResource A_Style_FZMaterial_EmptyBox}"/>
                <Decorator Width="3"/>
                <FZMaterial x:Name="EmptyPositionBox_1"
                            Style="{StaticResource A_Style_FZMaterial_EmptyBox}"/>
            </StackPanel>
            <FZMaterial Style="{StaticResource A_Style_LeaderboardRow_EmptyItemStyle}"/>
        </DockPanel>
        <ControlTemplate.Triggers>
            <DataTrigger Binding="{Binding ShowPosition, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True">
                <Setter TargetName="EmptyPositionBox_1" Property="Visibility" Value="Visible"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding ShowPlayerIcon, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True">
                <Setter TargetName="EmptyPositionBox_1" Property="Visibility" Value="Visible"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding ShowPosDelta, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True">
                <Setter TargetName="EmptyPositionBox_1" Property="Visibility" Value="Visible"/>
            </DataTrigger> 
            <DataTrigger Binding="{Binding ShowTeams, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True">
                <Setter TargetName="EmptyPositionBox_1" Property="Visibility" Value="Visible"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding ShowFinishedStatus, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True">
                <Setter TargetName="EmptyPositionBox" Property="Visibility" Value="Visible"/>
            </DataTrigger>

            <!-- If there is no AncestorType of PlayerListControl then we show the position box. Used in Map leaderboards -->
            <DataTrigger Binding="{Binding Visibility, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}, Converter={StaticResource A_Converter_VisibilityToBool}, FallbackValue={StaticResource A_Boolean_False}}" Value="False">
                <Setter TargetName="EmptyPositionBox_1" Property="Visibility" Value="Visible"/>
            </DataTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <Style x:Key="A_Style_FZMaterial_LeaderboardRow_PositionBox" TargetType="local:FZMaterial"
           BasedOn="{StaticResource A_Style_FZMaterial_GlassPanel_PositionBox}">
        <Setter Property="Color" Value="{StaticResource H_Color_Glass_Purple_40pc}" />
        <Setter Property="Preset" Value="{StaticResource H_Roundtangle_Outer_2px}"/>
        <Setter Property="Width" Value="{StaticResource A_Size_ColumnWidthPopoutIcon}" />
        <Setter Property="Tag" Value="NoCustomColor" />
        <Style.Triggers>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource AncestorType=ListBoxItem}}" Value="True"/>
                    <Condition Binding="{Binding ShowPosition, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}, FallbackValue={StaticResource A_Boolean_True}}" 
                               Value="True"/>
                </MultiDataTrigger.Conditions>
                <Setter Property="Color" Value="{StaticResource H_Color_Primary_White}" />
            </MultiDataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding IsIt}" Value="True" />
                    <Condition Binding="{Binding ShowKing, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True" />
                </MultiDataTrigger.Conditions>
                <Setter Property="Color" Value="{StaticResource A_Color_List_King_Background_LeaderBoards}"/>
                <Setter Property="Tag" Value="CustomColor" />
            </MultiDataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding InOnlineGame}" Value="True" />
                    <Condition Binding="{Binding IsIt}" Value="True" />
                    <Condition Binding="{Binding ShowInfected, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True" />
                </MultiDataTrigger.Conditions>
                <Setter Property="Color" Value="{StaticResource A_Color_List_Infected_Background}"/>
                <Setter Property="Tag" Value="CustomColor" />
            </MultiDataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding InOnlineGame}" Value="True" />
                    <Condition Binding="{Binding IsIt}" Value="False" />
                    <Condition Binding="{Binding ShowInfected, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True" />
                </MultiDataTrigger.Conditions>
                <Setter Property="Color" Value="{StaticResource A_Color_List_Survivor_Background}"/>
                <Setter Property="Tag" Value="CustomColor" />
            </MultiDataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding InOnlineGame}" Value="True" />
                    <Condition Binding="{Binding Team}" Value="0" />
                    <Condition Binding="{Binding ShowTeams, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True" />
                </MultiDataTrigger.Conditions>
                <Setter Property="Color" Value="{StaticResource A_Color_List_TeamA_Background}"/>
                <Setter Property="Tag" Value="CustomColor" />
            </MultiDataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding InOnlineGame}" Value="True" />
                    <Condition Binding="{Binding Team}" Value="1" />
                    <Condition Binding="{Binding ShowTeams, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True" />
                </MultiDataTrigger.Conditions>
                <Setter Property="Color" Value="{StaticResource A_Color_List_TeamB_Background}"/>
                <Setter Property="Tag" Value="CustomColor" />
            </MultiDataTrigger>
        </Style.Triggers>
    </Style>


    <Style x:Key="A_Style_FZMaterial_LeaderboardRow" TargetType="local:FZMaterial"
           BasedOn="{StaticResource A_Style_FZMaterial_FlatPanel_Tile}" >
        <Setter Property="RenderTransformOrigin" Value="0.5,0.5" />
        <Setter Property="RenderTransform">
            <Setter.Value>
                <TransformGroup>
                    <ScaleTransform />
                    <SkewTransform />
                    <RotateTransform />
                    <TranslateTransform />
                </TransformGroup>
            </Setter.Value>
        </Setter>  
    </Style>

    <Style x:Key="A_Style_FZMaterial_LeaderboardRowContent" TargetType="Grid">
        <Setter Property="RenderTransformOrigin" Value="0.5,0.5" />
        <Setter Property="RenderTransform">
            <Setter.Value>
                <TransformGroup>
                    <ScaleTransform />
                    <SkewTransform />
                    <RotateTransform />
                    <TranslateTransform />
                </TransformGroup>
            </Setter.Value>
        </Setter>
    </Style>



    <Style x:Key="A_Style_FZMaterial_InstructionPanelBackground" TargetType="local:FZMaterial"
            BasedOn="{StaticResource A_Style_FZMaterial_GlassPanel_NonInteractive}">
    </Style>

    <Style x:Key="A_Style_FZMaterial_InstructionPanelBackgroundLast" TargetType="local:FZMaterial"
            BasedOn="{StaticResource A_Style_FZMaterial_GlassPanel_BodyPanel}">
        <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetGlassRoundtangle_GlassPanel_Base}"/>
    </Style>


    <Style x:Key="A_Style_Run_Markup_1" TargetType="local:FZRun">
        <Setter Property="FontFamily" Value="Horizon_B" />
    </Style>

    <Style x:Key="A_Style_Run_Markup_2" TargetType="local:FZRun">
        <Setter Property="FontFamily" Value="Horizon_A" />
    </Style>

    <MappingConverter x:Key="A_MappingConverter_TopPosition" >
        <MappingConverterEntry Key="{NoCase 1}" Value="{StaticResource A_Style_Run_Markup_1}" />
        <MappingConverterEntry Key="{NoCase 2}" Value="{StaticResource A_Style_Run_Markup_2}" />
    </MappingConverter>

    <Style x:Key="A_Style_FZMaterial_PrestigeIcon_Leaderboard"
           BasedOn="{StaticResource A_Style_FZMaterial_PrestigeIcon}"
           TargetType="{x:Type local:FZMaterial}">
    </Style>

    <Style x:Key="A_Style_FZTextBlock_PrestigeLevel_Leaderboard"
           BasedOn="{StaticResource A_Style_FZTextBlock_PrestigeLevel}"
           TargetType="{x:Type local:FZTextBlock}">
        <Setter Property="Margin" Value="0,1,0,0"/>
    </Style>

    <ControlTemplate x:Key="A_ControlTemplate_ScrollViewer_Leaderboard" TargetType="ScrollViewer">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>

            <ScrollBar x:Name="PART_VerticalScrollBar"
                       Style="{StaticResource A_Style_ScrollBar_Default}"
                       Grid.Column="0" Grid.Row="1"
                       HorizontalAlignment="Right"
                       Minimum="0"
                       Margin="0,0,10,0"
                       Maximum="{TemplateBinding ScrollViewer.ScrollableHeight}"
                       ViewportSize="{TemplateBinding ScrollViewer.ViewportHeight}"
                       Value="{Binding Path=VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource Mode=TemplatedParent}}"
                       Visibility="{TemplateBinding ScrollViewer.ComputedVerticalScrollBarVisibility}" />

            <ScrollContentPresenter x:Name="PART_ScrollContentPresenter"
                                    Content="{TemplateBinding Content}"
                                    CanContentScroll="{TemplateBinding ScrollViewer.CanContentScroll}"
                                    Grid.Row="1"/>
        </Grid>
    </ControlTemplate>

    <Style x:Key="A_Style_ListBoxItem_LeaderboardBase"
           TargetType="ListBoxItem"
           BasedOn="{StaticResource A_Style_ListBoxItem_DriverList}">
        <Setter Property="local:FocusOnMouseOverBehaviour.Self"
                Value="True"/>
        <Style.Triggers>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
                <Setter Property="IsSelected" Value="True" />
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="A_Style_CommonListBox_Leaderboard"
           TargetType="{x:Type local:CommonListBox}">
        <Setter Property="OverridesDefaultStyle"  Value="True" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="local:FZScrollViewer.IsAtTop" Value="True" />
        <Setter Property="local:FZScrollViewer.IsAtBottom" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:CommonListBox}">
                    <Decorator ClipToBounds="True" Margin="-140,0,-30,0">
                        <StackPanel Margin="90,0,30,0">
                            <local:FZScrollViewer Template="{StaticResource A_ControlTemplate_ScrollViewer_Leaderboard}"
                                                Focusable="False"
                                                HorizontalScrollBarVisibility="Disabled"
                                                VerticalScrollBarVisibility="Auto"
                                                VerticalAlignment="Stretch"
                                                CanContentScroll="True"
												DragMovementMultiplier="0.03"
                                                local:FZScrollViewer.IsAtTop="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(local:FZScrollViewer.IsAtTop), Mode=OneWayToSource}"
                                                local:FZScrollViewer.IsAtBottom="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(local:FZScrollViewer.IsAtBottom), Mode=OneWayToSource}"
                                                KeepSelectionOnScreen="True"
                                                Margin="-90,0,-30,0">
                                <VirtualizingStackPanel Orientation="Vertical"
                                                        VirtualizingStackPanel.VirtualizationMode="Recycling"
                                                        IsItemsHost="True"
                                                        MaxHeight="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=MaxHeight}"
                                                        Margin="140,0,30,0"/>
                            </local:FZScrollViewer>

                            <StackPanel Margin="50,0,0,0"
                                        Panel.ZIndex="-1">
                                <Control Template="{StaticResource A_ControlTemplate_EmptyLeaderboard_Slots}"/>
                                <Control Template="{StaticResource A_ControlTemplate_EmptyLeaderboard_Slots}"/>
                                <Control Template="{StaticResource A_ControlTemplate_EmptyLeaderboard_Slots}"/>
                                <Control Template="{StaticResource A_ControlTemplate_EmptyLeaderboard_Slots}"/>
                                <Control Template="{StaticResource A_ControlTemplate_EmptyLeaderboard_Slots}"/>
                                <Control Template="{StaticResource A_ControlTemplate_EmptyLeaderboard_Slots}"/>
                                <Control Template="{StaticResource A_ControlTemplate_EmptyLeaderboard_Slots}"/>
                                <Control Template="{StaticResource A_ControlTemplate_EmptyLeaderboard_Slots}"/>
                                <Control Template="{StaticResource A_ControlTemplate_EmptyLeaderboard_Slots}"/>
                                <Control Template="{StaticResource A_ControlTemplate_EmptyLeaderboard_Slots}"/>
                                <Control Template="{StaticResource A_ControlTemplate_EmptyLeaderboard_Slots}"/>
                            </StackPanel>
                        </StackPanel>
                    </Decorator>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <local:NumUnitConverter x:Key="A_Converter_NumUnitConverter_Position" MinDigits="2" FractionDigits="0" />

    <ControlTemplate x:Key="A_ControlTemplate_ContentControl_SelectableRow" TargetType="ContentControl">
        <Grid x:Name="SelectableRowParent">
            <local:RoutedEventCommand x:Name="SelectRowRoutedEventCommand"
                                      RoutedEvent="UIElement.MouseLeftButtonUp"
                                      Command="{Binding SelectCommand, RelativeSource={RelativeSource AncestorType=Page}}" />
            <local:FZMaterial x:Name="DropShadow"
                                  Style="{StaticResource A_Style_FZMaterial_TextMenuItemShadow}"
                                  IsHitTestVisible="False"
                                  Visibility="Hidden"/>
            <Grid HorizontalAlignment="Left" RenderTransformOrigin="0,0">
                <Grid.RenderTransform>
                    <ScaleTransform ScaleX="-1"/>
                </Grid.RenderTransform>
                <Grid MinWidth="48" MaxWidth="130" RenderTransformOrigin="0.5,0.5" Margin="3,0,0,0">
                    <Grid.RenderTransform>
                        <ScaleTransform ScaleX="-1"/>
                    </Grid.RenderTransform>
                    <local:FZMaterial x:Name="PositionBox" Style="{StaticResource A_Style_FZMaterial_LeaderboardRow_PositionBox}" Margin="0" Width="auto">
                        <ContentControl Template="{StaticResource A_ControlTemplate_Cell_Position}" HorizontalAlignment="Center" />
                    </local:FZMaterial>
                </Grid>
            </Grid>


            <Grid x:Name="RowContent" Style="{StaticResource A_Style_FZMaterial_LeaderboardRowContent}">
                <StrokeHighlightControl x:Name="FocusHighlight"
                            Style="{StaticResource H_Style_StrokeHighlight_Instant_TextMenu}"
                            IsEnabled="{Binding (Selector.IsSelected), FallbackValue=False, RelativeSource={RelativeSource AncestorType=ListBoxItem}}"/>
                <local:FZMaterial x:Name="RowContentBackground" Style="{StaticResource A_Style_FZMaterial_LeaderboardRow}" />
                <ContentPresenter VerticalAlignment="Center"/>
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <DataTrigger Binding="{Binding IsSelected, RelativeSource={RelativeSource AncestorType=ListBoxItem}}" Value="True">
                <Setter Property="Visibility" TargetName="DropShadow" Value="Visible" />
                <Setter TargetName="RowContentBackground" Property="Style" Value="{StaticResource A_Style_FZMaterial_LeaderboardRow_Selected}" />
                <DataTrigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource A_Storyboard_LeaderboardItem_Selected}"/>
                </DataTrigger.EnterActions>
                <DataTrigger.ExitActions>
                    <BeginStoryboard Storyboard="{StaticResource A_Storyboard_LeaderboardItem_Unselected}"/>
                </DataTrigger.ExitActions>
            </DataTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <Style x:Key="A_Style_ContentControl_SelectableRow" TargetType="ContentControl">
        <Setter Property="Template" Value="{StaticResource A_ControlTemplate_ContentControl_SelectableRow}"/>
        <Setter Property="RenderTransformOrigin" Value="0.5,0.5" />
        <Setter Property="RenderTransform">
            <Setter.Value>
                <TransformGroup>
                    <ScaleTransform />
                    <SkewTransform />
                    <RotateTransform />
                    <TranslateTransform />
                </TransformGroup>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Footer Stuff -->
    <ControlTemplate x:Key="A_ControlTemplate_FooterRow_Filter">
        <StackPanel Orientation="Horizontal">
            <local:FZTextBlock Text="{local:Loc Rivals.IDS_Filter}"
                               Style="{StaticResource A_Style_FZTextBlock_HorizonB}"
                               FontSize="{StaticResource A_FontSize_Cell}"
                               Color="{StaticResource A_Color_Header_Text}" />
            <local:FZTextBlock Text="{Binding FilterName}"
                               Style="{StaticResource A_Style_FZTextBlock_HorizonA}"
                               FontSize="{StaticResource A_FontSize_Cell}"
                               Color="{StaticResource A_Color_Header_Text}" Margin="8, 0, 0, 0" />
        </StackPanel>
    </ControlTemplate>

    <MappingConverter x:Key="A_MappingConverter_UICarClass_To_String">
        <MappingConverterEntry Key="{x:Static AVUICarClass.Class_Any}" Value="{locacl:Loc Scoreboard.IDS_Class_Any_Short}"/>
        <MappingConverterEntry Key="{x:Static AVUICarClass.Class_X}" Value="{locacl:Loc Scoreboard.IDS_Class_X_Short}"/>
        <MappingConverterEntry Key="{x:Static AVUICarClass.Class_R}" Value="{locacl:Loc Scoreboard.IDS_Class_R_Short}"/>
        <MappingConverterEntry Key="{x:Static AVUICarClass.Class_S2}" Value="{locacl:Loc Scoreboard.IDS_Class_S2_Short}"/>
        <MappingConverterEntry Key="{x:Static AVUICarClass.Class_S}" Value="{locacl:Loc Scoreboard.IDS_Class_S_Short}"/>
        <MappingConverterEntry Key="{x:Static AVUICarClass.Class_A}" Value="{locacl:Loc Scoreboard.IDS_Class_A_Short}"/>
        <MappingConverterEntry Key="{x:Static AVUICarClass.Class_B}" Value="{locacl:Loc Scoreboard.IDS_Class_B_Short}"/>
        <MappingConverterEntry Key="{x:Static AVUICarClass.Class_C}" Value="{locacl:Loc Scoreboard.IDS_Class_C_Short}"/>
        <MappingConverterEntry Key="{x:Static AVUICarClass.Class_D}" Value="{locacl:Loc Scoreboard.IDS_Class_D_Short}"/>
    </MappingConverter>

    <ControlTemplate x:Key="A_ControlTemplate_FooterRow_SelectedPIClass">
        <StackPanel Orientation="Horizontal" Visibility="{Binding HasPIClassLeaderboard, Converter={StaticResource A_FZBooleanToVisibilityConverter}}">
            <local:FZTextBlock Text="{local:Loc Scoreboard.IDS_SelectedClass}"
                           Style="{StaticResource A_Style_FZTextBlock_HorizonB}"
                           FontSize="{StaticResource A_FontSize_Cell}"
                           Color="{StaticResource A_Color_Header_Text}" />
            <local:FZTextBlock Text="{Binding SelectedCarClass, Converter={StaticResource A_MappingConverter_UICarClass_To_String}}"
                           Style="{StaticResource A_Style_FZTextBlock_HorizonA}"
                           FontSize="{StaticResource A_FontSize_Cell}"
                           Color="{StaticResource A_Color_Header_Text}"
                           Margin="8, 0, 0, 0" />
        </StackPanel>
    </ControlTemplate>

    <ControlTemplate x:Key="A_ControlTemplate_FooterRow_Default" TargetType="Control">
        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_FlatPanel_HeaderPill_Green}">
            <Grid>
                <StackPanel Orientation="Horizontal">
                    <ContentControl Style="{StaticResource A_Style_Cell}" Template="{StaticResource A_ControlTemplate_FooterRow_Filter}" Width="Auto" />
                    <ContentControl Style="{StaticResource A_Style_Cell}" Template="{StaticResource A_ControlTemplate_FooterRow_SelectedPIClass}" Width="Auto" Margin="8,0,0,0"/>
                </StackPanel>
                <ContentControl Style="{StaticResource A_Style_Cell}" Template="{StaticResource A_ControlTemplate_FooterRow_TopPosition}" Width="Auto" HorizontalAlignment="Right" />
            </Grid>
        </local:FZMaterial>
    </ControlTemplate>

    <!-- Formatted Position -->
    <!-- E.g. "YOU ARE IN THE TOP 10% OF 100 PLAYERS" -->
    <ControlTemplate x:Key="A_ControlTemplate_FooterRow_TopPosition">
        <StackPanel Orientation="Horizontal">
            <local:FZTextBlock Margin="8, 0, 0, 0"
                               Style="{StaticResource A_Style_FZTextBlock_HorizonB}"
                               FontSize="{StaticResource A_FontSize_Cell}"
                               Color="{StaticResource A_Color_Header_Text}"
                               Text="{Binding FormattedPosition}"
                               MarkupConverter="{StaticResource A_MappingConverter_TopPosition}" />
        </StackPanel>
    </ControlTemplate>

    <!-- Cell Templates -->

    <ControlTemplate x:Key="A_ControlTemplate_Cell_Position" TargetType="Control">
        <local:FZTextBlock x:Name="PositionText"
                            Text="{Binding Position, Converter={StaticResource A_Converter_NumUnitConverter_Position}}"
                            Style="{StaticResource A_Style_FZTextBlock_DriverListPosition}"
                            Margin="5,0"/>
    </ControlTemplate>

    <Style x:Key="A_Style_Material_DrivatarIcon_PlayerList" TargetType="{x:Type FZMaterial}">
        <Setter Property="ImageSource" Value="{StaticResource A_BitmapImage_Lobby_Drivatar}"/>
        <Setter Property="Color" Value="{StaticResource H_Color_Primary_Grey_80pc}"/>
        <Setter Property="Width" Value="32"/>
        <Setter Property="Height" Value="32"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="HorizontalAlignment" Value="Center"/>
    </Style>
    
    <ControlTemplate x:Key="A_ControlTemplate_Cell_DriverLevel">
        <Grid>
            <FZMaterial x:Name="DriverLevelFocusHighlight" 
                        Color="{StaticResource H_Color_Primary_White}" 
                        Width="71" 
                        Height="36"
                        Visibility="Hidden">
                <FZMaterial.Preset>
                    <FZMaterialPresetRoundtangle CornerRadius="3" />
                </FZMaterial.Preset>
            </FZMaterial>
            <Control x:Name="Player_Level"  
                     Visibility="{Binding IsWristbandVisible, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"
                     Template="{StaticResource A_ControlTemplate_PlayerLevel_WithPrestige}" 
                     Margin="3"
                     HorizontalAlignment="Center"/>
            <FZMaterial x:Name="DrivatarIcon"
                        Visibility="Collapsed"
                        Style="{StaticResource A_Style_Material_DrivatarIcon_PlayerList}"/>
        </Grid>
        <ControlTemplate.Triggers>
            <DataTrigger Binding="{Binding IsDrivatar, FallbackValue=False}" Value="True">
                <Setter TargetName="DrivatarIcon" Property="Visibility" Value="Visible"/>
                <Setter TargetName="Player_Level" Property="Visibility" Value="Hidden"/>
            </DataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding IsKeyboardFocusWithin, RelativeSource={RelativeSource FindAncestor, AncestorType=ListBoxItem}}" Value="True"/>
                    <Condition Binding="{Binding IsDrivatar, FallbackValue=False}" Value="True"/>
                </MultiDataTrigger.Conditions>
                <Setter TargetName="DriverLevelFocusHighlight" Property="Visibility" Value="Visible" />
            </MultiDataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding IsKeyboardFocusWithin, RelativeSource={RelativeSource FindAncestor, AncestorType=ListBoxItem}}" Value="True"/>
                    <Condition Binding="{Binding IsDrivatar, FallbackValue=False}" Value="False"/>
                    <Condition Binding="{Binding IsWristbandVisible, FallbackValue=True}" Value="True"/>
                </MultiDataTrigger.Conditions>
                <Setter TargetName="DriverLevelFocusHighlight" Property="Visibility" Value="Visible" />
            </MultiDataTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <ControlTemplate x:Key="A_ControlTemplate_Cell_DriverName">
        <StackPanel Orientation="Horizontal" >
            <local:FZTextBlock Text="{Binding UserProfile.FormattedClubTag}" Style="{StaticResource A_Style_FZTextBlock_ClubTag}" Visibility="{Binding UserProfile.FormattedClubTag, Converter={StaticResource A_StringVisConverter}}" VerticalAlignment="Center" Margin="0,0,5,0" />
            <local:FZTextBlock Text="{Binding UserProfile.FormattedGamertag}" Style="{StaticResource A_Style_FZTextBlock_LeaderboardRow}" VerticalAlignment="Center" />
            <local:PlayerAdornmentControl Margin="4,0,0,0" BadgeId="{Binding UserProfile.BadgeId}" />
        </StackPanel>
    </ControlTemplate>


    <ControlTemplate x:Key="A_ControlTemplate_Cell_CarName">
        <local:FZTextBlock Text="{Binding CarName}" Style="{StaticResource A_Style_FZTextBlock_LeaderboardRow}" VerticalAlignment="Center"/>
    </ControlTemplate>

    
    <ControlTemplate x:Key="A_ControlTemplate_Cell_Time">
        <StackPanel Orientation="Horizontal">
            <local:FZTextBlock Text="{Binding Time}" Style="{StaticResource A_Style_FZTextBlock_LeaderboardRowValue}" VerticalAlignment="Center" />
            <Decorator Visibility="{Binding ShowDirtyTimeFlag, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_FZBooleanToVisibilityConverter}, FallbackValue=Visible}">
                <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_RivalDirtyIconSmall}" Tag="{Binding TimeIsDirty}" VerticalAlignment="Center" />
            </Decorator>
        </StackPanel>
    </ControlTemplate>

    <ControlTemplate x:Key="A_ControlTemplate_Cell_Drivetrain">
        <Control Style="{StaticResource A_Style_Control_DriveTrainDisplay}"
                 Height="35"/>
    </ControlTemplate>

    <ControlTemplate x:Key="A_ControlTemplate_ABS">
        <Grid>
            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_AssistsIconABS}" />
            <local:FZTextBlock Text="A" Style="{StaticResource A_Style_FZMaterial_AssistsIconAutoBrake}" />
        </Grid>
    </ControlTemplate>

    <ControlTemplate x:Key="A_ControlTemplate_Cell_AmbientChallengeScore">
        <local:FZTextBlock Text="{Binding AmbientChallengeScore}" Style="{StaticResource A_Style_FZTextBlock_LeaderboardRowValue}" />
    </ControlTemplate>

    <Style x:Key="A_Style_MapCustomRenderElement_Leaderboard" BasedOn="{StaticResource A_Style_MapCustomRenderElement_UIMap}" TargetType="local:MapCustomRenderElement"/>

    <Style x:Key="A_Leaderboard_Participants_Counter_Bar" TargetType="Control">
        <Style.Resources>
            <Style TargetType="{x:Type local:FZRun}" x:Key="A_Style_Run_BOLD">
                <Setter Property="FontFamily" Value="Horizon_A"/>
            </Style>
            <MappingConverter x:Key="A_MappingConverter_BoldText" >
                <MappingConverterEntry Key="{NoCase HIGHLIGHT}" Value="{StaticResource A_Style_Run_BOLD}" />
            </MappingConverter>
            <Style x:Key="A_Style_FZTextBlock_PlayerList_Counter" TargetType="local:FZTextBlock">
                <Setter Property="FontFamily" Value="Horizon_B_tf"/>
                <Setter Property="Color" Value="{StaticResource H_Color_Primary_Black}"/>
                <Setter Property="CapHeight" Value="15"/>
                <Setter Property="MarkupConverter" Value="{StaticResource A_MappingConverter_BoldText}"/>
            </Style>
        </Style.Resources>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Control">
                    <local:FZMaterial HorizontalAlignment="Stretch" Height="48" Margin="0,6,0,0" Style="{StaticResource A_Style_FZMaterial_FlatPanel_HeaderPill_Green}">
                        <local:FZTextBlock HorizontalAlignment="Right" VerticalAlignment="Center" Margin="6,6,20,6" 
                                           Style="{StaticResource A_Style_FZTextBlock_PlayerList_Counter}"
                                           local:MultiStringFormatter.Format="{Binding Source={local:Loc Scoreboard.IDS_Players_X_Of_Y}, Converter={StaticResource A_StringToUpper}}"
                                           local:MultiStringFormatter.Param0="{Binding EventViewModel.Participants.Count, Converter={StaticResource A_NumUnitConverter_NoUnit_0dp}}"
                                           local:MultiStringFormatter.Param1="{Binding EventViewModel.Participants.MaximumParticipants, Converter={StaticResource A_NumUnitConverter_NoUnit_0dp}}"
                                           Text="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}}"/>
                    </local:FZMaterial>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>




    <!-- PLAYER LIST CONTROL -->

    <Style x:Key="A_Style_StackPanel_PlayerList_PositionBoxFinishBox" TargetType="StackPanel">
        <Setter Property="Margin" Value="-51,0,0,0" />
        <Setter Property="Width" Value="99" />
        <Setter Property="HorizontalAlignment" Value="Left" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding ShowFinishedStatus, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True">
                <Setter Property="Margin" Value="-102,0,0,0"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="A_Style_PlayerListControl_Default" TargetType="local:PlayerListControl">
        <Style.Resources>
            <Style x:Key="A_Style_ColumnDefinition_PositionSpacer" TargetType="{x:Type ColumnDefinition}">
                <Setter Property="Width" Value="0"/>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding ShowPosition, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True">
                        <Setter Property="Width" Value="0"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding ShowPosDelta, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True">
                        <Setter Property="Width" Value="0"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding ShowTeams, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True">
                        <Setter Property="Width" Value="0"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding ShowPlayerIcon, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True">
                        <Setter Property="Width" Value="0"/>
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_ColumnDefinition_PositionBox" TargetType="{x:Type ColumnDefinition}">
                <Setter Property="Width" Value="0"/>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding ShowPosition, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True">
                        <Setter Property="Width" Value="51"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding ShowPosDelta, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True">
                        <Setter Property="Width" Value="51"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding ShowPlayerIcon, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True">
                        <Setter Property="Width" Value="51"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding ShowTeams, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True">
                        <Setter Property="Width" Value="51"/>
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_ColumnDefinition_PosDelta" TargetType="{x:Type ColumnDefinition}">
                <Setter Property="Width" Value="0"/>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding ShowPosDelta, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True">
                        <Setter Property="Width" Value="15"/>
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_ColumnDefinition_PlayerIcon" TargetType="{x:Type ColumnDefinition}">
                <Setter Property="Width" Value="0"/>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding ShowPlayerIcon, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True">
                        <Setter Property="Width" Value="0"/>
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_ColumnDefinition_Rank" TargetType="{x:Type ColumnDefinition}">
                <Setter Property="Width" Value="0"/>
            </Style>
            <Style x:Key="A_Style_ColumnDefinition_Rank_Space" TargetType="{x:Type ColumnDefinition}">
                <Setter Property="Width" Value="0"/>
            </Style>

            <Style x:Key="A_Style_ColumnDefinition_Player" TargetType="{x:Type ColumnDefinition}">
                <Setter Property="Width" Value="350"/>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding IsTeamMultiplayer, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True">
                        <Setter Property="Width" Value="350"/>
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_ColumnDefinition_Player_Spacer" TargetType="{x:Type ColumnDefinition}">
                <Setter Property="Width" Value="{StaticResource A_GridLength_Column_Spacer_Width}"/>
            </Style>

            <Style x:Key="A_Style_ColumnDefinition_Car" TargetType="{x:Type ColumnDefinition}">
                <Setter Property="Width" Value="0"/>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding ShowCar, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True">
                        <Setter Property="Width" Value="288"/>
                    </DataTrigger>
                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding ShowCar, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True"/>
                            <Condition Binding="{Binding IsTeamMultiplayer, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True"/>
                        </MultiDataTrigger.Conditions>
                        <Setter Property="Width" Value="285"/>
                    </MultiDataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_ColumnDefinition_Car_Spacer" TargetType="{x:Type ColumnDefinition}">
                <Setter Property="Width" Value="{StaticResource A_GridLength_Column_Spacer_WidthLarge}"/>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding IsTeamMultiplayer, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True">
                        <Setter Property="Width" Value="{StaticResource A_GridLength_Column_Spacer_Width}"/>
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_ColumnDefinition_Class" TargetType="{x:Type ColumnDefinition}">
                <Setter Property="Width" Value="0"/>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding ShowCarClass, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True">
                        <Setter Property="Width" Value="175"/>
                    </DataTrigger>
                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding ShowCarClass, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True"/>
                            <Condition Binding="{Binding IsTeamMultiplayer, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True"/>
                        </MultiDataTrigger.Conditions>
                        <Setter Property="Width" Value="152"/>
                    </MultiDataTrigger>
                    
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_ColumnDefinition_InviteTimer" TargetType="{x:Type ColumnDefinition}">
                <Setter Property="Width" Value="0"/>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding ShowInviteTimer, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True">
                        <Setter Property="Width" Value="325"/>
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_ColumnDefinition_Status" TargetType="{x:Type ColumnDefinition}">
                <Setter Property="Width" Value="0"/>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding ShowStatus, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True">
                        <Setter Property="Width" Value="317"/>
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_ColumnDefinition_Status_Spacer" TargetType="{x:Type ColumnDefinition}">
                <Setter Property="Width" Value="0"/>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding ShowStatus, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True">
                        <Setter Property="Width" Value="{StaticResource A_GridLength_Column_Spacer_Width}"/>
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_ColumnDefinition_BestLap" TargetType="{x:Type ColumnDefinition}">
                <Setter Property="Width" Value="0"/>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding ShowBestLap, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True">
                        <Setter Property="Width" Value="{StaticResource A_GridLength_Column_TimeData_Width}"/>
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_ColumnDefinition_Progress" TargetType="{x:Type ColumnDefinition}">
                <Setter Property="Width" Value="0"/>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding ShowProgress, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True">
                        <Setter Property="Width" Value="{StaticResource A_GridLength_Column_TimeData_Width}"/>
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_ColumnDefinition_Score" TargetType="{x:Type ColumnDefinition}">
                <Setter Property="Width" Value="0"/>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding ShowScore, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True">
                        <Setter Property="Width" Value="{StaticResource A_GridLength_Column_TimeData_Width}"/>
                    </DataTrigger>
                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding ShowScore, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True"/>
                            <Condition Binding="{Binding IsTeamMultiplayer, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True"/>
                        </MultiDataTrigger.Conditions>
                        <Setter Property="Width" Value="106"/>
                    </MultiDataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_ColumnDefinition_Points" TargetType="{x:Type ColumnDefinition}">
                <Setter Property="Width" Value="0"/>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding ShowPoints, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True">
                        <Setter Property="Width" Value="{StaticResource A_GridLength_Column_TimeData_Width}"/>
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_ColumnDefinition_TotalXP" TargetType="{x:Type ColumnDefinition}">
                <Setter Property="Width" Value="0"/>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding ShowTotalXP, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True">
                        <Setter Property="Width" Value="200"/>
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_ColumnDefinition_Time" TargetType="{x:Type ColumnDefinition}">
                <Setter Property="Width" Value="0"/>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding ShowTime, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True">
                        <Setter Property="Width" Value="{StaticResource A_GridLength_Column_TimeData_Width}"/>
                    </DataTrigger>
                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding ShowTime, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True"/>
                            <Condition Binding="{Binding IsTeamMultiplayer, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True"/>
                        </MultiDataTrigger.Conditions>
                        <Setter Property="Width" Value="160"/>
                    </MultiDataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_RowDefintion_MainLeaderboardHeight" TargetType="{x:Type RowDefinition}">
                <Setter Property="Height" Value="*"/>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding ShowTeams, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True">
                        <Setter Property="Height" Value="auto"/>
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_RowDefintion_SecondaryLeaderboardHeight" TargetType="{x:Type RowDefinition}">
                <Setter Property="Height" Value="0"/>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding ShowTeams, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True">
                        <Setter Property="Height" Value="*"/>
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_FZTextBlock_PlayerListHeader" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_DriverListHeading}">
                <Setter Property="VerticalAlignment" Value="Center" />
            </Style>

            <Style x:Key="A_Style_FZTextBlock_PlayerList_Base" TargetType="{x:Type local:FZTextBlock}" BasedOn="{StaticResource A_Style_FZTextBlock_LeaderboardRow}">
                <Setter Property="HorizontalAlignment" Value="Left"/>
                <Setter Property="VerticalAlignment" Value="Center"/>
            </Style>

            <Style x:Key="A_Style_FZTextBlock_PlayerList" TargetType="{x:Type local:FZTextBlock}" BasedOn="{StaticResource A_Style_FZTextBlock_PlayerList_Base}" >
                <Style.Triggers>
                    <DataTrigger Binding="{Binding IsKeyboardFocusWithin, RelativeSource={RelativeSource FindAncestor, AncestorType=ListBoxItem}}" Value="True">
                        <Setter Property="Color"
                                Value="{StaticResource A_Color_HighlightText}" />
                    </DataTrigger>
                    <DataTrigger Binding="{Binding IsOnline}" Value="True">
                        <Setter Property="FontFamily"
                                Value="Horizon_A" />
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_FZTextBlock_PlayerListValue" TargetType="{x:Type local:FZTextBlock}" BasedOn="{StaticResource A_Style_FZTextBlock_PlayerList}" >
                <Setter Property="FontFamily" Value="Horizon_B_tf"/>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding IsOnline}" Value="True">
                        <Setter Property="FontFamily"
                                Value="Horizon_A_tf" />
                    </DataTrigger>
                    <DataTrigger Binding="{Binding IsLocalPlayer}" Value="True">
                        <Setter Property="FontFamily"
                                Value="Horizon_A_tf" />
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_FZTextBlock_PlayerList_Tag" TargetType="{x:Type local:FZTextBlock}" BasedOn="{StaticResource A_Style_FZTextBlock_ClubTag}">
                <Setter Property="VerticalAlignment" Value="Center"/>
                <Style.Triggers>
                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding IsIt}" Value="True"/>
                            <Condition Binding="{Binding Team}" Value="{x:Null}" />
                            <Condition Binding="{Binding ShowKing, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True"/>
                        </MultiDataTrigger.Conditions>
                        <Setter Property="Color" Value="{StaticResource A_Color_List_King_Background_LeaderBoards}"/>
                    </MultiDataTrigger>

                    <DataTrigger Binding="{Binding IsKeyboardFocusWithin, RelativeSource={RelativeSource FindAncestor, AncestorType=ListBoxItem}}" Value="True">
                        <Setter Property="Color"
                                Value="{StaticResource A_Color_HighlightText}" />
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_FZMaterial_PartyLeaderIcon" TargetType="{x:Type local:FZMaterial}">
                <Setter Property="ImageSourceNoPreload"
                        Value="/ForzaUI;component/Textures/Anthem/Icons/leader_icon.png"/>
                <Setter Property="Width" Value="27"/>
                <Setter Property="Height" Value="27"/>
                <Setter Property="Visibility" Value="{Binding IsPartyLeader, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"/>
                <Setter Property="Margin" Value="4,0,-4,0"/>
                <Setter Property="Color" Value="{StaticResource H_Color_Primary_Black}" />
                <Style.Triggers>
                    <DataTrigger Binding="{Binding IsLocalPlayer}" Value="True">
                        <Setter Property="Color"
                        Value="{StaticResource A_Color_LocalPlayer_Text}" />
                    </DataTrigger>
                    <DataTrigger Binding="{Binding IsKeyboardFocusWithin, RelativeSource={RelativeSource FindAncestor, AncestorType=ListBoxItem}}" Value="True">
                        <Setter Property="Color"
                        Value="{StaticResource A_Color_HighlightText}" />
                    </DataTrigger>
                    <DataTrigger Binding="{Binding IsPartyLeader}"
                         Value="False">
                        <Setter Property="Visibility"
                        Value="Collapsed" />
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <ControlTemplate x:Key="A_ControlTemplate_ScrollViewer_PlayerList" TargetType="ScrollViewer">
                <Grid>
                    <ScrollBar x:Name="PART_VerticalScrollBar"
                       Style="{StaticResource A_Style_ScrollBar_Default}"
                       HorizontalAlignment="Right"
                       Minimum="0"
                       Maximum="{TemplateBinding ScrollViewer.ScrollableHeight}"
                       Margin="0,0,10,3"
                       ViewportSize="{TemplateBinding ScrollViewer.ViewportHeight}"
                       Value="{Binding Path=VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource Mode=TemplatedParent}}"
                       Visibility="{TemplateBinding ScrollViewer.ComputedVerticalScrollBarVisibility}" />
                    <ScrollContentPresenter x:Name="PART_ScrollContentPresenter"
                                    Content="{TemplateBinding Content}"
                                    CanContentScroll="{TemplateBinding ScrollViewer.CanContentScroll}"/>
                </Grid>
            </ControlTemplate>

            <Style x:Key="A_Style_ListBox_List_PlayerList_Default"
                   TargetType="{x:Type local:CommonListBox}">
                <Setter Property="KeyboardNavigation.DirectionalNavigation" Value="Contained"/>
                <Setter Property="AllowMouseWheelScrolling" Value="False"/>
                <Setter Property="MaxHeight" Value="648"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type local:CommonListBox}">
                            <local:FZScrollViewer Template="{StaticResource A_ControlTemplate_ScrollViewer_PlayerList}"
                                                Focusable="False"
                                                HorizontalScrollBarVisibility="Disabled"
                                                VerticalScrollBarVisibility="Auto"
                                                VerticalAlignment="Center"
                                                CanContentScroll="True"
												DragMovementMultiplier="0.03"
                                                local:FZScrollViewer.IsAtTop="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(local:FZScrollViewer.IsAtTop), Mode=OneWayToSource}"
                                                local:FZScrollViewer.IsAtBottom="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(local:FZScrollViewer.IsAtBottom), Mode=OneWayToSource}"
                                                KeepSelectionOnScreen="True"
                                                Margin="-108,0,-30,0">
                                <VirtualizingStackPanel IsItemsHost="True" 
                                                        VirtualizingStackPanel.VirtualizationMode="Recycling" 
                                                        Orientation="Vertical"
                                                        Margin="108,0,30,0"/>
                            </local:FZScrollViewer>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
                <Style.Triggers>
                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding SelectCommand, RelativeSource={RelativeSource AncestorType=Page}}" Value="{x:Null}" />
                        </MultiDataTrigger.Conditions>
                        <Setter Property="IsEnabled"
                                Value="False" />
                    </MultiDataTrigger>
                </Style.Triggers>
            </Style>

            <!--Finished Race indicator-->
            <Style x:Key="A_Style_FZMaterial_FinishedRace" TargetType="{x:Type local:FZMaterial}">
                <Setter Property="VerticalAlignment" Value="Center"/>
                <Setter Property="HorizontalAlignment" Value="Left"/>
                <Setter Property="Width" Value="32"/>
                <Setter Property="Height" Value="32"/>
                <Setter Property="Visibility" Value="Collapsed"/>
                <Style.Triggers>
                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding ShowFinishedStatus, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True"/>
                            <Condition Binding="{Binding EventStatus}" Value="{x:Static local:EventStatus.Finished}"/>
                        </MultiDataTrigger.Conditions>
                        <Setter Property="Visibility" Value="Visible"/>
                        <Setter Property="ImageSourceNoPreload" Value="/ForzaUI;component/Textures/Anthem/Icons/Lobby/Finished_Flag.png"/>
                    </MultiDataTrigger>
                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding ShowFinishedStatus, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True"/>
                            <Condition Binding="{Binding EventStatus}" Value="{x:Static local:EventStatus.Finished}"/>
                            <Condition Binding="{Binding FinishPos}" Value="1"/>
                        </MultiDataTrigger.Conditions>
                        <Setter Property="Visibility" Value="Visible"/>
                        <Setter Property="ImageSourceNoPreload" Value="/ForzaUI;component/Textures/Anthem/Icons/Lobby/Trophy_Icon.png"/>
                        <Setter Property="Color" Value="{StaticResource A_Color_Trophy_Gold}"/>
                    </MultiDataTrigger>
                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding ShowFinishedStatus, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True"/>
                            <Condition Binding="{Binding EventStatus}" Value="{x:Static local:EventStatus.Finished}"/>
                            <Condition Binding="{Binding FinishPos}" Value="2"/>
                        </MultiDataTrigger.Conditions>
                        <Setter Property="Visibility" Value="Visible"/>
                        <Setter Property="ImageSourceNoPreload" Value="/ForzaUI;component/Textures/Anthem/Icons/Lobby/Trophy_Icon.png"/>
                        <Setter Property="Color" Value="{StaticResource A_Color_Trophy_Silver}"/>
                    </MultiDataTrigger>
                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding ShowFinishedStatus, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True"/>
                            <Condition Binding="{Binding EventStatus}" Value="{x:Static local:EventStatus.Finished}"/>
                            <Condition Binding="{Binding FinishPos}" Value="3"/>
                        </MultiDataTrigger.Conditions>
                        <Setter Property="Visibility" Value="Visible"/>
                        <Setter Property="ImageSourceNoPreload" Value="/ForzaUI;component/Textures/Anthem/Icons/Lobby/Trophy_Icon.png"/>
                        <Setter Property="Color" Value="{StaticResource A_Color_Trophy_Bronze}"/>
                    </MultiDataTrigger>
                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding ShowFinishedStatus, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True"/>
                            <Condition Binding="{Binding EventStatus}" Value="{x:Static local:EventStatus.DNF}"/>
                        </MultiDataTrigger.Conditions>
                        <Setter Property="Visibility" Value="Visible"/>
                        <Setter Property="ImageSourceNoPreload" Value="/ForzaUI;component/Textures/Anthem/Icons/Lobby/DNF_Flag.png"/>
                    </MultiDataTrigger>
                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding ShowFinishedStatus, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True"/>
                            <Condition Binding="{Binding EventStatus}" Value="{x:Static local:EventStatus.Quit}"/>
                        </MultiDataTrigger.Conditions>
                        <Setter Property="Visibility" Value="Visible"/>
                        <Setter Property="ImageSourceNoPreload" Value="/ForzaUI;component/Textures/Anthem/Icons/Lobby/Quit.png"/>
                    </MultiDataTrigger>
                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding ShowFinishedStatus, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True"/>
                            <Condition Binding="{Binding EventStatus}" Value="{x:Static local:EventStatus.OpposingTeamDisconnect}"/>
                        </MultiDataTrigger.Conditions>
                        <Setter Property="Visibility" Value="Visible"/>
                        <Setter Property="ImageSourceNoPreload" Value="/ForzaUI;component/Textures/Anthem/Icons/Lobby/Disconnect.png"/>
                    </MultiDataTrigger>
                </Style.Triggers>
            </Style>

            <!-- Position Delta Arrows -->
            <Style x:Key="A_Style_PositionArrow" TargetType="{x:Type Control}">
                <Setter Property="Focusable" Value="False" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate>
                            <local:FZMaterial Color="{StaticResource A_Color_TextMenu_Text_Default}"
                                              Width="15"
                                              Height="7"
                                              x:Name="ArrowMaterial"
                                              Data="{StaticResource A_Geometry_SpinnerArrow}"
                                              HorizontalAlignment="Left"
                                              RenderTransformOrigin="0.5,0.5">
                                <local:FZMaterial.RenderTransform>
                                    <RotateTransform />
                                </local:FZMaterial.RenderTransform>
                            </local:FZMaterial>

                            <ControlTemplate.Triggers>
                                <!-- PosDelta -1=MovedDown 0=NoChange 1=MovedUp -->
                                <DataTrigger Binding="{Binding PosDelta}"
                                             Value="1">
                                    <Setter TargetName="ArrowMaterial"
                                            Property="RenderTransform">
                                        <Setter.Value>
                                            <RotateTransform Angle="180" />
                                        </Setter.Value>
                                    </Setter>
                                </DataTrigger>
                                <DataTrigger Binding="{Binding IsSelected, RelativeSource={RelativeSource AncestorType=ListBoxItem}}" Value="True">
                                    <Setter TargetName="ArrowMaterial" Property="Color" Value="{StaticResource A_Color_TextMenu_Text_Highlighted}" />
                                </DataTrigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding PosDelta}" Value="0">
                        <Setter Property="Visibility" Value="Collapsed"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding ShowPosDelta, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="False">
                        <Setter Property="Visibility" Value="Collapsed"/>
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_FZMaterial_PlayerIcon" TargetType="{x:Type local:FZMaterial}">
                <Setter Property="VerticalAlignment" Value="Center"/>
                <Setter Property="HorizontalAlignment" Value="Left"/>
                <Setter Property="Visibility" Value="Collapsed"/>
            </Style>

            <Style x:Key="A_Style_FZMaterial_KingIcon" TargetType="{x:Type local:FZMaterial}" BasedOn="{StaticResource A_Style_FZMaterial_PlayerIcon}">
                <Setter Property="ImageSourceNoPreload" Value="/ForzaUI;component/Textures/Anthem/Icons/Lobby/king_icon.png"/>
                <Setter Property="Width" Value="32"/>
                <Setter Property="Height" Value="32"/>
                <Setter Property="HorizontalAlignment" Value="Center" />
                <Setter Property="Color" Value="{StaticResource H_Color_Primary_Black}" />
                <Style.Triggers>
                    <DataTrigger Binding="{Binding ShowTeams, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True">
                        <Setter Property="ImageSourceNoPreload" Value="/ForzaUI;component/Textures/Anthem/Icons/Lobby/Team_Crown.png"/>
                        <Setter Property="Color" Value="{StaticResource H_Color_Primary_White}" />
                    </DataTrigger>
                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding IsIt}" Value="True"/>
                            <Condition Binding="{Binding ShowKing, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True"/>
                        </MultiDataTrigger.Conditions>
                        <Setter Property="Visibility" Value="Visible"/>
                    </MultiDataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_FZMaterial_InfectedIcon" TargetType="{x:Type local:FZMaterial}" BasedOn="{StaticResource A_Style_FZMaterial_PlayerIcon}">
                <Setter Property="ImageSourceNoPreload" Value="/ForzaUI;component/Textures/Anthem/Icons/Lobby/infected_icon.png"/>
                <Setter Property="Width" Value="32"/>
                <Setter Property="Height" Value="32"/>
                <Setter Property="HorizontalAlignment" Value="Center" />
                <Style.Triggers>
                    <MultiDataTrigger >
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding InOnlineGame}" Value="True" />
                            <Condition Binding="{Binding IsIt}" Value="True"/>
                            <Condition Binding="{Binding ShowInfected, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True"/>
                        </MultiDataTrigger.Conditions>
                        <Setter Property="Visibility" Value="Visible"/>
                    </MultiDataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_FZMaterial_SurvivorIcon" TargetType="{x:Type local:FZMaterial}" BasedOn="{StaticResource A_Style_FZMaterial_PlayerIcon}">
                <Setter Property="ImageSourceNoPreload" Value="/ForzaUI;component/Textures/Anthem/Icons/Lobby/survivor_icon.png"/>
                <Setter Property="Width" Value="32"/>
                <Setter Property="Height" Value="32"/>
                <Setter Property="HorizontalAlignment" Value="Center" />
                <Style.Triggers>
                    <MultiDataTrigger >
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding InOnlineGame}" Value="True" />
                            <Condition Binding="{Binding IsIt}" Value="False"/>
                            <Condition Binding="{Binding ShowInfected, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True"/>
                        </MultiDataTrigger.Conditions>
                        <Setter Property="Visibility" Value="Visible"/>
                    </MultiDataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_FZMaterial_TeamIcon" TargetType="{x:Type local:FZMaterial}" BasedOn="{StaticResource A_Style_FZMaterial_PlayerIcon}">
                <Setter Property="ImageSourceNoPreload" Value="/ForzaUI;component/Textures/Anthem/Icons/Lobby/Player_Car.png"/>
                <Setter Property="Width" Value="33"/>
                <Setter Property="Height" Value="22"/>
                <Setter Property="HorizontalAlignment" Value="Center" />
                <Style.Triggers>
                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding ShowTeams, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True"/>
                            <Condition Binding="{Binding ShowPlayerIcon, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True"/>
                            <Condition Binding="{Binding ShowInfected, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="False"/>
                            <Condition Binding="{Binding ShowKing, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="False"/>
                            <Condition Binding="{Binding ShowFlagRush, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="False"/>
                        </MultiDataTrigger.Conditions>
                        <Setter Property="Visibility" Value="Visible"/>
                    </MultiDataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_CarClassInformation" TargetType="StackPanel">
                <Setter Property="Visibility" Value="Hidden"/>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding ShowCarClass, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True">
                        <Setter Property="Visibility" Value="Visible"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding IsShowcase}" Value="True">
                        <Setter Property="Visibility" Value="Hidden"/>
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <DataTemplate x:Key="A_DataTemplate_PlayerList_Item">
                <Grid Margin="5,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Style="{DynamicResource A_Style_ColumnDefinition_PosDelta}"/>
                        <ColumnDefinition Style="{DynamicResource A_Style_ColumnDefinition_PlayerIcon}"/>
                        <ColumnDefinition Style="{DynamicResource A_Style_ColumnDefinition_PositionSpacer}"/>
                        <ColumnDefinition Style="{DynamicResource A_Style_ColumnDefinition_Rank}"/>
                        <ColumnDefinition Style="{DynamicResource A_Style_ColumnDefinition_Rank_Space}"/>
                        <ColumnDefinition Style="{DynamicResource A_Style_ColumnDefinition_Player}"/>
                        <ColumnDefinition Style="{DynamicResource A_Style_ColumnDefinition_Player_Spacer}"/>
                        <ColumnDefinition Style="{DynamicResource A_Style_ColumnDefinition_Car}"/>
                        <ColumnDefinition Style="{DynamicResource A_Style_ColumnDefinition_Car_Spacer}"/>
                        <ColumnDefinition Style="{DynamicResource A_Style_ColumnDefinition_Class}"/>
                        <ColumnDefinition Style="{DynamicResource A_Style_ColumnDefinition_InviteTimer}"/>
                        <ColumnDefinition Style="{DynamicResource A_Style_ColumnDefinition_Status}"/>
                        <ColumnDefinition Style="{DynamicResource A_Style_ColumnDefinition_Status_Spacer}"/>
                        <ColumnDefinition Style="{DynamicResource A_Style_ColumnDefinition_BestLap}"/>
                        <ColumnDefinition Style="{DynamicResource A_Style_ColumnDefinition_Progress}"/>
                        <ColumnDefinition Style="{DynamicResource A_Style_ColumnDefinition_Time}"/>
                        <ColumnDefinition Style="{DynamicResource A_Style_ColumnDefinition_Score}"/>
                        <ColumnDefinition Style="{DynamicResource A_Style_ColumnDefinition_Points}"/>
                        <ColumnDefinition Style="{DynamicResource A_Style_ColumnDefinition_TotalXP}"/>
                    </Grid.ColumnDefinitions>

                    <Control Style="{StaticResource A_Style_PositionArrow}" Width="15" Height="35" Grid.Column="0" 
                        x:Name="LocalPlayerNarrationHost"
                        local:MultiStringFormatter.Format="{Loc Scoreboard.IDS_ScreenReader_Format_PostRacePlayerResult_Pos}"
                        local:MultiStringFormatter.Param0="{Binding UserProfile.FormattedGamertag}"
                        local:MultiStringFormatter.Param1="{Binding FinishPos}"
                        local:ManualPassthroughProperty.Input="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}}" 
                        local:ManualPassthroughProperty.Allowed="{StaticResource A_Boolean_False}" 
                        local:ScreenReader.Line="{Binding (local:ManualPassthroughProperty.Output), RelativeSource={RelativeSource Self}, Converter={StaticResource A_Converter_TrimInlineMarkup}}"
                        local:ScreenReader.LineType="ScreenDescription"
                        local:ScreenReader.Event="OnChange"/>

                    <DockPanel Grid.Column="5">
                        <Control DockPanel.Dock="Left" 
                                 Template="{StaticResource A_ControlTemplate_Cell_DriverLevel}"/>
                        <Viewbox StretchDirection="DownOnly" Stretch="Uniform" VerticalAlignment="Center" HorizontalAlignment="Left">
                            <StackPanel Orientation="Horizontal">
                                <local:FZTextBlock Text="{Binding UserProfile.FormattedClubTag}" 
                                                   Style="{StaticResource A_Style_FZTextBlock_PlayerList_Tag}" 
                                                   Margin="0,0,5,0" 
                                                   Visibility="{Binding UserProfile.FormattedClubTag, Converter={StaticResource A_StringVisConverter}}"/>
                                <local:FZTextBlock x:Name="PlayerName"
                                    Text="{Binding UserProfile.FormattedGamertag}"
                                    Style="{StaticResource A_Style_FZTextBlock_PlayerList}"
                                    local:ScreenReader.Event="OnChange"
                                    local:ScreenReader.LineType="SelectedItem"
                                    local:ScreenReader.SelectedNumber="{Binding (ItemsControl.AlternationIndex), RelativeSource={RelativeSource AncestorType={x:Type ListBoxItem}}, Converter={StaticResource A_IndexToNumberConverter}, FallbackValue=0}"
                                    local:ScreenReader.SelectedCount="{Binding Items.Count, RelativeSource={RelativeSource AncestorType={x:Type Selector}}, FallbackValue=0}"/>
                                <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_PartyIcon}" Margin="5,0,0,0"/>
                                <local:FZMaterial x:Name="PartyLeaderIcon" Style="{StaticResource A_Style_FZMaterial_PartyLeaderIcon}" Margin="0,-2,8,0"/>
                                <local:PlayerAdornmentControl Margin="4,0,0,0"  BadgeId="{Binding UserProfile.BadgeId}" />
                            </StackPanel>
                        </Viewbox>
                    </DockPanel>
                    <local:FZTextBlock Grid.Column="7" Text="{Binding CarName}" Style="{StaticResource A_Style_FZTextBlock_PlayerList}"/>

                    <StackPanel Grid.Column="9"
                                HorizontalAlignment="Left"
                                VerticalAlignment="Center"
                                Style="{StaticResource A_Style_CarClassInformation}"
                                Orientation="Horizontal">
                        <Control Style="{StaticResource H_Style_TemplatedElement_CarClassBadge}"
                                local:BindingProxy.A="{Binding CarPI}"
                                local:BindingProxy.B="{Binding CarClass}"
                                Height="35"
                                x:Name="CarClassControl"/>
                    </StackPanel>

                    <local:FZTextBlock Grid.Column="10"
                                       Text="{Binding InviteTimer}" 
                                       Style="{StaticResource A_Style_FZTextBlock_PlayerListValue}"/>
                    <local:FZTextBlock Grid.Column="11" 
                                       x:Name="StatusTextBlock" 
                                       Text="{Binding Status}" 
                                       Style="{StaticResource A_Style_FZTextBlock_PlayerList}" 
                                       local:ManualPassthroughProperty.Input="{Binding Status}" 
                                       local:ManualPassthroughProperty.Allowed="{StaticResource A_Boolean_False}" 
                                       local:ScreenReader.Event="OnChange" 
                                       local:ScreenReader.LineType="ItemDescription" 
                                       local:ScreenReader.Line="{Binding (local:ManualPassthroughProperty.Output), RelativeSource={RelativeSource Self}}"/>
                    <local:FZTextBlock Grid.Column="13"
                                       Text="{Binding BestLap}" 
                                       Style="{StaticResource A_Style_FZTextBlock_PlayerListValue}"/>
                    <local:FZTextBlock Grid.Column="14" 
                                       Text="{Binding Progress}" 
                                       Style="{StaticResource A_Style_FZTextBlock_PlayerListValue}"/>
                    <local:FZTextBlock Grid.Column="15" 
                                       Text="{Binding Time}" 
                                       Style="{StaticResource A_Style_FZTextBlock_PlayerListValue}"/>
                    <local:FZTextBlock Grid.Column="16" 
                                       Text="{Binding Score}" 
                                       Style="{StaticResource A_Style_FZTextBlock_PlayerListValue}"/>
                    <local:FZTextBlock Grid.Column="17" 
                                       Text="{Binding Points, Converter={StaticResource A_NumUnitConverter_NoUnit_0dp}}" 
                                       Style="{StaticResource A_Style_FZTextBlock_PlayerListValue}"/>
                    <local:FZTextBlock Grid.Column="18" 
                                       Text="{Binding Points, Converter={StaticResource A_NumUnitConverter_NoUnit_0dp}}" 
                                       Style="{StaticResource A_Style_FZTextBlock_PlayerListValue}"/>
                </Grid>
                <DataTemplate.Triggers>
                    <DataTrigger Binding="{Binding IsKeyboardFocusWithin, RelativeSource={RelativeSource AncestorType=ListBoxItem}}" Value="True">
                        <Setter TargetName="PlayerName" Property="local:ScreenReader.Line" Value="{Binding UserProfile.FormattedGamertag}"/>
                        <Setter TargetName="StatusTextBlock" Property="local:ManualPassthroughProperty.Allowed" Value="{Binding ShowStatus, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}, FallbackValue={StaticResource A_Boolean_False}}"/>
                    </DataTrigger>
                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding IsLocalPlayer}" Value="True" />
                            <Condition Binding="{Binding ShowTime, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="False" />
                            <Condition Binding="{Binding ShowScore, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True" />
                        </MultiDataTrigger.Conditions>
                        <Setter TargetName="LocalPlayerNarrationHost" Property="local:MultiStringFormatter.Param2" Value="{Binding Score}"/>
                    </MultiDataTrigger>
                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding IsLocalPlayer}" Value="True" />
                            <Condition Binding="{Binding ShowTime, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="False" />
                            <Condition Binding="{Binding ShowScore, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="False" />
                            <Condition Binding="{Binding ShowPoints, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True" />
                        </MultiDataTrigger.Conditions>
                        <Setter TargetName="LocalPlayerNarrationHost" Property="local:MultiStringFormatter.Param2" Value="{Binding Points}"/>
                    </MultiDataTrigger>
                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding IsLocalPlayer}" Value="True" />
                            <Condition Binding="{Binding ShowTime, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True" />
                        </MultiDataTrigger.Conditions>
                        <Setter TargetName="LocalPlayerNarrationHost" Property="local:MultiStringFormatter.Param2" Value="{Binding Time, Converter={StaticResource A_TimeDurationNarrationConverter}}"/>
                    </MultiDataTrigger>
                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding IsLocalPlayer}" Value="True" />
                            <Condition Binding="{Binding ShowPosition, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="False" />
                        </MultiDataTrigger.Conditions>
                        <Setter TargetName="LocalPlayerNarrationHost" Property="local:MultiStringFormatter.Format" Value="{Loc Scoreboard.IDS_ScreenReader_Format_PostRacePlayerResult_NoPos}"/>
                    </MultiDataTrigger>
                    <!-- todo: condition via a new property on playerlistcontrol so we can control which scenes do this -->
                    <DataTrigger Binding="{Binding IsLocalPlayer}" Value="True">
                        <Setter TargetName="LocalPlayerNarrationHost" Property="local:ManualPassthroughProperty.Allowed" Value="{Binding IsLocalPlayer, FallbackValue={StaticResource A_Boolean_False}}"/>
                    </DataTrigger>
                </DataTemplate.Triggers>
            </DataTemplate>
            <Style x:Key="A_Style_ListBoxItem_PlayerList" TargetType="{x:Type ListBoxItem}">
                <Setter Property="FocusVisualStyle" Value="{x:Null}" />
                <Setter Property="Tag" Value="{StaticResource A_Color_SubHeader_Text}"/>
                <Setter Property="local:FocusOnMouseOverBehaviour.Self"
                        Value="{Binding IsEnabled, RelativeSource={RelativeSource AncestorType=local:PlayerListControl}}" />
                <Setter Property="RenderTransformOrigin" Value="0.5,0.5" />
                <Setter Property="RenderTransform">
                    <Setter.Value>
                        <TransformGroup>
                            <ScaleTransform />
                            <SkewTransform />
                            <RotateTransform />
                            <TranslateTransform />
                        </TransformGroup>
                    </Setter.Value>
                </Setter>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type ListBoxItem}">
                            <Grid Height="{StaticResource A_Size_RowHeight}"
                                  Margin="0,0,0,4">
                                <Grid >
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Style="{StaticResource A_Style_ColumnDefinition_PositionBox}"/>
                                        <ColumnDefinition Width="*"/>
                                    </Grid.ColumnDefinitions>
                                    <local:FZMaterial x:Name="DropShadow"
                                        Style="{StaticResource A_Style_FZMaterial_TextMenuItemShadow}"
                                        Margin="-24"
                                        IsHitTestVisible="False"
                                        Visibility="Hidden"
                                        Grid.ColumnSpan="2"/>
                                    <StackPanel Style="{StaticResource A_Style_StackPanel_PlayerList_PositionBoxFinishBox}" Orientation="Horizontal">
                                        <local:FZMaterial x:Name="FinishStateBox" 
                                                          Style="{StaticResource A_Style_FZMaterial_LeaderboardRow_FinishedStateBox}"
                                                          Visibility="Collapsed" >
                                            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_FinishedRace}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                                        </local:FZMaterial>
                                        <Grid Width="48" Margin="0,0,3,0">
                                            <local:FZMaterial x:Name="PositionBox"
                                                              Style="{StaticResource A_Style_FZMaterial_LeaderboardRow_PositionBox}"
                                                              Visibility="Collapsed" />
                                            <local:FZTextBlock x:Name="FinishPos"
                                                               Text="{Binding FinishPos, Converter={StaticResource A_NumUnitConverter_Min2Digits_0dp}}"
                                                               Style="{StaticResource A_Style_FZTextBlock_DriverListPosition}"
                                                               Grid.Column="0"
                                                               Margin="0"
                                                               HorizontalAlignment="Center" Visibility="Collapsed"/>
                                            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_KingIcon}" Margin="0" HorizontalAlignment="Center"/>
                                            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_InfectedIcon}" Margin="0" HorizontalAlignment="Center"/>
                                            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_SurvivorIcon}" Margin="0" HorizontalAlignment="Center"/>
                                            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_TeamIcon}" Margin="0" HorizontalAlignment="Center"/>
                                        </Grid>
                                    </StackPanel>
                                </Grid>
                                <Grid x:Name="RowContent"
                                      Style="{StaticResource A_Style_FZMaterial_LeaderboardRowContent}"
                                      >
                                    <local:FZMaterial x:Name="RowContentBackground" Style="{StaticResource A_Style_FZMaterial_LeaderboardRow}" />
                                    
                                    <ContentPresenter VerticalAlignment="Center"/>
                                </Grid>
                                <local:RoutedEventCommand x:Name="ClickOnMouseItem"
                                                          RoutedEvent="UIElement.MouseLeftButtonUp"
                                                          Command="{Binding SelectCommand, RelativeSource={RelativeSource AncestorType=Page}}"/>
                                <local:FZMaterial x:Name="MouseHitHelper"
                                                  Color="#00000000" Grid.ColumnSpan="3"
                                                  local:RoutedEventCommand.Action="{Binding ElementName=ClickOnMouseItem}"/>
                                <StrokeHighlightControl x:Name="FocusHighlight"
                                            Style="{StaticResource H_Style_StrokeHighlight_Instant_TextMenu}"
                                            InnerThickness="4"
                                            IsEnabled="{Binding (Selector.IsSelected), FallbackValue=False, RelativeSource={RelativeSource AncestorType=ListBoxItem}}"
                                            />
                            </Grid>

                            <ControlTemplate.Triggers>
                                <DataTrigger Binding="{Binding ShowPosition, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True">
                                    <Setter TargetName="PositionBox" Property="Visibility" Value="Visible"/>
                                    <Setter TargetName="FinishPos" Property="Visibility" Value="Visible"/>
                                </DataTrigger>
                                <DataTrigger Binding="{Binding ShowPlayerIcon, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True">
                                    <Setter TargetName="PositionBox" Property="Visibility" Value="Visible"/>
                                </DataTrigger>
                                <DataTrigger Binding="{Binding ShowPosDelta, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True">
                                    <Setter TargetName="PositionBox" Property="Visibility" Value="Visible"/>
                                </DataTrigger>
                                <DataTrigger Binding="{Binding ShowTeams, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True">
                                    <Setter TargetName="PositionBox" Property="Visibility" Value="Visible"/>
                                </DataTrigger>
                                <DataTrigger Binding="{Binding ShowFinishedStatus, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}" Value="True">
                                    <Setter TargetName="FinishStateBox" Property="Visibility" Value="Visible"/>
                                </DataTrigger>
                                <DataTrigger Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="True">
                                    <Setter Property="local:ZPanel.ZIndex" Value="1" />
                                    <Setter Property="local:ZPanel.ClippingBias"  Value="10" />
                                </DataTrigger>
                                <Trigger Property="IsKeyboardFocusWithin" Value="True">
                                    <Setter Property="Tag" Value="{StaticResource A_Color_SubHeader_Text}"/>
                                    <Setter Property="IsSelected" Value="True" />
                                    <Setter TargetName="RowContentBackground" Property="Style" Value="{StaticResource A_Style_FZMaterial_LeaderboardRow_Selected}" />
                                    <Setter Property="Visibility" TargetName="DropShadow" Value="Visible" />
                                    <Trigger.EnterActions>
                                        <BeginStoryboard Storyboard="{StaticResource A_Storyboard_LeaderboardItem_Selected}"/>
                                    </Trigger.EnterActions>
                                    <Trigger.ExitActions>
                                        <BeginStoryboard Storyboard="{StaticResource A_Storyboard_LeaderboardItem_Unselected}"/>
                                    </Trigger.ExitActions>
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>

            <ControlTemplate x:Key="A_ControlTemplate_LeaderboardHeaderRow" TargetType="Control">
                <Grid Margin="18,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Style="{DynamicResource A_Style_ColumnDefinition_PosDelta}"/>
                        <ColumnDefinition Style="{DynamicResource A_Style_ColumnDefinition_PlayerIcon}"/>
                        <ColumnDefinition Style="{DynamicResource A_Style_ColumnDefinition_PositionSpacer}"/>
                        <ColumnDefinition Style="{DynamicResource A_Style_ColumnDefinition_Rank}"/>
                        <ColumnDefinition Style="{DynamicResource A_Style_ColumnDefinition_Rank_Space}"/>
                        <ColumnDefinition Style="{DynamicResource A_Style_ColumnDefinition_Player}"/>
                        <ColumnDefinition Style="{DynamicResource A_Style_ColumnDefinition_Player_Spacer}"/>
                        <ColumnDefinition Style="{DynamicResource A_Style_ColumnDefinition_Car}"/>
                        <ColumnDefinition Style="{DynamicResource A_Style_ColumnDefinition_Car_Spacer}"/>
                        <ColumnDefinition Style="{DynamicResource A_Style_ColumnDefinition_Class}"/>
                        <ColumnDefinition Style="{DynamicResource A_Style_ColumnDefinition_InviteTimer}"/>
                        <ColumnDefinition Style="{DynamicResource A_Style_ColumnDefinition_Status}"/>
                        <ColumnDefinition Style="{DynamicResource A_Style_ColumnDefinition_Status_Spacer}"/>
                        <ColumnDefinition Style="{DynamicResource A_Style_ColumnDefinition_BestLap}"/>
                        <ColumnDefinition Style="{DynamicResource A_Style_ColumnDefinition_Progress}"/>
                        <ColumnDefinition Style="{DynamicResource A_Style_ColumnDefinition_Time}"/>
                        <ColumnDefinition Style="{DynamicResource A_Style_ColumnDefinition_Score}"/>
                        <ColumnDefinition Style="{DynamicResource A_Style_ColumnDefinition_Points}"/>
                        <ColumnDefinition Style="{DynamicResource A_Style_ColumnDefinition_TotalXP}"/>
                    </Grid.ColumnDefinitions>
                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_PlayerListHeader}" Grid.Column="5" Margin="70,0,0,0" Text="{local:Loc Scoreboard.IDS_Driver}"/>
                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_PlayerListHeader}" Grid.Column="7" Text="{local:Loc Scoreboard.IDS_Car}" Visibility="{Binding EventViewModel.IsShowcase, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}" />
                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_PlayerListHeader}" Grid.Column="7" Text="{local:Loc Scoreboard.IDS_Vehicle}" Visibility="{Binding EventViewModel.IsShowcase, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}, Converter={StaticResource A_FZBooleanToVisibilityConverter}}" />
                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_PlayerListHeader}" Grid.Column="9" Text="{local:Loc Scoreboard.IDS_Class}" />
                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_PlayerListHeader}" Grid.Column="10" Text="{local:Loc Scoreboard.IDS_Invite_Timer}"/>
                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_PlayerListHeader}" Grid.Column="11" Text="{Binding StatusHeaderText, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PlayerListControl}}}"/>
                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_PlayerListHeader}" Grid.Column="13" Text="{local:Loc Scoreboard.IDS_BestLap}" />
                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_PlayerListHeader}" Grid.Column="14" Text="{local:Loc Scoreboard.IDS_Progress}" />
                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_PlayerListHeader}" Grid.Column="15" Text="{local:Loc Scoreboard.IDS_Time}"/>
                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_PlayerListHeader}" Grid.Column="16" Text="{local:Loc Scoreboard.IDS_Points}" />
                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_PlayerListHeader}" Grid.Column="17" Text="{local:Loc Scoreboard.IDS_Points}"/>
                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_PlayerListHeader}" Grid.Column="18" Text="{local:Loc Scoreboard.IDS_TotalXP}"/>
                </Grid>
            </ControlTemplate>
        </Style.Resources>

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <StackPanel>
                        <Decorator Style="{StaticResource A_Style_HeaderRow}" Margin="0,0,0,5">
                            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_FlatPanel_HeaderPill_Green}">
                                <Control Template="{StaticResource A_ControlTemplate_LeaderboardHeaderRow}"/>
                            </local:FZMaterial>
                        </Decorator>
                        <Decorator Height="648" ClipToBounds="True" Margin="-108,0,-30,0">
                            <Grid Margin="108,0,30,0" KeyboardNavigation.DirectionalNavigation="Contained">
                                <Grid.RowDefinitions>
                                    <RowDefinition Style="{StaticResource A_Style_RowDefintion_MainLeaderboardHeight}" />
                                    <RowDefinition Style="{StaticResource A_Style_RowDefintion_SecondaryLeaderboardHeight}" />
                                </Grid.RowDefinitions>
                                <Decorator Grid.Row="0"
                                           x:Name="MainPlayerListDecorator">
                                    <StackPanel>
                                        <local:CommonListBox x:Name="PART_PlayerList"
                                                         Style="{StaticResource A_Style_ListBox_List_PlayerList_Default}"
                                                         ItemTemplate="{StaticResource A_DataTemplate_PlayerList_Item}"
                                                         ItemContainerStyle="{StaticResource A_Style_ListBoxItem_PlayerList}"
                                                         ItemsSource="{Binding DataContext, RelativeSource={RelativeSource Self}}"
                                                         Panel.ZIndex="2"
                                                         AlternationCount="10000"/>
                                        <StackPanel x:Name="EmptyListItems">
                                            <Control Template="{StaticResource A_ControlTemplate_EmptyLeaderboard_Slots}"/>
                                            <Control Template="{StaticResource A_ControlTemplate_EmptyLeaderboard_Slots}"/>
                                            <Control Template="{StaticResource A_ControlTemplate_EmptyLeaderboard_Slots}"/>
                                            <Control Template="{StaticResource A_ControlTemplate_EmptyLeaderboard_Slots}"/>
                                            <Control Template="{StaticResource A_ControlTemplate_EmptyLeaderboard_Slots}"/>
                                            <Control Template="{StaticResource A_ControlTemplate_EmptyLeaderboard_Slots}"/>
                                            <Control Template="{StaticResource A_ControlTemplate_EmptyLeaderboard_Slots}"/>
                                            <Control Template="{StaticResource A_ControlTemplate_EmptyLeaderboard_Slots}"/>
                                            <Control Template="{StaticResource A_ControlTemplate_EmptyLeaderboard_Slots}"/>
                                            <Control Template="{StaticResource A_ControlTemplate_EmptyLeaderboard_Slots}"/>
                                            <Control Template="{StaticResource A_ControlTemplate_EmptyLeaderboard_Slots}"/>
                                            <Control Template="{StaticResource A_ControlTemplate_EmptyLeaderboard_Slots}"/>
                                        </StackPanel>
                                    </StackPanel>
                                </Decorator>
                                <Decorator Grid.Row="1"
                                           Margin="0,6,0,0"
                                           x:Name="SecondPlayerListDecorator">
                                    <StackPanel>
                                        <local:CommonListBox x:Name="PART_PlayerListTeamB"
                                                         Style="{StaticResource A_Style_ListBox_List_PlayerList_Default}"
                                                         ItemTemplate="{StaticResource A_DataTemplate_PlayerList_Item}"
                                                         ItemContainerStyle="{StaticResource A_Style_ListBoxItem_PlayerList}"
                                                         Panel.ZIndex="2"
                                                         AlternationCount="10000"
                                                         KeyboardNavigation.DirectionalNavigation="Continue"/>
                                        <StackPanel x:Name="SecondListEmptyItems">
                                            <Control Template="{StaticResource A_ControlTemplate_EmptyLeaderboard_Slots}"/>
                                            <Control Template="{StaticResource A_ControlTemplate_EmptyLeaderboard_Slots}"/>
                                            <Control Template="{StaticResource A_ControlTemplate_EmptyLeaderboard_Slots}"/>
                                            <Control Template="{StaticResource A_ControlTemplate_EmptyLeaderboard_Slots}"/>
                                            <Control Template="{StaticResource A_ControlTemplate_EmptyLeaderboard_Slots}"/>
                                            <Control Template="{StaticResource A_ControlTemplate_EmptyLeaderboard_Slots}"/>
                                            <Control Template="{StaticResource A_ControlTemplate_EmptyLeaderboard_Slots}"/>
                                            <Control Template="{StaticResource A_ControlTemplate_EmptyLeaderboard_Slots}"/>
                                            <Control Template="{StaticResource A_ControlTemplate_EmptyLeaderboard_Slots}"/>
                                            <Control Template="{StaticResource A_ControlTemplate_EmptyLeaderboard_Slots}"/>
                                            <Control Template="{StaticResource A_ControlTemplate_EmptyLeaderboard_Slots}"/>
                                            <Control Template="{StaticResource A_ControlTemplate_EmptyLeaderboard_Slots}"/>
                                        </StackPanel>
                                    </StackPanel>
                                </Decorator>
                            </Grid>
                        </Decorator>
                    </StackPanel>
                </ControlTemplate>

            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>