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

    <Page.Resources>
    

        <local:FZMaterialPresetAcrylicPanel x:Key="A_FZMaterialPresetAcrylicPanel_GoldPanel"
                                            GlassColor="#77E7AC36"
                                            EdgeColor="#77E7AC36"
                                            GlassEmission="0.7" 
                                            EdgeEmission="3" 
                                            FrontEdgeTransparency="0.5" 
                                            RearTransparency="0.05" 
                                            BlurAmount="Medium"
                                            ReflectionTextureType="Sharp" 
                                            Reflectivity="0.1"
                                            NormalDepth="0.003"
                                            SideReflectionIntensity="1"
                                            SubsurfaceIntensity="0.5"
                                            SubsurfaceSize="4"
                                            IsStencil="False"
                                            BasedOn="{StaticResource A_FZMaterialPresetAcrylicPanel_BodyPanel}"/>
        <Style x:Key="A_Style_FZMaterial_AcrylicPanel_GoldPanel" TargetType="local:FZMaterial" >
            <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetAcrylicPanel_GoldPanel}" />
            <Setter Property="Color" Value="#449A7B1E" />
        </Style>
        
        <local:FZMaterialPresetAcrylicPanel x:Key="A_FZMaterialPresetAcrylicPanel_GoldPanelBottom"
                                            GlassColor="#776C4311"
                                            EdgeColor="#776C4311"
                                            Reflectivity="0.1"
                                            BasedOn="{StaticResource A_FZMaterialPresetAcrylicPanel_GoldPanel}"/>
        <Style x:Key="A_Style_FZMaterial_AcrylicPanel_GoldPanelBottom" TargetType="local:FZMaterial" >
            <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetAcrylicPanel_GoldPanelBottom}" />
            <Setter Property="Color" Value="#506C4311" />
        </Style>      
        
        <local:FZMaterialPresetAcrylicPanel x:Key="A_FZMaterialPresetAcrylicPanel_GoldBandBG"
                                            BasedOn="{StaticResource A_FZMaterialPresetAcrylicPanel_GoldPanel}"/>
        <Style x:Key="A_Style_FZMaterial_AcrylicPanel_GoldBandBG" TargetType="local:FZMaterial"
               BasedOn="{StaticResource A_Style_FZMaterial_AcrylicPanel_GoldPanel}">
            <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetAcrylicPanel_GoldBandBG}" />
        </Style>

        <local:FZMaterialPresetAcrylicPanel x:Key="A_FZMaterialPresetAcrylicPanel_CenterBand"
                                        GlassColor="#FFFFFFFF"
                                        BasedOn="{StaticResource A_FZMaterialPresetAcrylicPanel_BodyPanel}"/>
        <Style x:Key="A_Style_FZMaterial_AcrylicPanel_CenterBand" TargetType="local:FZMaterial"
               BasedOn="{StaticResource A_Style_FZMaterial_AcrylicPanel_BodyPanel}" >
            <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetAcrylicPanel_CenterBand}" />
        </Style>

        <Style x:Key="A_Style_FZTextBlock_ChallengeHeader" TargetType="{x:Type local:FZTextBlock}" BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}">
            <Setter Property="FontSize" Value="60"/>
            <Setter Property="Color" Value="{StaticResource A_Color_Tile_Text_Alternate}"/>
            <Setter Property="HorizontalAlignment" Value="Center"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
            <Setter Property="TextAlignment" Value="Center"/>
            <Setter Property="Margin" Value="10,0,10,0"/>
        </Style>

        <Style x:Key="A_Style_FZTextBlock_ChallengeBody" TargetType="{x:Type local:FZTextBlock}" BasedOn="{StaticResource A_Style_FZTextBlock_HorizonD}">
            <Setter Property="FontSize" Value="28"/>
            <Setter Property="Color" Value="{StaticResource A_Color_Tile_Text_Alternate}"/>
            <Setter Property="TextAlignment" Value="Left"/>
            <Setter Property="TextWrapping" Value="Wrap"/>
        </Style>
        
        <Style x:Key="A_Style_FZRun_Body_Bold" TargetType="{x:Type local:FZRun}">
            <Setter Property="FontFamily" Value="Horizon_C"/>
        </Style>

        <Style x:Key="A_FZRun_Header_Light" TargetType="{x:Type local:FZRun}">
            <Setter Property="FontFamily" Value="Horizon_B"/>
        </Style>

        <Style x:Key="A_Style_ItemsControl_ObjectiveBreakdown" TargetType="ItemsControl">
            <Setter Property="ItemTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <DockPanel Margin="0,14,0,0">
                            <local:FZMaterial x:Name="BulletPoint"
                                               Color="#00FFC5" 
                                                Height="19" Width="19" 
                                                DockPanel.Dock="Left" 
                                                VerticalAlignment="Top" Margin="0,0,10,0" />
                            <local:FZTextBlock x:Name="Description"
                                                local:TextBlockInlineMarkup.Markup="{Binding Description}"
                                                local:TextBlockInlineMarkup.ResourceBaseName="A_Style_FZRun_Body_"
                                                Style="{StaticResource A_Style_FZTextBlock_HorizonD}"
                                                Color="{StaticResource A_Color_SubHeader_Text}"
                                                FontSize="26"
                                                VerticalAlignment="Center" />
                        </DockPanel>
                        <DataTemplate.Triggers>
                            <DataTrigger Binding="{Binding (local:BindingProxy.A), RelativeSource={RelativeSource AncestorType=ItemsControl}}">
                                <DataTrigger.Value>
                                    <System:Boolean>True</System:Boolean>
                                </DataTrigger.Value>
                                <Setter TargetName="BulletPoint" Property="Color" Value="#FEC551" />
                            </DataTrigger>
                        </DataTemplate.Triggers>
                    </DataTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="ItemsControl">
                        <StackPanel Orientation="Vertical" IsItemsHost="True" />
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="VerticalAlignment" Value="Top" />
            <Setter Property="Margin" Value="21,9,21,6" />
            <Setter Property="ItemsSource" Value="{Binding SubObjectives}" />
        </Style>

        <ControlTemplate x:Key="A_ControlTemplate_ChallengeList" 
                         TargetType="{x:Type local:CommonListBox}">
            <StackPanel IsItemsHost="True" Orientation="Horizontal"/>
        </ControlTemplate>

        <ControlTemplate x:Key="A_ControlTemplate_Challenge">
            <Grid Width="416" Height="450">
                <Grid.RowDefinitions>
                    <RowDefinition Height="242" />
                    <RowDefinition Height="77" />
                    <RowDefinition />
                </Grid.RowDefinitions>

                <local:FZMaterial x:Name="TopSection"
                                  Grid.Row="0"
                                  Style="{StaticResource A_Style_FZMaterial_AcrylicPanel_BodyPanel}">
                    <local:FZMaterial x:Name="StarIcon"
                                      ImageSource="/ForzaUI;component/Textures/Data_Bound/Mountain/Stars/PostRaceStarEmpty.png"
                                      Color="#CC222222"
                                      Height="196"
                                      Width="196" />
                </local:FZMaterial>

                <local:FZMaterial x:Name="MiddleSection"
                                  Grid.Row="1"
                                  Style="{StaticResource A_Style_FZMaterial_AcrylicPanel_CenterBand}">
                    <Grid>
                        <local:FZMaterial x:Name="GoldRibbon"
                                          Visibility="Hidden"
                                          ImageSource="/ForzaUI;component/Textures/Data_Bound/Mountain/PostRace/Gold_Ribbon.png" />

                        <local:FZTextBlock x:Name="Difficulty"
                                        Style="{StaticResource A_Style_FZTextBlock_ChallengeHeader}"
                		                Text="{Binding Title}"/>
                    </Grid>
                </local:FZMaterial>

                <local:FZMaterial x:Name="BottomSection"
                                  Grid.Row="2"
                                  Style="{StaticResource A_Style_FZMaterial_AcrylicPanel_BodyPanel}">
                    <ItemsControl x:Name="ObjectiveBreakdown"
                                  Style="{StaticResource A_Style_ItemsControl_ObjectiveBreakdown}" />
                </local:FZMaterial>
            </Grid>
            <ControlTemplate.Triggers>
                <Trigger Property="local:BindingProxy.A">
                    <Trigger.Value>
                        <System:Boolean>True</System:Boolean>
                    </Trigger.Value>
                    <Setter TargetName="Difficulty" Property="Color" Value="{StaticResource A_Color_GlossyBlack}"/>
                    <Setter TargetName="StarIcon" Property="Color" Value="#FFF"/>
                    <Setter TargetName="StarIcon" Property="ImageSource" Value="/ForzaUI;component/Textures/Data_Bound/Mountain/Stars/PostRaceStarEarned.png"/>
                    <Setter TargetName="TopSection" Property="Style" Value="{StaticResource A_Style_FZMaterial_AcrylicPanel_GoldPanel}"/>
                    <Setter TargetName="MiddleSection" Property="Style" Value="{StaticResource A_Style_FZMaterial_AcrylicPanel_GoldBandBG}"/>
                    <Setter TargetName="BottomSection" Property="Style" Value="{StaticResource A_Style_FZMaterial_AcrylicPanel_GoldPanelBottom}"/>
                    <Setter TargetName="GoldRibbon" Property="Visibility" Value="Visible"/>
                    <Setter TargetName="ObjectiveBreakdown" Property="local:BindingProxy.A">
                        <Setter.Value>
                            <System:Boolean>True</System:Boolean>
                        </Setter.Value>
                    </Setter>
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>

        <Style x:Key="A_Style_ListBoxItem_Challenge" TargetType="{x:Type ListBoxItem}">
            <Setter Property="Margin" Value="0,0,6,0"/>
            <Setter Property="Focusable" Value="false"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ListBoxItem}">
                        <ControlTemplate.Resources>

                            <CircleEase x:Key="A_EasingFunction_EaseInOut" EasingMode="EaseInOut"/>

                            <Storyboard x:Key="FlipInstant" >
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Angle" Storyboard.TargetName="PanelRotation3D">
                                    <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="-180" />
                                </DoubleAnimationUsingKeyFrames>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FrontFace">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Hidden}" />
                                </ObjectAnimationUsingKeyFrames>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="BackFace">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Visible}" />
                                </ObjectAnimationUsingKeyFrames>
                            </Storyboard>

                            <Storyboard x:Key="FlipAnimated" >
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Angle" Storyboard.TargetName="PanelRotation3D">
                                    <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="0" />
                                    <DiscreteDoubleKeyFrame KeyTime="0:0:0.16" Value="0" />
                                    <EasingDoubleKeyFrame KeyTime="0:0:0.66" Value="-180">
                                        <EasingDoubleKeyFrame.EasingFunction>
                                            <CubicEase EasingMode="EaseInOut" />
                                        </EasingDoubleKeyFrame.EasingFunction>
                                    </EasingDoubleKeyFrame>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="OffsetZ" Storyboard.TargetName="PanelTranslation3D">
                                    <DiscreteDoubleKeyFrame KeyTime="0:0:0.0" Value="0" />
                                    <EasingDoubleKeyFrame KeyTime="0:0:0.16" Value="-120">
                                        <EasingDoubleKeyFrame.EasingFunction>
                                            <CubicEase EasingMode="EaseInOut" />
                                        </EasingDoubleKeyFrame.EasingFunction>
                                    </EasingDoubleKeyFrame>
                                    <DiscreteDoubleKeyFrame KeyTime="0:0:1.0" Value="-120" />
                                    <EasingDoubleKeyFrame KeyTime="0:0:1.08" Value="0">
                                        <EasingDoubleKeyFrame.EasingFunction>
                                            <CubicEase EasingMode="EaseInOut" />
                                        </EasingDoubleKeyFrame.EasingFunction>
                                    </EasingDoubleKeyFrame>
                                </DoubleAnimationUsingKeyFrames>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FrontFace">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Visible}" />
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0.4" Value="{x:Static Visibility.Hidden}" />
                                </ObjectAnimationUsingKeyFrames>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="BackFace">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Hidden}" />
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0.4" Value="{x:Static Visibility.Visible}" />
                                </ObjectAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="LargeGlow">
                                    <LinearDoubleKeyFrame KeyTime="0:0:1.0" Value="0" />
                                    <LinearDoubleKeyFrame KeyTime="0:0:1.08" Value="0.8" />
                                    <LinearDoubleKeyFrame KeyTime="0:0:1.24" Value="0.8" />
                                    <LinearDoubleKeyFrame KeyTime="0:0:1.48" Value="0" />
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="CircleGlow">
                                    <LinearDoubleKeyFrame KeyTime="0:0:1.0" Value="0" />
                                    <LinearDoubleKeyFrame KeyTime="0:0:1.08" Value="2.5" />
                                    <LinearDoubleKeyFrame KeyTime="0:0:1.24" Value="2.5" />
                                    <LinearDoubleKeyFrame KeyTime="0:0:1.48" Value="0" />
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="CircleGlow">
                                    <LinearDoubleKeyFrame KeyTime="0:0:1.0" Value="1" />
                                    <EasingDoubleKeyFrame KeyTime="0:0:1.08" Value="6" />
                                    <EasingDoubleKeyFrame KeyTime="0:0:1.6" Value="10">
                                        <EasingDoubleKeyFrame.EasingFunction>
                                            <CubicEase EasingMode="EaseOut" />
                                        </EasingDoubleKeyFrame.EasingFunction>
                                    </EasingDoubleKeyFrame>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="CircleGlow">
                                    <LinearDoubleKeyFrame KeyTime="0:0:1.0" Value="1" />
                                    <EasingDoubleKeyFrame KeyTime="0:0:1.08" Value="4" />
                                    <EasingDoubleKeyFrame KeyTime="0:0:1.6" Value="7">
                                        <EasingDoubleKeyFrame.EasingFunction>
                                            <CubicEase EasingMode="EaseOut" />
                                        </EasingDoubleKeyFrame.EasingFunction>
                                    </EasingDoubleKeyFrame>
                                </DoubleAnimationUsingKeyFrames>
                                <StringAnimationUsingKeyFrames Storyboard.TargetProperty="(local:EventFire.EventName)" Storyboard.TargetName="NotifyCodeBehind">
                                    <DiscreteStringKeyFrame KeyTime="0:0:1.0" Value="ChallengeAnimationFinished"/>
                                    <DiscreteStringKeyFrame KeyTime="0:0:1.24" Value=""/>
                                </StringAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Shine">
                                    <DiscreteDoubleKeyFrame KeyTime="0:0:0.0" Value="0"/>
                                    <DiscreteDoubleKeyFrame KeyTime="0:0:1.0" Value="1.0"/>
                                    <DiscreteDoubleKeyFrame KeyTime="0:0:3.0" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                                <SingleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Effect).(FadeInStart)" Storyboard.TargetName="Shine">
                                    <EasingSingleKeyFrame KeyTime="0:0:1.0" Value="-0.46" EasingFunction="{StaticResource A_EasingFunction_EaseInOut}"/>
                                    <EasingSingleKeyFrame KeyTime="0:0:2.4" Value="1" EasingFunction="{StaticResource A_EasingFunction_EaseInOut}"/>
                                </SingleAnimationUsingKeyFrames>
                                <SingleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Effect).(FadeInEnd)" Storyboard.TargetName="Shine">
                                    <EasingSingleKeyFrame KeyTime="0:0:1.0" Value="-0.35" EasingFunction="{StaticResource A_EasingFunction_EaseInOut}"/>
                                    <EasingSingleKeyFrame KeyTime="0:0:2.4" Value="1.11" EasingFunction="{StaticResource A_EasingFunction_EaseInOut}"/>
                                </SingleAnimationUsingKeyFrames>
                                <SingleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Effect).(FadeOutStart)" Storyboard.TargetName="Shine">
                                    <EasingSingleKeyFrame KeyTime="0:0:1.0" Value="-0.21" EasingFunction="{StaticResource A_EasingFunction_EaseInOut}"/>
                                    <EasingSingleKeyFrame KeyTime="0:0:2.4" Value="1.25" EasingFunction="{StaticResource A_EasingFunction_EaseInOut}"/>
                                </SingleAnimationUsingKeyFrames>
                                <SingleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Effect).(FadeOutEnd)" Storyboard.TargetName="Shine">
                                    <EasingSingleKeyFrame KeyTime="0:0:1.0" Value="-0.1" EasingFunction="{StaticResource A_EasingFunction_EaseInOut}"/>
                                    <EasingSingleKeyFrame KeyTime="0:0:2.4" Value="1.36" EasingFunction="{StaticResource A_EasingFunction_EaseInOut}"/>
                                </SingleAnimationUsingKeyFrames>
                            </Storyboard>
                        </ControlTemplate.Resources>
                        <Grid>
                            <local:FZMaterial x:Name="CircleGlow" 
                                                Preset="{StaticResource A_FZMaterialPresetAdditive}"
                                                RenderTransformOrigin="0.5, 0.5"
                                                Opacity="0"
                                                Color="#FFFFFFFF"
                                                Width="160" Height="160"
                                                IsHitTestVisible="False"
                                                ImageSource="/ForzaUI;component/Textures/Anthem/HUD/SkillsLargeGlow.png"
                                                local:ZPanel.DisableClipping="True"
                                                Visibility="Collapsed"
                                                Panel.ZIndex="0">
                                <local:FZMaterial.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="1"/>
                                        <SkewTransform />
                                        <RotateTransform />
                                        <TranslateTransform />
                                    </TransformGroup>
                                </local:FZMaterial.RenderTransform>
                            </local:FZMaterial>
                            <Grid x:Name="Grid_Container" RenderTransformOrigin="0.5,0.5">
                                <local:ZPanel.Transform>
                                    <Transform3DGroup>
                                        <RotateTransform3D CenterX="208">
                                            <RotateTransform3D.Rotation>
                                                <AxisAngleRotation3D x:Name="PanelRotation3D" Axis="0,-1,0" Angle="0" />
                                            </RotateTransform3D.Rotation>
                                        </RotateTransform3D>
                                        <TranslateTransform3D x:Name="PanelTranslation3D" OffsetZ="0" />
                                    </Transform3DGroup>
                                </local:ZPanel.Transform>

                                <Control x:Name="FrontFace"
                                     Template="{StaticResource A_ControlTemplate_Challenge}" 
                                     local:BindingProxy.A="{Binding IsInitiallyCompleted}"
                                     Visibility="Visible" />

                                <Grid x:Name="Grid_Backfacing">
                                    <local:ZPanel.Transform>
                                        <Transform3DGroup>
                                            <RotateTransform3D CenterX="208">
                                                <RotateTransform3D.Rotation>
                                                    <AxisAngleRotation3D Axis="0,-1,0" Angle="-180" />
                                                </RotateTransform3D.Rotation>
                                            </RotateTransform3D>
                                        </Transform3DGroup>
                                    </local:ZPanel.Transform>

                                    <Control x:Name="BackFace"
                                             Template="{StaticResource A_ControlTemplate_Challenge}"
                                             Visibility="Hidden"
                                             local:BindingProxy.A="{Binding IsFinallyCompleted}"/>

                                    <local:FZMaterial x:Name="LargeGlow" 
                                                  Preset="{StaticResource A_FZMaterialPresetAdditive}"
                                                  RenderTransformOrigin="0.5, 0.5"
                                                  Opacity="0"
                                                  Color="#FFFFFFFF"
                                                  HorizontalAlignment="Stretch"
                                                  VerticalAlignment="Stretch"
                                                  ImageSource="/ForzaUI;component/Textures/Data_Bound/Anthem/E3/Forzathon/Glow_HardEdge.png"
                                                  local:ZPanel.DisableClipping="True"
                                                  Visibility="Collapsed"
                                                  Panel.ZIndex="0">
                                        <local:FZMaterial.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform ScaleX="1.0" ScaleY="1.0"/>
                                                <SkewTransform />
                                                <RotateTransform />
                                                <TranslateTransform />
                                            </TransformGroup>
                                        </local:FZMaterial.RenderTransform>
                                    </local:FZMaterial>

                                    <local:FZMaterial x:Name="Shine"
                                                      Preset="{StaticResource A_FZMaterialPresetAdditive}"
                                                      HorizontalAlignment="Stretch" 
                                                      VerticalAlignment="Stretch" 
                                                      Margin="0,0,0,0"
                                                      Opacity="0"
                                                      RenderTransformOrigin="0.5,0.5"
                                                      Visibility="Collapsed">
                                        <local:FZMaterial.Effect>
                                            <local:TextureMaskEffect Color="#60FFFFFF">
                                                <local:TextureMaskEffect.Texture>
                                                    <ImageBrush ImageSource="/ForzaUI;component/Textures/Data_Bound/Anthem/E3/Forzathon/Glow_HardEdge.png" />
                                                </local:TextureMaskEffect.Texture>
                                                <local:TextureMaskEffect.Mask>
                                                    <ImageBrush ImageSource="/ForzaUI;component/Textures/Anthem/TextureMaskGradients/Diagonal_Gradient.png" />
                                                </local:TextureMaskEffect.Mask>
                                            </local:TextureMaskEffect>
                                        </local:FZMaterial.Effect>
                                    </local:FZMaterial>
                                </Grid>
                                <local:EventFire x:Name="NotifyCodeBehind" />
                                <local:AudioEvent x:Name="Audio" />
                            </Grid>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <DataTrigger Binding="{Binding IsFinallyCompleted}" Value="True">
                                <Setter Property="Visibility" TargetName="LargeGlow" Value="Visible"/>
                                <Setter Property="Visibility" TargetName="CircleGlow" Value="Visible"/>
                                <Setter Property="Visibility" TargetName="Shine" Value="Visible"/>
                            </DataTrigger>
                            <MultiDataTrigger>
                                <MultiDataTrigger.Conditions>
                                    <Condition Binding="{Binding IsFinallyCompleted}" Value="True"/>
                                    <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="True"/>
                                </MultiDataTrigger.Conditions>
                                <Setter Property="local:AudioEvent.SoundName" TargetName="Audio" Value="/Master/UI/E3/UI_E3_AchievementWon"/>
                            </MultiDataTrigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Style.Triggers>
                <Trigger Property="IsSelected" Value="True">
                    <Setter Property="Panel.ZIndex" Value="3"/>
                </Trigger>
            </Style.Triggers>
        </Style>

        <Storyboard x:Key="A_Storyboard_PostRaceMountainStarsIntro">
            <StringAnimationUsingKeyFrames Storyboard.TargetProperty="(local:EventFire.EventName)" Storyboard.TargetName="IntroEventFire" FillBehavior="Stop">
                <DiscreteStringKeyFrame KeyTime="0:0:0" Value=""/>
                <DiscreteStringKeyFrame KeyTime="0:0:1.0" Value="ShowProgress"/>
                <DiscreteStringKeyFrame KeyTime="0:0:2.0" Value="StartChallengeAnimations"/>
                <DiscreteStringKeyFrame KeyTime="0:0:2.5" Value=""/>
            </StringAnimationUsingKeyFrames>
        </Storyboard>
        
        <Storyboard x:Key="A_Storyboard_PostRaceMountainStarsAutoContinue">
            <StringAnimationUsingKeyFrames Storyboard.TargetProperty="(local:EventFire.EventName)" Storyboard.TargetName="{x:Null}" FillBehavior="Stop">
                <DiscreteStringKeyFrame KeyTime="0:0:0" Value=""/>
                <DiscreteStringKeyFrame KeyTime="0:0:2.5" Value="AutoContinue"/>
                <DiscreteStringKeyFrame KeyTime="0:0:3.0" Value=""/>
            </StringAnimationUsingKeyFrames>
        </Storyboard>
        
        <Storyboard x:Key="A_Storyboard_PlayProgressIntroAudio">
            <StringAnimationUsingKeyFrames Storyboard.TargetName="{x:Null}" Storyboard.TargetProperty="(local:AudioEvent.SoundName)">
                <DiscreteStringKeyFrame KeyTime="0:0:0" Value="" />
                <DiscreteStringKeyFrame KeyTime="0:0:0.01" Value="/Master/UI/PostRace/HZ2_SFX_HUD_PostRace_CashRewardsBalanceOn_01" />
            </StringAnimationUsingKeyFrames>
        </Storyboard>

        <Storyboard x:Key="A_Storyboard_PlayNewUnlockAudio">
            <StringAnimationUsingKeyFrames Storyboard.TargetName="{x:Null}" Storyboard.TargetProperty="(local:AudioEvent.SoundName)">
                <DiscreteStringKeyFrame KeyTime="0:0:0" Value="" />
                <DiscreteStringKeyFrame KeyTime="0:0:0.01" Value="/Master/UI/PostRace/HZ2_SFX_HUD_PostRace_CashRewardsBalanceOn_01" />
                <DiscreteStringKeyFrame KeyTime="0:0:1.0" Value="/Master/UI/PostRace/HZ3_SFX_HUD_PostRace_FanRewardsSheen" />
            </StringAnimationUsingKeyFrames>
        </Storyboard>
    </Page.Resources>

    <Grid>
        <ContentControl x:Name="BottomBar" Style="{StaticResource A_Style_ButtonBar}">
            <ContentControl x:Name="DefaultHelpPanel"
                    Style="{StaticResource A_Style_ContentControl_DefaultButtonBar}" />
        </ContentControl>
        <Decorator Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_0}">
            <Grid Margin="0,0,0,0"
                  Style="{StaticResource A_Style_FrameworkElement_LayoutRoot}">
                <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center"
                            DataContext="{Binding ViewModel}">
                    <ContentControl
                        HorizontalAlignment="Left" Margin="0,0,0,15"
                        Style="{StaticResource A_Style_ContentControl_ScreenTitleBlock}"
                        Content="{local:Loc Mountain.IDS_PostRaceMountainStars_Title}"
                        local:BindingProxy.A="/ForzaUI;component/Textures/Anthem/Icons/Titles/MountainStar.png" />

                    <local:CommonListBox 
                    	x:Name="PART_List"
                    	ItemsSource="{Binding Challenges}"
                    	Template="{StaticResource A_ControlTemplate_ChallengeList}"
                    	ItemContainerStyle="{StaticResource A_Style_ListBoxItem_Challenge}" />

                    <Viewbox StretchDirection="DownOnly" Margin="0,10,0,0" Panel.ZIndex="-10"
                             HorizontalAlignment="Left" MaxWidth="1211">
                        <StackPanel Orientation="Horizontal">
                            <Control x:Name="ProgressLabel" Style="{StaticResource A_Style_Control_PostRace_ProgressLabelBlock}"/>
                            <ContentControl x:Name="ProgressValue" Style="{StaticResource A_Style_ContentControl_PostRace_ProgressValueBlock}">
                                <StackPanel Orientation="Horizontal" Margin="18,12" 
                                                    HorizontalAlignment="Right" VerticalAlignment="Center">
                                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_PostRace_BonusText}"
                                                               Text="{Binding ProgressCurrentValue}" Margin="0" />
                                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_PostRace_BonusText}"
                                                               Color="{StaticResource A_Color_Tile_LiveText}" Margin="2,0,2,0"
                                                               Text="/" />
                                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_PostRace_BonusText}"
                                                               Color="{StaticResource A_Color_Tile_LiveText}" Margin="0"
                                                               Text="{Binding ProgressTargetValue}" />
                                </StackPanel>
                            </ContentControl>
                            <Grid>
                                <Control x:Name="NewUnlock" Style="{StaticResource A_Style_Control_PostRace_NewUnlockBlock}"/>
                                <local:FZMaterial x:Name="NewUnlockSheen"
                                              Opacity="0"
                                              Preset="{StaticResource A_FZMaterialPresetAdditive}">
                                    <local:FZMaterial.Effect>
                                        <local:TextureMaskEffect Texture="{StaticResource A_Brush_PostRace_Silhouette}"
                                             Mask="{StaticResource A_Brush_PostRace_MaskGradient}"/>
                                    </local:FZMaterial.Effect>
                                </local:FZMaterial>
                            </Grid>
                        </StackPanel>
                    </Viewbox>
                </StackPanel>
            </Grid>
        </Decorator>

        <local:EventFire x:Name="IntroEventFire" />
        <local:EventFire x:Name="EventFire" />
        <local:EventFire x:Name="AutoContinueEventFire" />
        <local:EventFire x:Name="PART_EventFire" />
        <local:AudioEvent x:Name="ProgressAudio" />
        <local:AudioEvent x:Name="NewUnlockAudio" />
        
        <local:EventFire.FzTriggers>
            <local:EventFireTrigger Event="ShowProgress" TargetName="ProgressLabel" Storyboard="{StaticResource A_Storyboard_PostRace_RowIn}" />
            <local:EventFireTrigger Event="ShowProgress" TargetName="ProgressValue" Storyboard="{StaticResource A_Storyboard_PostRace_RowIn}" />
            <local:EventFireTrigger Event="ShowProgress" TargetName="ProgressAudio" Storyboard="{StaticResource A_Storyboard_PlayProgressIntroAudio}" />
            
            <local:EventFireTrigger Event="ShowNewUnlock" TargetName="NewUnlock" Storyboard="{StaticResource A_Storyboard_PostRace_RowIn}" />
            <local:EventFireTrigger Event="ShowNewUnlock" TargetName="NewUnlockSheen" Storyboard="{StaticResource A_Storyboard_PostRace_NewUnlockSheen}" />
            <local:EventFireTrigger Event="ShowNewUnlock" TargetName="NewUnlockAudio" Storyboard="{StaticResource A_Storyboard_PlayNewUnlockAudio}" />

            <local:EventFireTrigger Event="SkipIntro" TargetName="ProgressLabel" Storyboard="{StaticResource A_Storyboard_PostRace_SkipIntro}" />
            <local:EventFireTrigger Event="SkipIntro" TargetName="ProgressValue" Storyboard="{StaticResource A_Storyboard_PostRace_SkipIntro}" />

            <local:EventFireTrigger Event="ShowNewUnlockInstant" TargetName="NewUnlock" Storyboard="{StaticResource A_Storyboard_PostRace_SkipIntro}" />

            <local:EventFireTrigger Event="BeginAutoContinue" TargetName="AutoContinueEventFire" Storyboard="{StaticResource A_Storyboard_PostRaceMountainStarsAutoContinue}" />            
        </local:EventFire.FzTriggers>
    </Grid>
</Page>
