    <Page xmlns:local="clr-namespace:ForzaUI"
          xmlns:System="clr-namespace:System;assembly=mscorlib"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
          xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
          x:Class="ForzaUI.A_StartingGrid"
          mc:Ignorable="d"
          Style="{StaticResource A_Style_Page_Generic}"
          DataContext="{Binding RelativeSource={RelativeSource Self}}">

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

    <Page.Resources>
        <ResourceDictionary>
            <local:MappingConverter x:Key="A_Converter_RaceMode_to_RaceModeTexturePath" Default="">
                <local:MappingConverterEntry Key="{x:Static RaceMode.King}"
                                             Value="/ForzaUI;component/Textures/Anthem/Icons/RaceMode/PreRace/king.png"/>
                <local:MappingConverterEntry Key="{x:Static RaceMode.Infection}"
                                             Value="/ForzaUI;component/Textures/Anthem/Icons/RaceMode/PreRace/infected.png"/>
                <local:MappingConverterEntry Key="{x:Static RaceMode.FlagRush}"
                                             Value="/ForzaUI;component/Textures/Anthem/Icons/RaceMode/PreRace/flag.png"/>
                <local:MappingConverterEntry Key="{x:Static RaceMode.TeamKing}"
                                             Value="/ForzaUI;component/Textures/Anthem/Icons/RaceMode/PreRace/king.png"/>
                <local:MappingConverterEntry Key="{x:Static RaceMode.TeamInfected}"
                                             Value="/ForzaUI;component/Textures/Anthem/Icons/RaceMode/PreRace/infected.png"/>
                <local:MappingConverterEntry Key="{x:Static RaceMode.TeamFlagRush}"
                                             Value="/ForzaUI;component/Textures/Anthem/Icons/RaceMode/PreRace/flag.png"/>
            </local:MappingConverter>

            <System:Double x:Key="A_Double_DetailsPanel_InstructionIcon_Width">34</System:Double>
            <System:Double x:Key="A_Double_DetailsPanel_InstructionIcon_Height">34</System:Double>

            <Style x:Key="A_Style_DockPanel_MultiplayerGrid_InstructionalPanel_StartingGrid"
                   TargetType="{x:Type DockPanel}"
                   BasedOn="{StaticResource A_Style_DockPanel_MultiplayerGrid_InstructionalPanel}">
                <Setter Property="Width" Value="364"/>
                <Setter Property="Visibility" Value="{Binding HasCustomRules, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}"/>
            </Style>

            <Style x:Key="A_Style_FZTextBlock_StartingGrid_PlayerTeam_Instruction" TargetType="local:FZTextBlock"
                   BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}" >
                <Setter Property="CapHeight" Value="18"/>
                <Setter Property="TextWrapping" Value="WrapWithOverflow"/>
                <Setter Property="Color" Value="{StaticResource A_Color_SubHeader_Text}"/>
                <Setter Property="VerticalAlignment" Value="Center" />
                <Setter Property="TextAlignment" Value="Center" />
                <Setter Property="Margin" Value="10,5,10,5" />
                <Setter Property="MaxHeight" Value="38" />
                <Setter Property="MarkupConverter"
                        Value="{StaticResource A_MappingConverter_Instruction}" />
            </Style>

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

            <Style x:Key="A_Style_Control_GameMode_Instruction_Panel" TargetType="Control">
                <Style.Resources>
                    <Style x:Key="A_Style_FZTextBlock_Instruction_Text" TargetType="FZTextBlock"
                        BasedOn="{StaticResource A_Style_FZTextBlock_StartingGrid_Instruction}">
                        <Setter Property="MaxWidth" Value="272"/>
                        <Setter Property="HorizontalAlignment" Value="Left"/>
                        <Setter Property="FontFamily" Value="Horizon_D"/>
                    </Style>

                    <Style x:Key="A_Style_FZMaterial_Instruction_Icon" TargetType="FZMaterial">
                        <Setter Property="Width" Value="{StaticResource A_Double_DetailsPanel_InstructionIcon_Width}"/>
                        <Setter Property="Height" Value="{StaticResource A_Double_DetailsPanel_InstructionIcon_Height}"/>
                        <Setter Property="Margin" Value="0,0,20,0"/>
                        <Setter Property="VerticalAlignment" Value="Top"/>
                        <Setter Property="ImageSource" Value="{x:Null}"/>
                    </Style>
                </Style.Resources>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="Control">
                            <FZMaterial Style="{StaticResource A_Style_FZMaterial_GlassPanel_NonInteractive}"
                                        Margin="0,0,0,4">
                                <StackPanel Margin="16,0">
                                    <StackPanel Orientation="Horizontal"
                                                Margin="0,26"
                                                Visibility="{Binding Instruction1, Converter={StaticResource A_StringVisConverter}}">
                                        <FZMaterial x:Name="Instruction1_Icon"
                                                    Style="{StaticResource A_Style_FZMaterial_Instruction_Icon}"/>
                                        <FZTextBlock Style="{StaticResource A_Style_FZTextBlock_Instruction_Text}"
                                                    Text="{Binding Instruction1}"
                                                    MaxWidth="272"
                                                    HorizontalAlignment="Left"/>
                                    </StackPanel>

                                    <FZMaterial Height="2"
                                                Opacity="0.5"
                                                Visibility="{Binding Instruction2, Converter={StaticResource A_StringVisConverter}}"/>

                                    <StackPanel Orientation="Horizontal"
                                                Margin="0,26"
                                                Visibility="{Binding Instruction2, Converter={StaticResource A_StringVisConverter}}">
                                        <FZMaterial x:Name="Instruction2_Icon"
                                                    Style="{StaticResource A_Style_FZMaterial_Instruction_Icon}"/>
                                        <FZTextBlock Style="{StaticResource A_Style_FZTextBlock_Instruction_Text}"
                                                    Text="{Binding Instruction2}"
                                                    MaxWidth="272"
                                                    HorizontalAlignment="Left"/>
                                    </StackPanel>

                                    <FZMaterial Height="2"
                                                Opacity="0.5"
                                                Visibility="{Binding Instruction3, Converter={StaticResource A_StringVisConverter}}"/>

                                    <StackPanel Orientation="Horizontal"
                                                Margin="0,26"
                                                Visibility="{Binding Instruction3, Converter={StaticResource A_StringVisConverter}}">
                                        <FZMaterial x:Name="Instruction3_Icon"
                                                    Style="{StaticResource A_Style_FZMaterial_Instruction_Icon}"/>            
                                        <FZTextBlock Style="{StaticResource A_Style_FZTextBlock_Instruction_Text}"
                                                    Text="{Binding Instruction3}"
                                                    MaxWidth="272"
                                                    HorizontalAlignment="Left"/>
                                    </StackPanel>
                                </StackPanel>
                            </FZMaterial>
                            <ControlTemplate.Triggers>
                                <!-- Race Event -->
                                <MultiDataTrigger>
                                    <MultiDataTrigger.Conditions>
                                        <Condition Binding="{Binding TeamDisplayMode}" Value="{x:Static XAMLNerdTeamDisplayMode.PlayerVsAI}"/>
                                        <Condition Binding="{Binding IsRaceEvent}" Value="True"/>
                                    </MultiDataTrigger.Conditions>
                                    <Setter TargetName="Instruction1_Icon" Property="ImageSource" Value="{StaticResource A_BitmapImage_Lobby_Drivatar}"/>
                                    <Setter TargetName="Instruction2_Icon" Property="ImageSource" Value="/ForzaUI;component/Textures/Anthem/Icons/Lobby/Trophy_Icon.png"/>
                                </MultiDataTrigger>
                                <MultiDataTrigger>
                                    <MultiDataTrigger.Conditions>
                                        <Condition Binding="{Binding TeamDisplayMode}" Value="{x:Static XAMLNerdTeamDisplayMode.RedVsBlue}"/>
                                        <Condition Binding="{Binding IsRaceEvent}" Value="True"/>
                                    </MultiDataTrigger.Conditions>
                                    <Setter TargetName="Instruction1_Icon" Property="ImageSource" Value="/ForzaUI;component/Textures/Anthem/Icons/Lobby/Player_Opponent.png"/>
                                    <Setter TargetName="Instruction2_Icon" Property="ImageSource" Value="/ForzaUI;component/Textures/Anthem/Icons/Lobby/Trophy_Icon.png"/>
                                </MultiDataTrigger>

                                <!-- Infected -->
                                <MultiDataTrigger>
                                    <MultiDataTrigger.Conditions>
                                        <Condition Binding="{Binding TeamColor}" Value="{x:Static PlayerTeamBannerColor.RedTeam}"/>
                                        <Condition Binding="{Binding IsInfected}" Value="True"/>
                                    </MultiDataTrigger.Conditions>
                                    <Setter TargetName="Instruction1_Icon" Property="ImageSource" Value="/ForzaUI;component/Textures/Anthem/Icons/Lobby/infected_icon.png"/>
                                    <Setter TargetName="Instruction2_Icon" Property="ImageSource" Value="/ForzaUI;component/Textures/Anthem/Icons/Lobby/survivor_icon.png"/>
                                </MultiDataTrigger>
                                <MultiDataTrigger>
                                    <MultiDataTrigger.Conditions>
                                        <Condition Binding="{Binding TeamColor}" Value="{x:Static PlayerTeamBannerColor.BlueTeam}"/>
                                        <Condition Binding="{Binding IsInfected}" Value="True"/>
                                    </MultiDataTrigger.Conditions>
                                    <Setter TargetName="Instruction1_Icon" Property="ImageSource" Value="/ForzaUI;component/Textures/Anthem/Icons/Lobby/survivor_icon.png"/>
                                    <Setter TargetName="Instruction2_Icon" Property="ImageSource" Value="/ForzaUI;component/Textures/Anthem/Icons/Lobby/infected_icon.png"/>
                                </MultiDataTrigger>
                                
                                <!-- King -->
                                <MultiDataTrigger>
                                    <MultiDataTrigger.Conditions>
                                        <Condition Binding="{Binding IsKing}" Value="True"/>
                                        <Condition Binding="{Binding IsTeam}" Value="False"/>
                                    </MultiDataTrigger.Conditions>
                                    <Setter TargetName="Instruction1_Icon" Property="ImageSource" Value="/ForzaUI;component/Textures/Anthem/Icons/Lobby/king_icon.png"/>
                                    <Setter TargetName="Instruction2_Icon" Property="ImageSource" Value="/ForzaUI;component/Textures/Anthem/Icons/Lobby/Timer.png"/>
                                </MultiDataTrigger>
                                <MultiDataTrigger>
                                    <MultiDataTrigger.Conditions>
                                        <Condition Binding="{Binding IsKing}" Value="True"/>
                                        <Condition Binding="{Binding IsTeam}" Value="True"/>
                                    </MultiDataTrigger.Conditions>
                                    <Setter TargetName="Instruction1_Icon" Property="ImageSource" Value="/ForzaUI;component/Textures/Anthem/Icons/Lobby/Team_Crown.png"/>
                                    <Setter TargetName="Instruction2_Icon" Property="ImageSource" Value="/ForzaUI;component/Textures/Anthem/Icons/Lobby/Timer.png"/>
                                </MultiDataTrigger>

                                <!-- Flag Rush -->
                                <MultiDataTrigger>
                                    <MultiDataTrigger.Conditions>
                                        <Condition Binding="{Binding IsFlagRush}" Value="True"/>
                                        <Condition Binding="{Binding IsTeam}" Value="False"/>
                                    </MultiDataTrigger.Conditions>
                                    <Setter TargetName="Instruction1_Icon" Property="ImageSource" Value="/ForzaUI;component/Textures/Anthem/Icons/Lobby/Flag_Rush.png"/>
                                    <Setter TargetName="Instruction2_Icon" Property="ImageSource" Value="/ForzaUI;component/Textures/Anthem/Icons/Lobby/Flag_Rush_Target.png"/>
                                </MultiDataTrigger>
                                <MultiDataTrigger>
                                    <MultiDataTrigger.Conditions>
                                        <Condition Binding="{Binding IsFlagRush}" Value="True"/>
                                        <Condition Binding="{Binding IsTeam}" Value="True"/>
                                    </MultiDataTrigger.Conditions>
                                    <Setter TargetName="Instruction1_Icon" Property="ImageSource" Value="/ForzaUI;component/Textures/Anthem/Icons/Lobby/Flag_Rush.png"/>
                                    <Setter TargetName="Instruction2_Icon" Property="ImageSource" Value="/ForzaUI;component/Textures/Anthem/Icons/Lobby/Flag_Rush_Target.png"/>
                                </MultiDataTrigger>

                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>

            <ControlTemplate x:Key="A_ControlTemplate_Control_InstructionPanelContent_PlayGroundGamesInstruction" TargetType="Control">
                <DockPanel>
                    <FZMaterial DockPanel.Dock="Top"
                                ImageSource="{Binding CurrentRaceMode, Converter={StaticResource A_Converter_RaceMode_to_RaceModeTexturePath}}"
                                Width="{StaticResource A_Double_DetailsPanel_Width}"
                                Height="{StaticResource A_Double_DetailsPanel_TopPanel_Height}"
                                Margin="0,0,0,4"/>
                    <Control DockPanel.Dock="Top"
                             Style="{StaticResource A_Style_Control_PlayersTeam_Banner}"/>
                    <Control DockPanel.Dock="Bottom"
                             Style="{StaticResource A_Style_Control_GameMode_Instruction_Panel}"/>
                </DockPanel>
            </ControlTemplate>

            <ControlTemplate x:Key="A_ControlTemplate_Control_InstructionPanelContent_PlayGroundGamesInstruction_TeamMode" TargetType="Control">
                <DockPanel>
                    <Control DockPanel.Dock="Top"
                             Template="{StaticResource A_ControlTemplate_MapView}"/>
                    <Control DockPanel.Dock="Top"
                             Style="{StaticResource A_Style_Control_PlayersTeam_Banner}"/>
                    <Control DockPanel.Dock="Bottom"
                             Style="{StaticResource A_Style_Control_GameMode_Instruction_Panel}"/>
                </DockPanel>
            </ControlTemplate>

            <Style x:Key="A_Style_Control_InstructionPanelContent"
                   TargetType="Control">
                <Setter Property="Template" Value="{StaticResource A_ControlTemplate_Control_InstructionPanelContent}" />
                <Style.Triggers>
                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding IsTeam}" Value="True" />
                            <Condition LogicalOp="NotEquals" Binding="{Binding TeamDisplayMode}" Value="{x:Static local:XAMLNerdTeamDisplayMode.TeamVsTime}" />
                        </MultiDataTrigger.Conditions>
                        <Setter Property="Template" Value="{StaticResource A_ControlTemplate_Control_InstructionPanelContent_PlayGroundGamesInstruction_TeamMode}" />
                    </MultiDataTrigger>
                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding IsTeam}" Value="True" />
                            <Condition Binding="{Binding TeamDisplayMode}" Value="{x:Static local:XAMLNerdTeamDisplayMode.TeamVsTime}" />
                        </MultiDataTrigger.Conditions>
                        <Setter Property="Template" Value="{StaticResource A_ControlTemplate_Control_InstructionPanelContent}" />
                    </MultiDataTrigger>
                    <DataTrigger Binding="{Binding IsInfected}" Value="True">
                        <Setter Property="Template" Value="{StaticResource A_ControlTemplate_Control_InstructionPanelContent_PlayGroundGamesInstruction}" />
                    </DataTrigger>
                    <DataTrigger Binding="{Binding IsKing}" Value="True">
                        <Setter Property="Template" Value="{StaticResource A_ControlTemplate_Control_InstructionPanelContent_PlayGroundGamesInstruction}" />
                    </DataTrigger>
                    <DataTrigger Binding="{Binding IsFlagRush}" Value="True">
                        <Setter Property="Template" Value="{StaticResource A_ControlTemplate_Control_InstructionPanelContent_PlayGroundGamesInstruction}" />
                    </DataTrigger>
                    <DataTrigger Binding="{Binding IsCoopShowcaseEvent}" Value="True">
                        <Setter Property="Template" Value="{StaticResource A_ControlTemplate_Control_InstructionPanelContent}" />
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_ContentControl_StartingGridScreenTitle"
                   TargetType="ContentControl"
                   BasedOn="{StaticResource A_Style_ContentControl_ScreenTitleBlock}">
                <Setter Property="local:BindingProxy.A"
                        Value="/ForzaUI;component/Textures/Anthem/Icons/Titles/Leaderboards.png" />
            </Style>

            <Style x:Key="A_Style_PlayerListControl_StartingGrid"
                   TargetType="local:PlayerListControl"
                   BasedOn="{StaticResource A_Style_PlayerListControl_Default}">
                <Setter Property="ShowPosition"
                        Value="{Binding IsRaceEvent, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}"/>
                <Setter Property="ShowKing"
                        Value="{Binding IsKing, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}"/>
                <Setter Property="ShowInfected"
                        Value="{Binding IsInfected, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}"/>
                <Setter Property="ShowFlagRush"
                        Value="{Binding IsFlagRush, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}"/>
                <Style.Triggers>
                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding IsTeam, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" Value="True" />
                            <Condition LogicalOp="NotEquals" Binding="{Binding TeamDisplayMode, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" Value="{x:Static local:XAMLNerdTeamDisplayMode.TeamVsTime}" />
                        </MultiDataTrigger.Conditions>
                        <Setter Property="ShowTeams" Value="True"/>
                        <Setter Property="ShowPosition" Value="False"/>
                        <Setter Property="ShowPlayerIcon" Value="False"/>
                    </MultiDataTrigger>
                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding IsTeam, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" Value="True" />
                            <Condition Binding="{Binding TeamDisplayMode, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" Value="{x:Static local:XAMLNerdTeamDisplayMode.TeamVsTime}" />
                        </MultiDataTrigger.Conditions>
                        <Setter Property="ShowPosition" Value="True"/>
                        <Setter Property="ShowPlayerIcon" Value="False"/>
                    </MultiDataTrigger>
                    <DataTrigger Binding="{Binding IsInfected, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}"
                                 Value="True">
                        <Setter Property="ShowPlayerIcon" Value="True"/>
                        <Setter Property="ShowPosition" Value="False"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding IsKing, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}"
                                 Value="True">
                        <Setter Property="ShowPlayerIcon" Value="True"/>
                        <Setter Property="ShowPosition" Value="False"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding IsFlagRush, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}"
                                 Value="True">
                        <Setter Property="ShowPlayerIcon" Value="False"/>
                        <Setter Property="ShowPosition" Value="False"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding IsCoopShowcaseEvent, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}"
                                 Value="True">
                        <Setter Property="ShowTeams" Value="True"/>
                        <Setter Property="ShowPosition" Value="False"/>
                        <Setter Property="ShowPlayerIcon" Value="False"/>
                    </DataTrigger>
                </Style.Triggers>
                <Style.Resources>
                    <Style x:Key="A_Style_ColumnDefinition_Class"
                           TargetType="{x:Type ColumnDefinition}">
                        <Setter Property="Width" Value="153"/>
                    </Style>
                </Style.Resources>
            </Style>
        </ResourceDictionary>
    </Page.Resources>

    <Grid>
        <Control Style="{StaticResource A_Style_Control_ScreenBackground}" />
        <local:PlayerBarControl x:Name="TopBar"
                                Style="{StaticResource A_Style_PlayerBarControl}" />
        <ContentControl x:Name="BottomBar"
                        Style="{StaticResource A_Style_ButtonBar}">
            <ContentControl x:Name="PART_DefaultHelpPanel"
                            local:ControllerButtonPanel.ADescription="{local:Loc HelpButtons.IDS_Select}"
                            local:ControllerButtonPanel.BDescription="{local:Loc HelpButtons.IDS_Back}"
                            Style="{StaticResource A_Style_ContentControl_DefaultButtonBar}" />
        </ContentControl>

        <Border Style="{StaticResource A_Style_Border_ScenePadding}"
                SnapsToDevicePixels="True"
                UseLayoutRounding="True">
            <Grid x:Name="PART_LayoutRoot">
                <StackPanel Orientation="Vertical"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center">
                    <DockPanel Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_0}">
                        <ContentControl Content="{Binding ScreenTitle}"
                                        Style="{StaticResource A_Style_ContentControl_StartingGridScreenTitle}"
                                        DockPanel.Dock="Left"
                                        HorizontalAlignment="Left"
                                        VerticalAlignment="Top"/>
                    </DockPanel>

                    <StackPanel Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_0}"
                                Orientation="Horizontal">
                        <local:PlayerListControl x:Name="PART_PlayerList"
                                                 Style="{StaticResource A_Style_PlayerListControl_StartingGrid}"
                                                 DataContext="{Binding EventViewModel.Participants}" 
                                                 Panel.ZIndex="2"/>
                        <Decorator Style="{StaticResource A_Style_FrameworkElement_MultiplayerGrid_InstructionalPanel}">
                            <DockPanel Style="{StaticResource A_Style_DockPanel_MultiplayerGrid_InstructionalPanel_StartingGrid}">
                                <ContentControl DockPanel.Dock="Top" 
                                                Content="{Binding ScreenSubTitle}"
                                                Style="{StaticResource A_Style_ContentControl_DetailsHeader_StartingGrid}"/>
                                <Control Style="{StaticResource A_Style_Control_InstructionPanelContent}"/>
                            </DockPanel>
                        </Decorator>
                    </StackPanel>
                </StackPanel>
            </Grid>
        </Border>
    </Grid>
</Page>
