<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_PostRaceEventResults"
      mc:Ignorable="d"
      Style="{StaticResource A_Style_Page_Generic}"
      DataContext="{Binding RelativeSource={RelativeSource Self}}"
      ScreenReader.PageRequiresKeyboardFocusWithin="False">

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

    <Page.Resources>
        <ResourceDictionary>
            <!-- Colors -->
            <Color x:Key="A_Color_DarkPanelBackground">#99323a41</Color>

            <!-- Misc Values -->
            <System:Double x:Key="A_TeamTotal_Width">360</System:Double>

            <Style x:Key="A_Style_FZRun_TeamPoints_Unit" TargetType="local:FZRun">
                <Setter Property="FontSize" Value="50" />
            </Style>
                    
            <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPresetRoundtangle_TeamPanel_OuterAll"
                BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}" />

            
            <Size x:Key="A_Size_PlayerImage_GamerPicSizeParams">114,120</Size>
            <Size x:Key="A_Size_TeamImage_GamerPicSizeParams">342,342</Size>
            
            <Style x:Key="A_Style_FZMaterial_Team_Image" TargetType="local:FZMaterial">
                <Setter Property="Height" Value="240" />
                <Setter Property="Width" Value="342" />
            </Style>

            <Style x:Key="A_Style_Control_Profile_Icon_Loading_Spinner" TargetType="Control">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="Control">
                            <Grid Width="114" Height="120">
                                <ProgressBar VerticalAlignment="Center" HorizontalAlignment="Center"
                                             Style="{StaticResource A_Style_Progressbar_Loading_SmallSpinner}" Margin="0"/>
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>

            <Style x:Key="A_Style_ListBoxItem_TeamMate_Gamerpic" TargetType="ListBoxItem">
                <Setter Property="Height" Value="120" />
                <Setter Property="Width" Value="114" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="ListBoxItem">
                            <Grid>
                                <Control Style="{StaticResource A_Style_Control_Profile_Icon_Loading_Spinner}"/>
                                <local:FZMaterial Visibility="{Binding Downloaded, RelativeSource={RelativeSource Self}, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"
                                    ImageSource="{Binding UserProfile, Converter={StaticResource A_GamerPicConverter}, ConverterParameter={StaticResource A_Size_PlayerImage_GamerPicSizeParams}}" />
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>

            <Style x:Key="A_Style_CommonListBox_TeamPlayerImages" TargetType="local:CommonListBox">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="local:CommonListBox">
                            <WrapPanel IsItemsHost="True" />
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
                <Setter Property="ItemContainerStyle" Value="{StaticResource A_Style_ListBoxItem_TeamMate_Gamerpic}" />
            </Style>

            <ControlTemplate x:Key="A_ControlTemplate_TeamPlayerImages">
                <Grid>
                    <local:FZMaterial Preset="{StaticResource A_FZMaterialPresetRoundtangle_TeamPanel_OuterAll}" CaptureSubgraph="True">
                        <local:CommonListBox Style="{StaticResource A_Style_CommonListBox_TeamPlayerImages}"
                                             ClipToBounds="True" ItemsSource="{Binding}" />
                    </local:FZMaterial>
                </Grid>
            </ControlTemplate>
            
            <Style x:Key="A_Style_Control_PlayerImages" TargetType="Control">
                <Setter Property="Width" Value="342"/>
                <Setter Property="Height" Value="240"/>
                <Setter Property="Template" Value="{StaticResource A_ControlTemplate_TeamPlayerImages}"/>
            </Style>
            
            <ControlTemplate x:Key="A_ControlTemplate_TeamImage">
                <Grid>
                    <Grid>
                        <ProgressBar VerticalAlignment="Center" HorizontalAlignment="Center"
                                     Style="{StaticResource A_Style_Progressbar_Loading_SmallSpinner}" Margin="0"/>
                    </Grid>
                    <local:FZMaterial Preset="{StaticResource A_FZMaterialPresetRoundtangle_TeamPanel_OuterAll}"
                        CaptureSubgraph="True">
                        <local:FZMaterial ImageSource="{Binding UserProfile, Converter={StaticResource A_GamerPicConverter}, ConverterParameter={StaticResource A_Size_TeamImage_GamerPicSizeParams}, FallbackValue={StaticResource A_BitmapImage_GamerPicFallback}}"
                                      DataContext="{Binding CurrentItem}"
                                      Visibility="{Binding Downloaded, RelativeSource={RelativeSource Self}, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"
                                      Style="{StaticResource A_Style_FZMaterial_Team_Image}"
                                      Stretch="UniformToFill"
                                      HorizontalAlignment="Center"
                                      VerticalAlignment="Center"
                                      Width="342"
                                      Height="342"
                                      GreedyMeasure="True"
                                      ClipToBounds="True" />
                    </local:FZMaterial>
                </Grid>
            </ControlTemplate>
            
            <Style x:Key="A_Style_Control_TeamImage" TargetType="Control">
                <Setter Property="Width" Value="342"/>
                <Setter Property="Height" Value="240"/>
                <Setter Property="Template" Value="{StaticResource A_ControlTemplate_TeamImage}"/>
            </Style>
                        
            <Style x:Key="A_Style_FZRun_Score_BOLD"
                   TargetType="local:FZRun">
                <Setter Property="FontFamily"
                        Value="Horizon_A" />
                <Setter Property="FontSize" Value="80"/>
            </Style>

            <MappingConverter x:Key="A_MappingConverter_Score">
                <MappingConverterEntry Key="{NoCase BOLD}" Value="{StaticResource A_Style_FZRun_Score_BOLD}" />
            </MappingConverter>

             <Style x:Key="A_FZTextBlock_Style_Team_Points" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_HeaderBlock}">
                <Setter Property="MarkupConverter" Value="{StaticResource A_MappingConverter_Score}"/>
                <Setter Property="FontFamily" Value="Horizon_B"/>
                <Setter Property="CapHeight" Value="54"/>
            </Style>

            <MappingConverter x:Key="A_LangStrToTeamWinConditionLineHeight" Default="30">
                <MappingConverterEntry Key="JP" Value="42"/>
                <MappingConverterEntry Key="CHS" Value="42"/>
                <MappingConverterEntry Key="CHT" Value="42"/>
                <MappingConverterEntry Key="PL" Value="38"/>
            </MappingConverter>

            <Style x:Key="A_FZTextBlock_Style_Team_Event" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_HeaderBlock}">
                <Setter Property="MarkupConverter" Value="{StaticResource A_MappingConverter_Score}"/>
                <Setter Property="FontFamily" Value="Horizon_A"/>
                <Setter Property="LineHeight" Value="{Binding LangStr, Source={StaticResource PART_UISceneContext}, Converter={StaticResource A_LangStrToTeamWinConditionLineHeight}}"/>
                <Setter Property="LineStackingStrategy" Value="BlockLineHeight"/>
                <Setter Property="TextAlignment" Value="Center"/>
                <Setter Property="CapHeight" Value="25"/>
            </Style>

            <Style x:Key="A_FZTextBlock_Style_Team_Infected" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_FZTextBlock_Style_Team_Event}"/>
            <Style x:Key="A_FZTextBlock_Style_Team_King" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_FZTextBlock_Style_Team_Event}" />
            <Style x:Key="A_FZTextBlock_Style_Team_FlagRush" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_FZTextBlock_Style_Team_Event}" />

            <local:MappingConverter x:Key="A_Converter_EventNameToTeamScoreStyle" Default="{StaticResource A_FZTextBlock_Style_Team_Points}">
                <local:MappingConverterEntry Key="{x:Static local:UIRacificationMode.TeamInfected}" Value="{StaticResource A_FZTextBlock_Style_Team_Infected}"/>
                <local:MappingConverterEntry Key="{x:Static local:UIRacificationMode.TeamKing}" Value="{StaticResource A_FZTextBlock_Style_Team_King}"/>
                <local:MappingConverterEntry Key="{x:Static local:UIRacificationMode.TeamFlagRush}" Value="{StaticResource A_FZTextBlock_Style_Team_FlagRush}"/>
            </local:MappingConverter>

            <local:MappingConverter x:Key="A_Converter_TeamIdToTintColor" Default="#00000000">
                <local:MappingConverterEntry Key="0" Value="{StaticResource A_Color_TeamA_Score_TintColor}"/>
                <local:MappingConverterEntry Key="1" Value="{StaticResource A_Color_TeamB_Score_TintColor}"/>
            </local:MappingConverter>

            <Style x:Key="A_Style_FZTextBlock_Team_ResultText" TargetType="local:FZTextBlock">
                <Setter Property="FontFamily" Value="Horizon_A"/>
                <Setter Property="CapHeight" Value="42"/>
                <Setter Property="VerticalAlignment" Value="Stretch"/>
                <Setter Property="HorizontalAlignment" Value="Center"/>
                <Setter Property="TextAlignment" Value="Center"/>
                <Setter Property="Margin" Value="14"/>
                <Setter Property="MaxHeight" Value="42"/>
                <Setter Property="MaxWidth" Value="284"/>
            </Style>

            <Style x:Key="A_Style_Decorator_Team_ResultTextWrapper" TargetType="Decorator">
                <Setter Property="RenderTransform" Value="{StaticResource A_Transform_Italic}"/>
                <Setter Property="VerticalAlignment" Value="Center"/>
            </Style>

            <Style x:Key="A_Style_FZMaterial_Team_Result_Defeat" TargetType="local:FZMaterial">
                <Setter Property="HorizontalAlignment" Value="Center"/>
                <Setter Property="Preset" Value="{StaticResource H_Roundtangle_Outer_3px}"/>
                <Setter Property="Color" Value="{StaticResource A_Color_TeamA_Score_Background}"/>
            </Style>

            <ControlTemplate x:Key="A_ControlTemplate_Player_Panel_Team_Winner" TargetType="ContentControl">
                <Grid>
                    <Decorator Style="{StaticResource A_Style_Decorator_Team_ResultTextWrapper}">
                        <Grid>
                            <Decorator VerticalAlignment="Top">
                                <Decorator.RenderTransform>
                                    <SkewTransform AngleX="8"/>
                                </Decorator.RenderTransform>
                                <Grid Width="50" Height="50" VerticalAlignment="Top" Margin="0,-40,0,0">
                                    <local:FZMaterial Color="{StaticResource H_Color_Primary_Yellow}"
                                              RenderTransformOrigin="0.5,0.4"
                                              Opacity="0.5">
                                        <local:FZMaterial.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform ScaleX="5" ScaleY="4"/>
                                            </TransformGroup>
                                        </local:FZMaterial.RenderTransform>
                                        <local:FZMaterial.Preset>
                                            <local:FZMaterialPresetRoundtangle BasedOn="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterAll}"
                                                                        AlphaMode="Normal"
                                                                        Softness="30"/>
                                        </local:FZMaterial.Preset>
                                    </local:FZMaterial>
                                    <local:FZMaterial x:Name="TrophyIcon" 
                                              Color="{StaticResource H_Color_Primary_Yellow}" 
                                              ImageSource="/ForzaUI;component/Textures/Anthem/Icons/Lobby/Winning_Team_Icon.png">

                                    </local:FZMaterial>
                                </Grid>
                            </Decorator>

                            <Grid VerticalAlignment="Top">
                                <local:FZMaterial Color="{StaticResource H_Color_Primary_Yellow}"
                                              RenderTransformOrigin="0.5,0.5">
                                    <local:FZMaterial.RenderTransform>
                                        <TransformGroup>
                                            <ScaleTransform ScaleX="0.9" ScaleY="3"/>
                                        </TransformGroup>
                                    </local:FZMaterial.RenderTransform>
                                    <local:FZMaterial.Preset>
                                        <local:FZMaterialPresetRoundtangle BasedOn="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterAll}"
                                                                    AlphaMode="Normal"
                                                                    Softness="15"/>
                                    </local:FZMaterial.Preset>
                                </local:FZMaterial>
                                <local:FZMaterial Color="{StaticResource H_Color_Primary_Yellow}" Height="4" Width="300" Opacity="0.3">
                                    <local:FZMaterial.OpacityMask>
                                        <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
                                            <GradientStop Color="Transparent" Offset="0"/>
                                            <GradientStop Color="White" Offset="0.44"/>
                                            <GradientStop Color="Transparent" Offset="0.45"/>
                                            <GradientStop Color="Transparent" Offset="0.55"/>
                                            <GradientStop Color="White" Offset="0.56"/>
                                            <GradientStop Color="Transparent" Offset="1"/>
                                        </LinearGradientBrush>
                                    </local:FZMaterial.OpacityMask>
                                </local:FZMaterial>
                            </Grid>
                            <local:FZTextBlock Text="{local:Loc Scoreboard.IDS_TeamScore_Victory}"
                                               Style="{StaticResource A_Style_FZTextBlock_Team_ResultText}"
                                               Color="{StaticResource H_Color_Primary_Yellow}"/>
                            <Grid VerticalAlignment="Bottom">
                                <local:FZMaterial Color="{StaticResource H_Color_Primary_Yellow}"
                                              RenderTransformOrigin="0.5,0.5">
                                    <local:FZMaterial.RenderTransform>
                                        <TransformGroup>
                                            <ScaleTransform ScaleX="0.9" ScaleY="3"/>
                                        </TransformGroup>
                                    </local:FZMaterial.RenderTransform>
                                    <local:FZMaterial.Preset>
                                        <local:FZMaterialPresetRoundtangle BasedOn="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterAll}"
                                                                    AlphaMode="Normal"
                                                                    Softness="15"/>
                                    </local:FZMaterial.Preset>
                                </local:FZMaterial>
                                <local:FZMaterial Color="{StaticResource H_Color_Primary_Yellow}" Height="4" Width="300" Opacity="0.3">
                                    <local:FZMaterial.OpacityMask>
                                        <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
                                            <GradientStop Color="Transparent" Offset="0"/>
                                            <GradientStop Color="White" Offset="0.2"/>
                                            <GradientStop Color="White" Offset="0.8"/>
                                            <GradientStop Color="Transparent" Offset="1"/>
                                        </LinearGradientBrush>
                                    </local:FZMaterial.OpacityMask>
                                </local:FZMaterial>
                            </Grid>
                        </Grid>
                    </Decorator>
                </Grid>
            </ControlTemplate>
            
            <ControlTemplate x:Key="A_ControlTemplate_Player_Panel_Team_Loser" TargetType="ContentControl">
                <Decorator Style="{StaticResource A_Style_Decorator_Team_ResultTextWrapper}">
                    <Grid>
                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_Team_Result_Defeat}"
                                          Width="290"
                                          Opacity="0.5">
                            <local:FZMaterial.OpacityMask>
                                <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
                                    <GradientStop Color="White" Offset="0"/>
                                    <GradientStop Color="Transparent" Offset="0.09"/>
                                    <GradientStop Color="Transparent" Offset="0.91"/>
                                    <GradientStop Color="White" Offset="1"/>
                                </LinearGradientBrush>
                            </local:FZMaterial.OpacityMask>
                        </local:FZMaterial>
                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_Team_Result_Defeat}"
                                          Width="255">
                            <local:FZMaterial.OpacityMask>
                                <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
                                    <GradientStop Color="White" Offset="0"/>
                                    <GradientStop Color="Transparent" Offset="0.09"/>
                                    <GradientStop Color="Transparent" Offset="0.91"/>
                                    <GradientStop Color="White" Offset="1"/>
                                </LinearGradientBrush>
                            </local:FZMaterial.OpacityMask>
                        </local:FZMaterial>
                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_Team_Result_Defeat}">
                            <local:FZTextBlock Text="{local:Loc Scoreboard.IDS_TeamScore_Defeat}"
                                                Style="{StaticResource A_Style_FZTextBlock_Team_ResultText}"
                                                Color="{StaticResource H_Color_Primary_Black}"
                                                Width="192"/>
                        </local:FZMaterial>
                    </Grid>
                </Decorator>
            </ControlTemplate>
            
            <local:MappingConverter x:Key="A_Converter_BoolToWinnerLoserTemplate" Default="{StaticResource A_ControlTemplate_Player_Panel_Team_Loser}">
                <local:MappingConverterEntry Key="True" Value="{StaticResource A_ControlTemplate_Player_Panel_Team_Winner}"/>
            </local:MappingConverter>

            <ControlTemplate x:Key="A_ControlTemplate_Player_Panel" TargetType="ContentControl">
                <Grid>
                    <Control Style="{StaticResource A_Style_Control_PlayerImages}"
                             DataContext="{Binding TeamView}"/>
                    <local:FZMaterial Color="{Binding TeamId, Converter={StaticResource A_Converter_TeamIdToTintColor}}"
                                      Style="{StaticResource A_Style_FZMaterial_Team_Image}"
                                      Preset="{StaticResource A_FZMaterialPresetRoundtangle_TeamPanel_OuterAll}"/>
                </Grid>
            </ControlTemplate>

            <local:OffsetKeyTime x:Key="A_KeyTime_FadeOutStart"
                                 KeyTime="0:0:3"/>            
            <local:OffsetKeyTime x:Key="A_KeyTime_FadeOutEnd"
                                 KeyTime="{StaticResource A_KeyTime_FadeOutStart}"
                                 Offset="0:0:0.5"/>
            <local:OffsetKeyTime x:Key="A_KeyTime_FadeInEnd"
                                 KeyTime="{StaticResource A_KeyTime_FadeOutEnd}"
                                 Offset="0:0:0.5"/>

            <Storyboard x:Key="A_StoryBoard_HideScore">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="TeamAResult"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_FadeOutEnd}" Value="0"/>
                    <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_FadeInEnd}" Value="1" EasingFunction="{local:ExponentialEasing EasingMode=EaseIn}"/>
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="TeamBResult"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_FadeOutEnd}" Value="0"/>
                    <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_FadeInEnd}" Value="1" EasingFunction="{local:ExponentialEasing EasingMode=EaseIn}"/>
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="TeamAScore"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_FadeOutStart}" Value="1"/>
                    <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_FadeOutEnd}" Value="0" EasingFunction="{local:ExponentialEasing EasingMode=EaseIn}"/>
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="TeamBScore"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_FadeOutStart}" Value="1"/>
                    <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_FadeOutEnd}" Value="0" EasingFunction="{local:ExponentialEasing EasingMode=EaseIn}"/>

                </DoubleAnimationUsingKeyFrames>

            </Storyboard>

            <Style x:Key="A_Style_Control_TeamTotal" TargetType="{x:Type Control}">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate>
                            <ControlTemplate.Resources>
                                <Double x:Key="A_Double_TeamTotal_Header_Height">50</Double>

                                <Style x:Key="A_Style_FZTextBlock_TeamTotal_Header" TargetType="FZTextBlock"
                                    BasedOn="{StaticResource A_Style_FZTextBlock_HeaderBlock}">
                                    <Setter Property="FontFamily" Value="Horizon_A"/>
                                    <Setter Property="VerticalAlignment" Value="Center"/>
                                    <Setter Property="Color" Value="{StaticResource A_Color_SubHeader_Text}"/>
                                    <Setter Property="CapHeight" Value="20"/>
                                    <Setter Property="Margin" Value="8,0,8,-15"/>
                                </Style>

                            </ControlTemplate.Resources>
                            <Grid x:Name="screenReaderTeamValues"
                                local:ManualPassthroughProperty.Input="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}}"
                                local:ManualPassthroughProperty.Allowed="{Binding Visibility, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type DockPanel}}, Converter={StaticResource A_Converter_VisibilityToBool}, FallbackValue=False}"
                                local:MultiStringFormatter.Format="{Loc Scoreboard.IDS_ScreenReader_Format_TeamWinning}"
                                local:ScreenReader.Line="{Binding (local:ManualPassthroughProperty.Output), RelativeSource={RelativeSource Self}, Converter={StaticResource A_Converter_TrimInlineMarkup}}"
                                local:ScreenReader.LineType="SelectedDetails"
                                local:ScreenReader.Event="OnChange">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="*" />
                                    <RowDefinition Height="5" />
                                    <RowDefinition Height="*" />
                                </Grid.RowDefinitions>
                                <!--Teams are always ordered Red then Blue regardless of winning order-->
                                <local:FZMaterial Color="{StaticResource A_Color_TeamA_Score_Background}" 
                                                  Grid.Row="0" 
                                                  Style="{StaticResource A_Style_FZMaterial_FlatPanel_Tile}">
                                    <DockPanel Margin="0">
                                        <Decorator DockPanel.Dock="Top" 
                                                   Height="{StaticResource A_Double_TeamTotal_Header_Height}">
                                            <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_TeamTotal_Header}" 
                                                               Text="{Binding EventViewModel.TeamA.TeamName}"/>
                                        </Decorator>
                                        <Grid>
                                            <ContentControl Template="{StaticResource A_ControlTemplate_Player_Panel}"
                                                            DataContext="{Binding EventViewModel.TeamA}"/>
                                            <local:FZTextBlock x:Name="TeamAScore" 
                                                               VerticalAlignment="Center" HorizontalAlignment="Center"
                                                               Text="{Binding EventViewModel.TeamA.Score}"
                                                               Style="{Binding EventViewModel.EventType, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}, Converter={StaticResource A_Converter_EventNameToTeamScoreStyle}}"
                                                               Color="{StaticResource A_Color_SubHeader_Text}" 
                                                               Opacity="1"/>
                                            <ContentControl x:Name="TeamAResult" 
                                                            Template="{Binding EventViewModel.TeamAWinning, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}, Converter={StaticResource A_Converter_BoolToWinnerLoserTemplate}}"
                                                            Opacity="0"/>
                                        </Grid>
                                    </DockPanel>
                                </local:FZMaterial>
                                <local:FZMaterial Color="{StaticResource A_Color_TeamB_Score_Background}" 
                                                  Grid.Row="2" 
                                                  Style="{StaticResource A_Style_FZMaterial_FlatPanel_Tile}">
                                    <DockPanel Margin="0">
                                        <Decorator DockPanel.Dock="Top" 
                                                   Height="{StaticResource A_Double_TeamTotal_Header_Height}">
                                            <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_TeamTotal_Header}" 
                                                               Text="{Binding EventViewModel.TeamB.TeamName}"/>
                                        </Decorator>
                                        <Grid>
                                            <ContentControl Template="{StaticResource A_ControlTemplate_Player_Panel}"
                                                            DataContext="{Binding EventViewModel.TeamB}"/>
                                            <local:FZTextBlock x:Name="TeamBScore" 
                                                               VerticalAlignment="Center" HorizontalAlignment="Center"
                                                               Text="{Binding EventViewModel.TeamB.Score}"
                                                               Style="{Binding EventViewModel.EventType, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}, Converter={StaticResource A_Converter_EventNameToTeamScoreStyle}}"
                                                               Color="{StaticResource A_Color_SubHeader_Text}" 
                                                               Opacity="1"/>
                                            <ContentControl x:Name="TeamBResult" 
                                                            Template="{Binding EventViewModel.TeamBWinning, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}, Converter={StaticResource A_Converter_BoolToWinnerLoserTemplate}}"
                                                            Opacity="0"/>
                                        </Grid>
                                    </DockPanel>
                                </local:FZMaterial>
                            </Grid>
                            <ControlTemplate.Triggers>
                                <DataTrigger Binding="{Binding OnlyShowScore, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" Value="False">
                                    <DataTrigger.EnterActions>
                                        <BeginStoryboard Storyboard="{StaticResource A_StoryBoard_HideScore}" />
                                    </DataTrigger.EnterActions>
                                </DataTrigger>
                                <DataTrigger Binding="{Binding EventViewModel.TeamAWinning}" Value="True">
                                    <Setter TargetName="screenReaderTeamValues" Property="local:MultiStringFormatter.Param0" Value="{Binding EventViewModel.TeamA.TeamName}" />
                                </DataTrigger>
                                <DataTrigger Binding="{Binding EventViewModel.TeamBWinning}" Value="True">
                                    <Setter TargetName="screenReaderTeamValues" Property="local:MultiStringFormatter.Param0" Value="{Binding EventViewModel.TeamB.TeamName}" />
                                </DataTrigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
                        
            
            <System:Double x:Key="A_Double_InstructionBox_MaxContentWidth">330</System:Double>

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

            <MappingConverter x:Key="A_MappingConverter_EventResults_Instruction">
                <MappingConverterEntry Key="{NoCase BOLD}" Value="{StaticResource A_Style_FZRun_EventResults_BOLD}" />
            </MappingConverter>

            <Style x:Key="A_Style_FZTextBlock_EventResults_Instruction" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_HorizonB}" >
                <Setter Property="FontSize" Value="42"/>
                <Setter Property="TextWrapping" Value="WrapWithOverflow"/>
                <Setter Property="Color" Value="{StaticResource A_Color_SubHeader_Text}"/>
                <Setter Property="Margin" Value="20"/>
                <Setter Property="HorizontalAlignment" Value="Center" />
                <Setter Property="VerticalAlignment" Value="Center" />
                <Setter Property="TextAlignment" Value="Center" />
                <Setter Property="MarkupConverter" Value="{StaticResource A_MappingConverter_EventResults_Instruction}" />
                <Setter Property="Width" Value="{StaticResource A_Double_InstructionBox_MaxContentWidth}" />
            </Style>

            <!-- Visual State Storyboards -->
            <Storyboard x:Key="A_Storyboard_VisualState_SinglePlayer">
                <ObjectAnimationUsingKeyFrames Duration="0:0:0"
                                               Storyboard.TargetName="TeamTotalsGrid"
                                               Storyboard.TargetProperty="(UIElement.Visibility)">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                            Value="{x:Static Visibility.Collapsed}" />
                </ObjectAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPosition)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowBestLap)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowTime)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="A_Storyboard_VisualState_SinglePlayerCustomScore">
                <ObjectAnimationUsingKeyFrames Duration="0:0:0"
                                               Storyboard.TargetName="TeamTotalsGrid"
                                               Storyboard.TargetProperty="(UIElement.Visibility)">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                            Value="{x:Static Visibility.Collapsed}" />
                </ObjectAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPosition)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPoints)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="A_Storyboard_VisualState_SinglePlayer_Playthrough">
                <ObjectAnimationUsingKeyFrames Duration="0:0:0"
                                               Storyboard.TargetName="TeamTotalsGrid"
                                               Storyboard.TargetProperty="(UIElement.Visibility)">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                            Value="{x:Static Visibility.Collapsed}" />
                </ObjectAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPosition)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowScore)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowBestLap)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowTime)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="A_Storyboard_VisualState_SinglePlayerIEHeat">
                <ObjectAnimationUsingKeyFrames Duration="0:0:0"
                                               Storyboard.TargetName="TeamTotalsGrid"
                                               Storyboard.TargetProperty="(UIElement.Visibility)">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                            Value="{x:Static Visibility.Collapsed}" />
                </ObjectAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPosition)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowProgress)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowTime)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="A_Storyboard_VisualState_SinglePlayerP2P">
                <ObjectAnimationUsingKeyFrames Duration="0:0:0"
                                               Storyboard.TargetName="TeamTotalsGrid"
                                               Storyboard.TargetProperty="(UIElement.Visibility)">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                            Value="{x:Static Visibility.Collapsed}" />
                </ObjectAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPosition)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowProgress)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowTime)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="A_Storyboard_VisualState_SinglePlayerP2P_Playthrough">
                <ObjectAnimationUsingKeyFrames Duration="0:0:0"
                                               Storyboard.TargetName="TeamTotalsGrid"
                                               Storyboard.TargetProperty="(UIElement.Visibility)">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                            Value="{x:Static Visibility.Collapsed}" />
                </ObjectAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPosition)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowScore)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowProgress)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowTime)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="A_Storyboard_VisualState_SinglePlayerShowcase">
                <ObjectAnimationUsingKeyFrames Duration="0:0:0"
                                               Storyboard.TargetName="TeamTotalsGrid"
                                               Storyboard.TargetProperty="(UIElement.Visibility)">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                            Value="{x:Static Visibility.Collapsed}" />
                </ObjectAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPosition)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True" />
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowProgress)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True" />
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowTime)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="A_Storyboard_VisualState_SinglePlayerStandings">
                <ObjectAnimationUsingKeyFrames Duration="0:0:0"
                                               Storyboard.TargetName="TeamTotalsGrid"
                                               Storyboard.TargetProperty="(UIElement.Visibility)">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                            Value="{x:Static Visibility.Collapsed}" />
                </ObjectAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPosition)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPosDelta)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPoints)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
            </Storyboard>
            
            <Storyboard x:Key="A_Storyboard_VisualState_SinglePlayerFinal">
                <ObjectAnimationUsingKeyFrames Duration="0:0:0"
                                               Storyboard.TargetName="TeamTotalsGrid"
                                               Storyboard.TargetProperty="(UIElement.Visibility)">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                            Value="{x:Static Visibility.Collapsed}" />
                </ObjectAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPosition)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowTime)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
            </Storyboard>
            
            <Storyboard x:Key="A_Storyboard_VisualState_MultiPlayer">
                <ObjectAnimationUsingKeyFrames Duration="0:0:0"
                                               Storyboard.TargetName="TeamTotalsGrid"
                                               Storyboard.TargetProperty="(UIElement.Visibility)">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                            Value="{x:Static Visibility.Collapsed}" />
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="AButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="XButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="YButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPosition)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowDrivatar)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowBestLap)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowTime)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="A_Storyboard_VisualState_MultiPlayerCustomScore">
                <ObjectAnimationUsingKeyFrames Duration="0:0:0"
                                               Storyboard.TargetName="TeamTotalsGrid"
                                               Storyboard.TargetProperty="(UIElement.Visibility)">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                            Value="{x:Static Visibility.Collapsed}" />
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="AButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="XButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="YButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPosition)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowDrivatar)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPoints)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="A_Storyboard_VisualState_MultiPlayerPlaythrough">
                <ObjectAnimationUsingKeyFrames Duration="0:0:0"
                                               Storyboard.TargetName="TeamTotalsGrid"
                                               Storyboard.TargetProperty="(UIElement.Visibility)">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                            Value="{x:Static Visibility.Collapsed}" />
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="AButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="XButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="YButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPosition)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowDrivatar)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowBestLap)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowTime)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowScore)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
            </Storyboard>
            
            <Storyboard x:Key="A_Storyboard_VisualState_MultiPlayerP2P">
                <ObjectAnimationUsingKeyFrames Duration="0:0:0"
                                               Storyboard.TargetName="TeamTotalsGrid"
                                               Storyboard.TargetProperty="(UIElement.Visibility)">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                            Value="{x:Static Visibility.Collapsed}" />
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="AButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="XButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="YButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPosition)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowDrivatar)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowProgress)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowTime)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="A_Storyboard_VisualState_MultiPlayerStandings">
                <ObjectAnimationUsingKeyFrames Duration="0:0:0"
                                               Storyboard.TargetName="TeamTotalsGrid"
                                               Storyboard.TargetProperty="(UIElement.Visibility)">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                            Value="{x:Static Visibility.Collapsed}" />
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="AButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="XButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="YButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPosition)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPosDelta)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPoints)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="A_Storyboard_VisualState_MultiPlayerTeam">
                <ObjectAnimationUsingKeyFrames Duration="0:0:0"
                                               Storyboard.TargetName="TeamTotalsGrid"
                                               Storyboard.TargetProperty="(UIElement.Visibility)">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                            Value="{x:Static Visibility.Visible}" />
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="AButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="XButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="YButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPosition)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowDrivatar)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowScore)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowTeams)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowTime)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.IsTeamMultiplayer)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="A_Storyboard_VisualState_MultiPlayerTeamCustomScore">
                <ObjectAnimationUsingKeyFrames Duration="0:0:0"
                                               Storyboard.TargetName="TeamTotalsGrid"
                                               Storyboard.TargetProperty="(UIElement.Visibility)">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                            Value="{x:Static Visibility.Visible}" />
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="AButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="XButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="YButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPosition)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowDrivatar)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPoints)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowTeams)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="A_Storyboard_VisualState_MultiPlayerInfected">
                <ObjectAnimationUsingKeyFrames Duration="0:0:0"
                                               Storyboard.TargetName="TeamTotalsGrid"
                                               Storyboard.TargetProperty="(UIElement.Visibility)">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                            Value="{x:Static Visibility.Collapsed}" />
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="AButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="XButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="YButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPosition)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="False"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowDrivatar)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowTime)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowInfected)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPlayerIcon)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowFinishedStatus)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="False"/>
                </BooleanAnimationUsingKeyFrames>
            </Storyboard>

            <Storyboard x:Key="A_Storyboard_VisualState_MultiPlayerTeamInfected">
                <ObjectAnimationUsingKeyFrames Duration="0:0:0"
                                               Storyboard.TargetName="TeamTotalsGrid"
                                               Storyboard.TargetProperty="(UIElement.Visibility)">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                            Value="{x:Static Visibility.Visible}" />
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="AButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="XButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="YButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPosition)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="False"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowDrivatar)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowInfected)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="False"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPlayerIcon)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="False"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowTeams)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                    Storyboard.TargetName="PART_PlayerList"
                                    Storyboard.TargetProperty="(local:PlayerListControl.ShowFinishedStatus)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="False"/>
                </BooleanAnimationUsingKeyFrames>
            </Storyboard>

            <Storyboard x:Key="A_Storyboard_VisualState_MultiPlayerKing">
                <ObjectAnimationUsingKeyFrames Duration="0:0:0"
                                               Storyboard.TargetName="TeamTotalsGrid"
                                               Storyboard.TargetProperty="(UIElement.Visibility)">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                            Value="{x:Static Visibility.Collapsed}" />
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="AButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="XButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="YButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPosition)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="False"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowDrivatar)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowTime)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowKing)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPlayerIcon)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                        Storyboard.TargetName="PART_PlayerList"
                        Storyboard.TargetProperty="(local:PlayerListControl.ShowFinishedStatus)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="False"/>
                </BooleanAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="A_Storyboard_VisualState_MultiPlayerTeamKing">
                <ObjectAnimationUsingKeyFrames Duration="0:0:0"
                                               Storyboard.TargetName="TeamTotalsGrid"
                                               Storyboard.TargetProperty="(UIElement.Visibility)">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                            Value="{x:Static Visibility.Visible}" />
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="AButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="XButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="YButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPosition)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="False"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowDrivatar)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowTime)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowKing)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPlayerIcon)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                            Storyboard.TargetName="PART_PlayerList"
                                            Storyboard.TargetProperty="(local:PlayerListControl.ShowTeams)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                            Storyboard.TargetName="PART_PlayerList"
                                            Storyboard.TargetProperty="(local:PlayerListControl.ShowFinishedStatus)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="False"/>
                </BooleanAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="A_Storyboard_VisualState_MultiPlayerFlagRush">
                <ObjectAnimationUsingKeyFrames Duration="0:0:0"
                                               Storyboard.TargetName="TeamTotalsGrid"
                                               Storyboard.TargetProperty="(UIElement.Visibility)">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                            Value="{x:Static Visibility.Collapsed}" />
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="AButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="XButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="YButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPosition)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="False"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowDrivatar)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowScore)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowFlagRush)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPlayerIcon)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                    Storyboard.TargetName="PART_PlayerList"
                                    Storyboard.TargetProperty="(local:PlayerListControl.ShowFinishedStatus)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="False"/>
                </BooleanAnimationUsingKeyFrames>
            </Storyboard>

            <Storyboard x:Key="A_Storyboard_VisualState_MultiPlayerTeamFlagRush">
                <ObjectAnimationUsingKeyFrames Duration="0:0:0"
                                               Storyboard.TargetName="TeamTotalsGrid"
                                               Storyboard.TargetProperty="(UIElement.Visibility)">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                            Value="{x:Static Visibility.Visible}" />
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="AButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="XButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="YButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPosition)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="False"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowDrivatar)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowScore)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowFlagRush)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPlayerIcon)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowTeams)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                    Storyboard.TargetName="PART_PlayerList"
                                    Storyboard.TargetProperty="(local:PlayerListControl.ShowFinishedStatus)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="False"/>
                </BooleanAnimationUsingKeyFrames>
            </Storyboard>
            
            <Storyboard x:Key="A_Storyboard_VisualState_MultiPlayerWagerRace">
                <ObjectAnimationUsingKeyFrames Duration="0:0:0"
                                               Storyboard.TargetName="TeamTotalsGrid"
                                               Storyboard.TargetProperty="(UIElement.Visibility)">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                            Value="{x:Static Visibility.Collapsed}" />
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="AButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="XButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="YButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPosition)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowDrivatar)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowWagerWinnings)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowProgress)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowTime)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
            </Storyboard>

            <Storyboard x:Key="A_Storyboard_VisualState_MultiPlayerShowcase">
                <ObjectAnimationUsingKeyFrames Duration="0:0:0"
                                               Storyboard.TargetName="TeamTotalsGrid"
                                               Storyboard.TargetProperty="(UIElement.Visibility)">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                            Value="{x:Static Visibility.Collapsed}" />
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="AButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="XButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="YButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPosition)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowDrivatar)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowProgress)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowTime)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowTeams)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
            </Storyboard>

            <Storyboard x:Key="A_Storyboard_VisualState_DriftRunRace">
                <ObjectAnimationUsingKeyFrames Duration="0:0:0"
                                               Storyboard.TargetName="TeamTotalsGrid"
                                               Storyboard.TargetProperty="(UIElement.Visibility)">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                            Value="{x:Static Visibility.Collapsed}" />
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="AButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="XButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="YButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPosition)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowDrivatar)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPoints)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
            </Storyboard>

            <Storyboard x:Key="A_Storyboard_VisualState_MultiPlayerExpedition">
                <ObjectAnimationUsingKeyFrames Duration="0:0:0"
                                               Storyboard.TargetName="TeamTotalsGrid"
                                               Storyboard.TargetProperty="(UIElement.Visibility)">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                            Value="{x:Static Visibility.Collapsed}" />
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="AButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="XButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="YButton" Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPosition)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowDrivatar)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowProgress)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowTime)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
            </Storyboard>

            <Storyboard x:Key="A_Storyboard_VisualState_Coop_MultiplayerHorizonRush">
                <ObjectAnimationUsingKeyFrames Duration="0:0:0"
                                               Storyboard.TargetName="TeamTotalsGrid"
                                               Storyboard.TargetProperty="(UIElement.Visibility)">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                            Value="{x:Static Visibility.Collapsed}" />
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="AButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="XButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="YButton"
                                               Storyboard.TargetProperty="Visibility">
                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0" 
                                            Value="{x:Static Visibility.Collapsed}"/>
                </ObjectAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowPosition)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="False"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowDrivatar)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowProgress)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
                <BooleanAnimationUsingKeyFrames Duration="0:0:0.0"
                                                Storyboard.TargetName="PART_PlayerList"
                                                Storyboard.TargetProperty="(local:PlayerListControl.ShowTime)">
                    <DiscreteBooleanKeyFrame KeyTime="0:0:0.0"
                                             Value="True"/>
                </BooleanAnimationUsingKeyFrames>
            </Storyboard>
        </ResourceDictionary>
    </Page.Resources>

    <Grid x:Name="PART_LayoutRoot">
        <VisualStateManager.VisualStateGroups>
            <VisualStateGroup>
                <VisualState x:Name="PART_VisualState_SinglePlayer"
                             Storyboard="{StaticResource A_Storyboard_VisualState_SinglePlayer}" />
                <VisualState x:Name="PART_VisualState_SinglePlayerCustomScore"
                             Storyboard="{StaticResource A_Storyboard_VisualState_SinglePlayerCustomScore}" />
                <VisualState x:Name="PART_VisualState_SinglePlayer_Playthrough"
                             Storyboard="{StaticResource A_Storyboard_VisualState_SinglePlayer_Playthrough}" />
                <VisualState x:Name="PART_VisualState_SinglePlayerP2P"
                             Storyboard="{StaticResource A_Storyboard_VisualState_SinglePlayerP2P}" />
                <VisualState x:Name="PART_VisualState_SinglePlayerP2P_Playthrough"
                             Storyboard="{StaticResource A_Storyboard_VisualState_SinglePlayerP2P_Playthrough}" />
                <VisualState x:Name="PART_VisualState_SinglePlayerShowcase"
                             Storyboard="{StaticResource A_Storyboard_VisualState_SinglePlayerShowcase}" />
                <VisualState x:Name="PART_VisualState_SinglePlayerStandings"
                             Storyboard="{StaticResource A_Storyboard_VisualState_SinglePlayerStandings}" />
                <VisualState x:Name="PART_VisualState_SinglePlayerFinal"
                             Storyboard="{StaticResource A_Storyboard_VisualState_SinglePlayerFinal}" />
                <VisualState x:Name="PART_VisualState_MultiPlayer"
                             Storyboard="{StaticResource A_Storyboard_VisualState_MultiPlayer}" />
                <VisualState x:Name="PART_VisualState_MultiPlayerCustomScore"
                             Storyboard="{StaticResource A_Storyboard_VisualState_MultiPlayerCustomScore}" />
                <VisualState x:Name="PART_VisualState_MultiPlayerPlaythrough"
                             Storyboard="{StaticResource A_Storyboard_VisualState_MultiPlayerPlaythrough}" />
                <VisualState x:Name="PART_VisualState_MultiPlayerP2P"
                             Storyboard="{StaticResource A_Storyboard_VisualState_MultiPlayerP2P}" />
                <VisualState x:Name="PART_VisualState_SinglePlayerIEHeat"
                             Storyboard="{StaticResource A_Storyboard_VisualState_SinglePlayerIEHeat}" />
                <VisualState x:Name="PART_VisualState_MultiPlayerStandings"
                             Storyboard="{StaticResource A_Storyboard_VisualState_MultiPlayerStandings}" />
                <VisualState x:Name="PART_VisualState_MultiPlayerTeam"
                             Storyboard="{StaticResource A_Storyboard_VisualState_MultiPlayerTeam}" />
                <VisualState x:Name="PART_VisualState_MultiPlayerTeamCustomScore"
                             Storyboard="{StaticResource A_Storyboard_VisualState_MultiPlayerTeamCustomScore}" />
                <VisualState x:Name="PART_VisualState_MultiPlayerTeamInfected"
                             Storyboard="{StaticResource A_Storyboard_VisualState_MultiPlayerTeamInfected}" />
                <VisualState x:Name="PART_VisualState_MultiPlayerInfected"
                             Storyboard="{StaticResource A_Storyboard_VisualState_MultiPlayerInfected}" />
                <VisualState x:Name="PART_VisualState_MultiPlayerTeamKing"
                             Storyboard="{StaticResource A_Storyboard_VisualState_MultiPlayerTeamKing}" />
                <VisualState x:Name="PART_VisualState_MultiPlayerKing"
                             Storyboard="{StaticResource A_Storyboard_VisualState_MultiPlayerKing}" />
                <VisualState x:Name="PART_VisualState_MultiPlayerTeamFlagRush"
                             Storyboard="{StaticResource A_Storyboard_VisualState_MultiPlayerTeamFlagRush}" />
                <VisualState x:Name="PART_VisualState_MultiPlayerFlagRush"
                             Storyboard="{StaticResource A_Storyboard_VisualState_MultiPlayerFlagRush}" />
                <VisualState x:Name="PART_VisualState_MultiPlayerWagerRace"
                             Storyboard="{StaticResource A_Storyboard_VisualState_MultiPlayerWagerRace}" />
                <VisualState x:Name="PART_VisualState_MultiPlayerShowcase"
                             Storyboard="{StaticResource A_Storyboard_VisualState_MultiPlayerShowcase}" />
                <VisualState x:Name="PART_VisualState_DriftRun"
                             Storyboard="{StaticResource A_Storyboard_VisualState_DriftRunRace}" />
                <VisualState x:Name="PART_VisualState_MultiPlayerExpedition"
                             Storyboard="{StaticResource A_Storyboard_VisualState_MultiPlayerExpedition}" />
                <VisualState x:Name="PART_VisualState_MultiPlayerTeamTimeTrial"
                             Storyboard="{StaticResource A_Storyboard_VisualState_MultiPlayerP2P}" />
                <VisualState x:Name="PART_VisualState_CoopMultiplayerHorizonRush"
                             Storyboard="{StaticResource A_Storyboard_VisualState_Coop_MultiplayerHorizonRush}" />
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>
        <Control Style="{StaticResource A_Style_Control_ScreenBackground}" />

        <PageInputHandler x:Name="RestartInput"
                          Command="{Binding RestartEventCommand}"
                          Button="X" />
        <PageInputHandler x:Name="WatchReplayInput"
                          Command="{Binding WatchReplayEventCommand}"
                          Button="Y" />

        <ContentControl Style="{StaticResource A_Style_ButtonBar}"
                        x:Name="BottomBar">
            <local:ControllerButtonPanel x:Name="PART_HelpPanel"
                                         Style="{StaticResource A_Style_ControllerButtonPanel_Default}">
                <local:ControllerButtonControl Button="A"
                                               x:Name="AButton"
                                               Description="{local:Loc HelpButtons.IDS_Continue}" />
                <local:ControllerButtonControl Button="X"
                                               x:Name="XButton"
                                               Description="{local:Loc HelpButtons.IDS_Restart}"
                                               Visibility="{Binding Command.Enabled, ElementName=RestartInput, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"/>
                <local:ControllerButtonControl Button="Y"
                                               x:Name="YButton"
                                               Description="{local:Loc HelpButtons.IDS_WatchReplay}"
                                               Visibility="{Binding Command.Enabled, ElementName=WatchReplayInput, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"/>
            </local:ControllerButtonPanel>
        </ContentControl>

        <Border Style="{StaticResource A_Style_Border_ScenePadding}"
                UseLayoutRounding="True">
            <Grid>
                <StackPanel HorizontalAlignment="Center" Orientation="Horizontal" Margin="0,0,0,0">
                    <StackPanel Orientation="Vertical"
                                VerticalAlignment="Center"
                                HorizontalAlignment="Center">
                        <Grid Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_0}" HorizontalAlignment="Left">
                            <ContentControl x:Name="eventResultsTextBlock"
                                        Tag="{Binding EventViewModel.EventName}"
                                        Content="{Binding EventViewModel.EventClass}"
                                        Style="{StaticResource A_Style_ContentControl_ScreenTitleBlock}"
                                        local:BindingProxy.A="/ForzaUI;component/Textures/Anthem/Icons/Titles/Leaderboards.png"/>
                        </Grid>

                        <StackPanel Orientation="Horizontal" Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_1}">

                            <local:PlayerListControl x:Name="PART_PlayerList" 
                                                     Style="{StaticResource A_Style_PlayerListControl_Default}"
                                                     local:ZPanel.ZIndex="1" 
                                                     ShowFinishedStatus="True"
                                                     DataContext="{Binding EventViewModel.Participants}"/>

                            <!-- Instructional Panel -->
                            <Decorator Style="{StaticResource A_Style_FrameworkElement_MultiplayerGrid_InstructionalPanel}">
                                <DockPanel x:Name="InstructionPanel"
                                        Style="{StaticResource A_Style_DockPanel_MultiplayerGrid_InstructionalPanel}">
                                    <ContentControl DockPanel.Dock="Top" Content="{Binding InstructionTitle}" Style="{StaticResource A_Style_DescriptionPanelHeader}" Margin="0,0,0,3" Height="80"/>
                                    <Grid>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="200" />
                                            <RowDefinition Height="*" />
                                            <RowDefinition Height="*" />
                                        </Grid.RowDefinitions>

                                        <Grid Grid.Row="0" Margin="0,0,0,3">
                                            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_InstructionPanelBackground}" />
                                            <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_EventResults_Instruction}"
                                                                Text="{Binding Instruction1}" />
                                        </Grid>
                                        <Grid Grid.Row="1" Margin="0,0,0,3">
                                            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_InstructionPanelBackground}" />
                                            <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_EventResults_Instruction}"
                                                                Text="{Binding Instruction2}" />
                                        </Grid>
                                        <Grid Grid.Row="2">
                                            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_InstructionPanelBackground}" />
                                            <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_EventResults_Instruction}"
                                                                Text="{Binding Instruction3}" />
                                        </Grid>
                                    </Grid>
                                </DockPanel>
                            </Decorator>

                            <!-- Team Totals -->
                            <DockPanel x:Name="TeamTotalsGrid" Margin="6,0,0,0" Width="{StaticResource A_TeamTotal_Width}">
                                
                                <local:FZMaterial DockPanel.Dock="Top"
                                                  Margin="0,0,0,0" Height="50"
                                                  Style="{StaticResource A_Style_FZMaterial_FlatPanel_LeaderboardHeader}">
                                    <local:FZTextBlock Text="{Binding EventViewModel.EventName, Converter={StaticResource A_StringToUpper}}"
                                                       VerticalAlignment="Center" 
                                                       HorizontalAlignment="Center"
                                                       CapHeight="18" 
                                                       Color="{StaticResource A_Color_Header_Text}"
                                                       FontFamily="Horizon_A"
                                                       Style="{StaticResource A_Style_FZTextBlock_SubTitle}" />
                                </local:FZMaterial>
                                <Control Style="{StaticResource A_Style_Control_TeamTotal}"
                                         Margin="0,5"/>
                            </DockPanel>
                        </StackPanel>
                    </StackPanel>
                </StackPanel>
                <Decorator HorizontalAlignment="Right" 
                           Width="360"
                           VerticalAlignment="Bottom"
                           Margin="0,0,0,-25">
                    <NetworkCountdownControl Style="{StaticResource A_Style_NetworkCountdownControl_TimeRemaining}" 
                                             Template="{StaticResource A_ControlTemplate_MultiplayerCountdown}"
                                             HorizontalAlignment="Stretch"
                                             CountdownType="LocalForUi"/>
                </Decorator>
            </Grid>
        </Border>
    </Grid>
</Page>
