<Page xmlns:local="clr-namespace:ForzaUI;assembly="
      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_PostRaceE3RewardsPanel"
      mc:Ignorable="d"
      x:Name="Page"
      Width="1920"
      Height="540"
      DataContext="{Binding RelativeSource={RelativeSource Self}}"
      ClipToBounds="True">
    <Page.Resources>
        <System:Double x:Key="A_Double_TileOffset">-700</System:Double>
        <System:Double x:Key="A_Double_TileWidth">440</System:Double>

        <local:MappingConverter x:Key="A_Converter_TileToImage">
            <local:MappingConverterEntry Key="0"
                                         Value="game:\Media\UI\Textures\Data_Bound\E3\Autumn_Normal.png" />
            <local:MappingConverterEntry Key="1"
                                         Value="game:\Media\UI\Textures\Data_Bound\E3\Winter_Normal.png" />
            <local:MappingConverterEntry Key="2"
                                         Value="game:\Media\UI\Textures\Data_Bound\E3\Spring_Normal.png" />
            <local:MappingConverterEntry Key="3"
                                         Value="game:\Media\UI\Textures\Data_Bound\E3\Summer_Normal.png" />
        </local:MappingConverter>

        <local:MappingConverter x:Key="A_Converter_TileToImageWin">
            <local:MappingConverterEntry Key="0"
                                         Value="game:\Media\UI\Textures\Data_Bound\E3\Autumn_Complete.png" />
            <local:MappingConverterEntry Key="1"
                                         Value="game:\Media\UI\Textures\Data_Bound\E3\Winter_Complete.png" />
            <local:MappingConverterEntry Key="2"
                                         Value="game:\Media\UI\Textures\Data_Bound\E3\Spring_Complete.png" />
            <local:MappingConverterEntry Key="3"
                                         Value="game:\Media\UI\Textures\Data_Bound\E3\Summer_Complete.png" />
        </local:MappingConverter>

        <local:MappingConverter x:Key="A_Converter_TileToImageFail">
            <local:MappingConverterEntry Key="0"
                                         Value="game:\Media\UI\Textures\Data_Bound\E3\Autumn_Failed.png" />
            <local:MappingConverterEntry Key="1"
                                         Value="game:\Media\UI\Textures\Data_Bound\E3\Winter_Failed.png" />
            <local:MappingConverterEntry Key="2"
                                         Value="game:\Media\UI\Textures\Data_Bound\E3\Spring_Failed.png" />
            <local:MappingConverterEntry Key="3"
                                         Value="game:\Media\UI\Textures\Data_Bound\E3\Summer_Failed.png" />
        </local:MappingConverter>

        <local:MappingConverter x:Key="A_Converter_TileToSeasonObjectiveTitle">
            <local:MappingConverterEntry Key="0"
                                         Value="{local:Loc InGame.IDS_PostRace_E3_AutumnObjective}" />
            <local:MappingConverterEntry Key="1"
                                         Value="{local:Loc InGame.IDS_PostRace_E3_WinterObjective}" />
            <local:MappingConverterEntry Key="2"
                                         Value="{local:Loc InGame.IDS_PostRace_E3_SpringObjective}" />
            <local:MappingConverterEntry Key="3"
                                         Value="{local:Loc InGame.IDS_PostRace_E3_SummerObjective}" />
        </local:MappingConverter>
        <local:MappingConverter x:Key="A_Converter_TileToSeasonObjectiveDesc">
            <local:MappingConverterEntry Key="0"
                                         Value="{local:Loc InGame.IDS_PostRace_E3_AutumnObjectiveDesc}" />
            <local:MappingConverterEntry Key="1"
                                         Value="{local:Loc InGame.IDS_PostRace_E3_WinterObjectiveDesc}" />
            <local:MappingConverterEntry Key="2"
                                         Value="{local:Loc InGame.IDS_PostRace_E3_SpringObjectiveDesc}" />
            <local:MappingConverterEntry Key="3"
                                         Value="{local:Loc InGame.IDS_PostRace_E3_SummerObjectiveDesc}" />
        </local:MappingConverter>

        <local:LinearTransformConverter x:Key="A_Converter_TileOffset"
                                        Scale="-450"
                                        Add="{StaticResource A_Double_TileOffset}" />

        <local:OffsetKeyTime x:Key="A_KeyTime_Tile_On"
                             KeyTime="0:0:0.3" />

        <!-- Without a dummy here, the accumulates fire multiple times because they're on the last frame or something -->
        <local:OffsetKeyTime x:Key="A_KeyTime_Tile_On_Dummy"
                             KeyTime="{StaticResource A_KeyTime_Tile_On}"
                             Offset="0:0:0.5" />

        <local:UIStoryboard x:Key="A_Storyboard_E3Rewards">
            <local:UIStoryboard.TriggerAnimation>
                <!-- Start animating on the tiles -->
                <local:RaiseFzEvent Storyboard.TargetName="Tiles"
                                    local:TriggerAnimation.KeyTime="0:0:0.1"
                                    EventName="Accumulate" />
                <local:RaiseFzEvent Storyboard.TargetName="SlamTiles"
                                    local:TriggerAnimation.KeyTime="0:0:2"
                                    EventName="Accumulate" />
                <local:StartAudioTrigger EventName="/Master/UI/E3/UI_Forzathon_ResultsBanner"
                                         local:TriggerAnimation.KeyTime="0:0:0.1" />
                <local:RaiseEntityModelEvent local:TriggerAnimation.KeyTime="0:0:6"
                                             EventName="UISequenceComplete" />
                <local:RaiseFzEvent local:TriggerAnimation.KeyTime="0:0:7"
                                             EventName="dummy" />
            </local:UIStoryboard.TriggerAnimation>
        </local:UIStoryboard>

        <local:OffsetKeyTime KeyTime="0:0:5"
                             x:Key="A_KeyTime_YouWonAPrize_On_Begin" />
        <local:OffsetKeyTime KeyTime="{StaticResource A_KeyTime_YouWonAPrize_On_Begin}"
                             Offset="0:0:0.33"
                             x:Key="A_KeyTime_YouWonAPrize_Off_End" />
        <local:OffsetKeyTime KeyTime="{StaticResource A_KeyTime_YouWonAPrize_On_Begin}"
                             Offset="0:0:0.6"
                             x:Key="A_KeyTime_YouWonAPrize_On_End" />
        <local:OffsetKeyTime KeyTime="{StaticResource A_KeyTime_YouWonAPrize_On_End}"
                             Offset="0:0:10"
                             x:Key="A_KeyTime_YouWonAPrize_Slide_end" />

        <local:OffsetKeyTime KeyTime="0:0:0.35"
                             x:Key="A_KeyTime_YouWonAPrize_FullScreenWinFlash" />

        <local:UIStoryboard x:Key="A_Storyboard_E3YouWonAPrize">
            <local:UIStoryboard.TriggerAnimation>
                <local:PlayVideoTrigger Storyboard.TargetName="Video"
                                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_YouWonAPrize_FullScreenWinFlash}" />
                <local:PlayVideoTrigger Storyboard.TargetName="WinVideo"
                                        local:TriggerAnimation.KeyTime="0:0:3.5" />
                <local:StartAudioTrigger EventName="/Master/UI/E3/UI_Forzathon_WinFlash"
                                         local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_YouWonAPrize_FullScreenWinFlash}" />
                <local:StartAudioTrigger EventName="/Master/UI/E3/UI_Forzathon_Win"
                                         local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_YouWonAPrize_On_Begin}" />
                <local:RaiseEntityModelEvent local:TriggerAnimation.KeyTime="0:0:7"
                                             EventName="UISequenceComplete" />
                <local:RaiseFzEvent local:TriggerAnimation.KeyTime="0:0:8"
                                    EventName="dummy" />
            </local:UIStoryboard.TriggerAnimation>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Bars"
                                           Storyboard.TargetProperty="Opacity">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                        Value="0" />
                <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_YouWonAPrize_On_Begin}"
                                        Value="0" />
                <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_YouWonAPrize_On_End}"
                                      Value="1" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="TilesWrapper"
                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                        Value="0" />
                <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_YouWonAPrize_On_Begin}"
                                        Value="0" />
                <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_YouWonAPrize_Off_End}"
                                      Value="2000"
                                      EasingFunction="{local:QuadraticEasing EasingMode=EaseInOut}" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="TopLine"
                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                        Value="-2000" />
                <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_YouWonAPrize_On_Begin}"
                                        Value="-2000" />
                <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_YouWonAPrize_On_End}"
                                      Value="50"
                                      EasingFunction="{local:QuadraticEasing EasingMode=EaseInOut}" />
                <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_YouWonAPrize_Slide_end}"
                                      Value="100"
                                      EasingFunction="{local:LinearEasing}" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BottomLine"
                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                        Value="2000" />
                <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_YouWonAPrize_On_Begin}"
                                        Value="2000" />
                <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_YouWonAPrize_On_End}"
                                      Value="50"
                                      EasingFunction="{local:QuadraticEasing EasingMode=EaseInOut}" />
                <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_YouWonAPrize_Slide_end}"
                                      Value="0"
                                      EasingFunction="{local:LinearEasing}" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="TopLine"
                                           Storyboard.TargetProperty="Opacity">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                        Value="0" />
                <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_YouWonAPrize_On_Begin}"
                                        Value="0" />
                <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_YouWonAPrize_On_End}"
                                      Value="1"
                                      EasingFunction="{local:LinearEasing}" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BottomLine"
                                           Storyboard.TargetProperty="Opacity">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                        Value="0" />
                <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_YouWonAPrize_On_Begin}"
                                        Value="0" />
                <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_YouWonAPrize_On_End}"
                                      Value="1"
                                      EasingFunction="{local:LinearEasing}" />
            </DoubleAnimationUsingKeyFrames>
        </local:UIStoryboard>

        <local:UIStoryboard x:Key="A_Storyboard_RewardOn">
            <local:UIStoryboard.TriggerAnimation>
                <local:RaiseFzEvent EventName="Accumulate"
                                    local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_Tile_On}" />
                <local:RaiseFzEvent EventName="dummy"
                                    local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_Tile_On_Dummy}" />
            </local:UIStoryboard.TriggerAnimation>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="TileRoot"
                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)">
                <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_Tile_On}"
                                      Value="0"
                                      EasingFunction="{local:QuadraticEasing EasingMode=EaseInOut}" />
            </DoubleAnimationUsingKeyFrames>
        </local:UIStoryboard>

        <local:LinearTransformConverter x:Key="A_Converter_BlurMultiplier"
                                        Scale="2" />

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

        <System:Double x:Key="A_Double_LowerTextVOffset">451</System:Double>

        <ControlTemplate x:Key="A_Template_TileShadow"
                         TargetType="Control">
            <Grid>
                <StackPanel Orientation="Horizontal"
                            x:Name="TileRoot">
                    <UIElement.RenderTransform>
                        <TranslateTransform X="{Binding Index, Converter={StaticResource A_Converter_TileOffset}}" />
                    </UIElement.RenderTransform>
                    <Grid Width="{StaticResource A_Double_TileWidth}">
                        <local:FZMaterial ImageSource="game:\Media\UI\Textures\Data_Bound\E3\Tile_Shadow.png"
                                          Stretch="UniformToFill"
                                          HorizontalAlignment="Center" />
                    </Grid>
                </StackPanel>
            </Grid>
            <ControlTemplate.Triggers>
                <DataTrigger Binding="{Binding Reached}"
                             Value="True">
                    <DataTrigger.EnterActions>
                        <local:BeginUIStoryboard Name="RewardOn"
                                                 Storyboard="{StaticResource A_Storyboard_RewardOn}" />
                    </DataTrigger.EnterActions>
                    <DataTrigger.ExitActions>
                        <StopStoryboard BeginStoryboardName="RewardOn" />
                    </DataTrigger.ExitActions>
                </DataTrigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>

        <ControlTemplate x:Key="A_Template_Tile"
                         TargetType="Control">
            <Grid>
                <StackPanel Orientation="Horizontal"
                            x:Name="TileRoot"
                            local:MotionBlurEffect.MotionBlurPositionXControl="{Binding Path=(UIElement.RenderTransform).(TranslateTransform.X), RelativeSource={RelativeSource Self}, Converter={StaticResource A_Converter_BlurMultiplier}}">
                    <FrameworkElement.Style>
                        <Style TargetType="FrameworkElement">
                            <Setter Property="Effect"
                                    Value="{StaticResource A_MotionBlurEffect}" />
                            <Style.Triggers>
                                <Trigger Property="local:MotionBlurEffect.MotionBlurPositionXControl"
                                         Value="0">
                                    <Setter Property="Effect"
                                            Value="{x:Null}" />
                                </Trigger>
                            </Style.Triggers>
                        </Style>
                    </FrameworkElement.Style>
                    <UIElement.RenderTransform>
                        <TranslateTransform X="{Binding Index, Converter={StaticResource A_Converter_TileOffset}}" />
                    </UIElement.RenderTransform>
                    <Grid Width="{StaticResource A_Double_TileWidth}">
                        <local:FZMaterial ImageSource="{Binding Index, Converter={StaticResource A_Converter_TileToImage}}"
                                          Stretch="UniformToFill"
                                          HorizontalAlignment="Center" />

                        <Grid HorizontalAlignment="Center"
                              RenderTransformOrigin="0.5,0.5">
                            <UIElement.RenderTransform>
                                <SkewTransform AngleX="-25" />
                            </UIElement.RenderTransform>
                            <StackPanel VerticalAlignment="Bottom">
                                <Decorator RenderTransformOrigin="0.5,0.5">
                                    <UIElement.RenderTransform>
                                        <TransformGroup>
                                            <SkewTransform AngleX="25" />
                                            <RotateTransform Angle="-9" />
                                        </TransformGroup>
                                    </UIElement.RenderTransform>
                                    <Decorator RenderTransformOrigin="0.5,0.5">
                                        <UIElement.RenderTransform>
                                            <SkewTransform AngleX="-17" />
                                        </UIElement.RenderTransform>
                                        <local:FZTextBlock Text="{Binding Index, Converter={StaticResource A_Converter_TileToSeasonObjectiveTitle}}"
                                                           Color="#fff"
                                                           CapHeight="30"
                                                           TextAlignment="Center"
                                                           HorizontalAlignment="Center"
                                                           Style="{StaticResource A_Style_FZTextBlock_HorizonA}"
                                                           VerticalAlignment="Bottom" />
                                    </Decorator>
                                </Decorator>

                                <Decorator Height="108.5" />
                            </StackPanel>
                        </Grid>

                        <Grid HorizontalAlignment="Center"
                              RenderTransformOrigin="0.5,0.5">
                            <UIElement.RenderTransform>
                                <SkewTransform AngleX="-25" />
                            </UIElement.RenderTransform>
                            <StackPanel VerticalAlignment="Top">
                                <Decorator Height="{StaticResource A_Double_LowerTextVOffset}" />

                                <Decorator RenderTransformOrigin="0.5,0.5">
                                    <UIElement.RenderTransform>
                                        <TransformGroup>
                                            <SkewTransform AngleX="25" />
                                            <RotateTransform Angle="-9" />
                                        </TransformGroup>
                                    </UIElement.RenderTransform>
                                    <Decorator RenderTransformOrigin="0.5,0.5">
                                        <UIElement.RenderTransform>
                                            <SkewTransform AngleX="-17" />
                                        </UIElement.RenderTransform>
                                        <StackPanel Orientation="Horizontal"
                                                    HorizontalAlignment="Left">
                                            <Decorator Width="35" />
                                            <local:FZTextBlock local:TextBlockInlineMarkup.Markup="{Binding Index, Converter={StaticResource A_Converter_TileToSeasonObjectiveDesc}}"
                                                                   Color="#fff"
                                                                   local:TextBlockInlineMarkup.ResourceBaseName="A_Style_FZRun_"
                                                                   CapHeight="19"
                                                                   TextAlignment="Center"
                                                                   TextWrapping="Wrap"
                                                                   StretchDirection="DownOnly"
                                                                   LineAdjust="-0.30"
                                                                   LineStackingStrategy="BlockLineHeight"
                                                                   Style="{StaticResource A_Style_FZTextBlock_HorizonB}"
                                                                   HorizontalAlignment="Center"
                                                                   VerticalAlignment="Bottom" />
                                        </StackPanel>
                                    </Decorator>
                                </Decorator>
                            </StackPanel>
                        </Grid>

                    </Grid>
                </StackPanel>

            </Grid>
            <ControlTemplate.Triggers>
                <DataTrigger Binding="{Binding Reached}"
                             Value="True">
                    <DataTrigger.EnterActions>
                        <local:BeginUIStoryboard Name="RewardOn"
                                                 Storyboard="{StaticResource A_Storyboard_RewardOn}" />
                    </DataTrigger.EnterActions>
                    <DataTrigger.ExitActions>
                        <StopStoryboard BeginStoryboardName="RewardOn" />
                    </DataTrigger.ExitActions>
                </DataTrigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>

        <System:Double x:Key="A_Double_TileGaps">6</System:Double>

        <System:Double x:Key="A_Double_InitialSlamScale">2</System:Double>

        <local:OffsetKeyTime x:Key="A_KeyTime_Slam_On"
                             KeyTime="0:0:0.4" />

        <local:OffsetKeyTime x:Key="A_KeyTime_Slam_Next"
                             Offset="0:0:0.3"
                             KeyTime="{StaticResource A_KeyTime_Slam_On}" />

        <local:UIStoryboard x:Key="A_Storyboard_Slam">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)">
                <SplineDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_Slam_On}"
                                      Value="1"
                                      KeySpline="0.7,0.0,0.7,0.0" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)">
                <SplineDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_Slam_On}"
                                      Value="1"
                                      KeySpline="0.7,0.0,0.7,0.0" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity">
                <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_Slam_On}"
                                      Value="1"
                                      EasingFunction="{local:LinearEasing}" />
            </DoubleAnimationUsingKeyFrames>
        </local:UIStoryboard>
        <local:UIStoryboard x:Key="A_Storyboard_SlamReset"
                            FillBehavior="Stop">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)" />
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" />
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" />
        </local:UIStoryboard>


        <local:UIStoryboard x:Key="A_Storyboard_SlamOn_Reset">
            <local:UIStoryboard.TriggerAnimation>
                <local:BeginUIStoryboard Storyboard="{StaticResource A_Storyboard_SlamReset}"
                                         local:TriggerAnimation.KeyTime="0:0:0"
                                         Storyboard.TargetName="SlamFail" />
                <local:BeginUIStoryboard Storyboard="{StaticResource A_Storyboard_SlamReset}"
                                         local:TriggerAnimation.KeyTime="0:0:0"
                                         Storyboard.TargetName="Slam" />
            </local:UIStoryboard.TriggerAnimation>
        </local:UIStoryboard>

        <local:UIStoryboard x:Key="A_Storyboard_SlamOn_Win">
            <local:UIStoryboard.TriggerAnimation>
                <local:BeginUIStoryboard Storyboard="{StaticResource A_Storyboard_SlamReset}"
                                         Storyboard.TargetName="SlamFail"
                                         local:TriggerAnimation.KeyTime="0:0:0" />
                <local:BeginUIStoryboard Storyboard="{StaticResource A_Storyboard_Slam}"
                                         Storyboard.TargetName="Slam"
                                         local:TriggerAnimation.KeyTime="0:0:0" />
                <local:PlayVideoTrigger Storyboard.TargetName="Video"
                                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_Slam_On}" />
                <local:RaiseFzEvent EventName="Accumulate"
                                    local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_Slam_Next}" />
                <local:RaiseFzEvent EventName="dummy"
                                    local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_Tile_On_Dummy}" />
                <local:StartAudioTrigger EventName="/Master/UI/E3/UI_Forzathon_Success" />
            </local:UIStoryboard.TriggerAnimation>
        </local:UIStoryboard>

        <local:UIStoryboard x:Key="A_Storyboard_SlamOn_Fail">
            <local:UIStoryboard.TriggerAnimation>
                <local:BeginUIStoryboard Storyboard="{StaticResource A_Storyboard_SlamReset}"
                                         Storyboard.TargetName="Slam"
                                         local:TriggerAnimation.KeyTime="0:0:0" />
                <local:BeginUIStoryboard Storyboard="{StaticResource A_Storyboard_Slam}"
                                         Storyboard.TargetName="SlamFail"
                                         local:TriggerAnimation.KeyTime="0:0:0" />
                <local:RaiseFzEvent EventName="Accumulate"
                                    local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_Slam_Next}" />
                <local:RaiseFzEvent EventName="dummy"
                                    local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_Tile_On_Dummy}" />
                <local:StartAudioTrigger EventName="/Master/UI/E3/UI_Forzathon_Lose" />
            </local:UIStoryboard.TriggerAnimation>
        </local:UIStoryboard>

        <ControlTemplate x:Key="A_Template_Tile_Slam"
                         TargetType="Control">
            <Grid Width="{StaticResource A_Double_TileWidth}">

                <Grid x:Name="Slam"
                      RenderTransformOrigin="0.5,0.5"
                      Opacity="0">
                    <UIElement.RenderTransform>
                        <ScaleTransform ScaleX="{StaticResource A_Double_InitialSlamScale}"
                                        ScaleY="{StaticResource A_Double_InitialSlamScale}" />
                    </UIElement.RenderTransform>
                    <local:FZMaterial ImageSource="{Binding Index, Converter={StaticResource A_Converter_TileToImageWin}}"
                                      Stretch="UniformToFill"
                                      HorizontalAlignment="Center" />
                    <Grid HorizontalAlignment="Stretch"
                          RenderTransformOrigin="0.5,0.5">
                        <UIElement.RenderTransform>
                            <SkewTransform AngleX="-25" />
                        </UIElement.RenderTransform>
                        <StackPanel VerticalAlignment="Bottom">
                            <Decorator RenderTransformOrigin="0.5,0.5">
                                <UIElement.RenderTransform>
                                    <TransformGroup>
                                        <SkewTransform AngleX="25" />
                                        <RotateTransform Angle="-9" />
                                    </TransformGroup>
                                </UIElement.RenderTransform>
                                <Decorator RenderTransformOrigin="0.5,0.5">
                                    <UIElement.RenderTransform>
                                        <SkewTransform AngleX="-17" />
                                    </UIElement.RenderTransform>
                                    <StackPanel Orientation="Horizontal"
                                                HorizontalAlignment="Right">
                                        <local:FZTextBlock Text="{Binding Index, Converter={StaticResource A_Converter_TileToSeasonObjectiveTitle}}"
                                                           Color="#824910"
                                                           CapHeight="30"
                                                           HorizontalAlignment="Right"
                                                           Style="{StaticResource A_Style_FZTextBlock_HorizonA}"
                                                           VerticalAlignment="Center" />
                                        <Decorator Width="132" />
                                    </StackPanel>
                                </Decorator>
                            </Decorator>

                            <Decorator Height="107" />
                        </StackPanel>
                    </Grid>

                    <Grid HorizontalAlignment="Center"
                          RenderTransformOrigin="0.5,0.5">
                        <UIElement.RenderTransform>
                            <SkewTransform AngleX="-25" />
                        </UIElement.RenderTransform>
                        <StackPanel VerticalAlignment="Top">
                            <Decorator Height="{StaticResource A_Double_LowerTextVOffset}" />

                            <Decorator RenderTransformOrigin="0.5,0.5">
                                <UIElement.RenderTransform>
                                    <TransformGroup>
                                        <SkewTransform AngleX="25" />
                                        <RotateTransform Angle="-9" />
                                    </TransformGroup>
                                </UIElement.RenderTransform>
                                <Decorator RenderTransformOrigin="0.5,0.5">
                                    <UIElement.RenderTransform>
                                        <SkewTransform AngleX="-17" />
                                    </UIElement.RenderTransform>
                                    <StackPanel Orientation="Horizontal"
                                                HorizontalAlignment="Right">
                                        <local:FZTextBlock local:TextBlockInlineMarkup.Markup="{Binding Tag.Score, RelativeSource={RelativeSource TemplatedParent}}"
                                                           Color="#fff"
                                                           local:TextBlockInlineMarkup.ResourceBaseName="A_Style_FZRun_"
                                                           CapHeight="19"
                                                           TextAlignment="Center"
                                                           TextWrapping="Wrap"
                                                           StretchDirection="DownOnly"
                                                           LineAdjust="-0.35"
                                                           LineStackingStrategy="BlockLineHeight"
                                                           Style="{StaticResource A_Style_FZTextBlock_HorizonB}"
                                                           HorizontalAlignment="Center"
                                                           VerticalAlignment="Bottom" />
                                        <Decorator Width="20" />
                                    </StackPanel>
                                </Decorator>
                            </Decorator>
                        </StackPanel>
                    </Grid>
                </Grid>

                <Grid x:Name="SlamFail"
                      RenderTransformOrigin="0.5,0.5"
                      Opacity="0">
                    <UIElement.RenderTransform>
                        <ScaleTransform ScaleX="{StaticResource A_Double_InitialSlamScale}"
                                        ScaleY="{StaticResource A_Double_InitialSlamScale}" />
                    </UIElement.RenderTransform>
                    <local:FZMaterial ImageSource="{Binding Index, Converter={StaticResource A_Converter_TileToImageFail}}"
                                      Stretch="UniformToFill"
                                      HorizontalAlignment="Center" />
                    <Grid HorizontalAlignment="Stretch"
                          RenderTransformOrigin="0.5,0.5">
                        <UIElement.RenderTransform>
                            <SkewTransform AngleX="-25" />
                        </UIElement.RenderTransform>
                        <StackPanel VerticalAlignment="Bottom">
                            <Decorator RenderTransformOrigin="0.5,0.5">
                                <UIElement.RenderTransform>
                                    <TransformGroup>
                                        <SkewTransform AngleX="25" />
                                        <RotateTransform Angle="-9" />
                                    </TransformGroup>
                                </UIElement.RenderTransform>
                                <Decorator RenderTransformOrigin="0.5,0.5">
                                    <UIElement.RenderTransform>
                                        <SkewTransform AngleX="-17" />
                                    </UIElement.RenderTransform>
                                    <local:FZTextBlock Text="{Binding Index, Converter={StaticResource A_Converter_TileToSeasonObjectiveTitle}}"
                                                       Color="#fff"
                                                       CapHeight="30"
                                                       HorizontalAlignment="Center"
                                                       TextAlignment="Center"
                                                       Style="{StaticResource A_Style_FZTextBlock_HorizonA}"
                                                       VerticalAlignment="Center" />
                                </Decorator>
                            </Decorator>

                            <Decorator Height="108.5" />
                        </StackPanel>
                    </Grid>

                    <Grid HorizontalAlignment="Center"
                          RenderTransformOrigin="0.5,0.5">
                        <UIElement.RenderTransform>
                            <SkewTransform AngleX="-25" />
                        </UIElement.RenderTransform>
                        <StackPanel VerticalAlignment="Top">
                            <Decorator Height="{StaticResource A_Double_LowerTextVOffset}" />

                            <Decorator RenderTransformOrigin="0.5,0.5">
                                <UIElement.RenderTransform>
                                    <TransformGroup>
                                        <SkewTransform AngleX="25" />
                                        <RotateTransform Angle="-9" />
                                    </TransformGroup>
                                </UIElement.RenderTransform>
                                <Decorator RenderTransformOrigin="0.5,0.5">
                                    <UIElement.RenderTransform>
                                        <SkewTransform AngleX="-17" />
                                    </UIElement.RenderTransform>
                                    <StackPanel Orientation="Horizontal"
                                                HorizontalAlignment="Left">
                                        <Decorator Width="35" />
                                        <local:FZTextBlock local:TextBlockInlineMarkup.Markup="{Binding Tag.Score, RelativeSource={RelativeSource TemplatedParent}}"
                                                           Color="#fff"
                                                           local:TextBlockInlineMarkup.ResourceBaseName="A_Style_FZRun_"
                                                           CapHeight="19"
                                                           TextAlignment="Center"
                                                           TextWrapping="Wrap"
                                                           StretchDirection="DownOnly"
                                                           LineAdjust="-0.35"
                                                           LineStackingStrategy="BlockLineHeight"
                                                           Style="{StaticResource A_Style_FZTextBlock_HorizonB}"
                                                           HorizontalAlignment="Center"
                                                           VerticalAlignment="Bottom" />
                                    </StackPanel>
                                </Decorator>
                            </Decorator>
                        </StackPanel>
                    </Grid>
                </Grid>

                <local:FZMediaElement Source="game:/Media/UI/Videos/E3/Individual_Tile_Glow.bk2"
                                      local:FzMediaElementExtension.Loop="False"
                                      LoadedBehavior="Stop"
                                      UnloadedBehavior="Stop"
                                      HorizontalAlignment="Center"
                                      Stretch="UniformToFill"
                                      x:Name="Video">
                    <local:FZMediaElement.Preset>
                        <local:FZMaterialPreset AlphaMode="AdditiveNoAlpha" />
                    </local:FZMediaElement.Preset>
                </local:FZMediaElement>

            </Grid>
            <ControlTemplate.Triggers>
                <MultiDataTrigger>
                    <MultiDataTrigger.Conditions>
                        <Condition Binding="{Binding Tag.Completed, RelativeSource={RelativeSource Self}}"
                                   Value="True" />
                        <Condition Binding="{Binding Reached}"
                                   Value="True" />
                    </MultiDataTrigger.Conditions>
                    <MultiDataTrigger.EnterActions>
                        <local:BeginUIStoryboard Name="Win"
                                                 Storyboard="{StaticResource A_Storyboard_SlamOn_Win}" />
                    </MultiDataTrigger.EnterActions>
                </MultiDataTrigger>
                <MultiDataTrigger>
                    <MultiDataTrigger.Conditions>
                        <Condition Binding="{Binding Tag.Completed, RelativeSource={RelativeSource Self}}"
                                   Value="False" />
                        <Condition Binding="{Binding Reached}"
                                   Value="True" />
                    </MultiDataTrigger.Conditions>
                    <MultiDataTrigger.EnterActions>
                        <local:BeginUIStoryboard Name="Fail"
                                                 Storyboard="{StaticResource A_Storyboard_SlamOn_Fail}" />
                    </MultiDataTrigger.EnterActions>
                </MultiDataTrigger>
                <MultiDataTrigger>
                    <MultiDataTrigger.Conditions>
                        <Condition Binding="{Binding Reached}"
                                   Value="False" />
                    </MultiDataTrigger.Conditions>
                    <MultiDataTrigger.EnterActions>
                        <local:BeginUIStoryboard Storyboard="{StaticResource A_Storyboard_SlamOn_Reset}" />
                    </MultiDataTrigger.EnterActions>
                </MultiDataTrigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>

        <local:MappingConverter x:Key="A_Converter_PrizeString"
                                Default="{local:Loc InGame.IDS_PostRace_E3_CongratulationsPrize}">
            <local:MappingConverterEntry Key="False"
                                         Value="{local:Loc InGame.IDS_PostRace_E3_CongratulationsNoPrize}" />
        </local:MappingConverter>
        
    </Page.Resources>
    <Grid>
        <Control Template="{StaticResource A_Template_StarsGoldBackground}" />

        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_PostRace_Hatching}" />


        <local:FZMediaElement Source="game:/Media/UI/Videos/Stars_Particles.bk2"
                              local:FzMediaElementExtension.Loop="True"
                              LoadedBehavior="Stop"
                              UnloadedBehavior="Stop"
                              HorizontalAlignment="Center"
                              Stretch="UniformToFill"
                              Preset="{StaticResource A_FZMaterialPresetAdditive}"
                              x:Name="WinVideo" />

        <Grid RenderTransformOrigin="0.5,0.5"
              HorizontalAlignment="Center"
              VerticalAlignment="Center">
            <UIElement.RenderTransform>
                <RotateTransform Angle="-6" />
            </UIElement.RenderTransform>
            <StackPanel MaxWidth="1500"
                        Margin="0,0,0,60">
                <Decorator x:Name="TopLine"
                           Margin="70,0,0,0"
                           Effect="{StaticResource A_MotionBlurEffect}"
                           local:MotionBlurEffect.MotionBlurPositionXControl="{Binding RenderTransform.X, RelativeSource={RelativeSource Self}}"
                           Opacity="0">
                    <UIElement.RenderTransform>
                        <TranslateTransform />
                    </UIElement.RenderTransform>
                    <Decorator RenderTransformOrigin="0.5,0.5"
                                RenderTransform="{StaticResource A_Transform_Italic}">
                        <local:FZTextBlock Color="#fff"
                                            Style="{StaticResource A_Style_FZTextBlock_HorizonB}"
                                            CapHeight="52"
                                            Text="{local:Loc InGame.IDS_PostRace_E3_Congratulations}" />
                    </Decorator>
                </Decorator>

                <Decorator Height="13" />

                <Decorator x:Name="BottomLine"
                           Effect="{StaticResource A_MotionBlurEffect}"
                           local:MotionBlurEffect.MotionBlurPositionXControl="{Binding RenderTransform.X, RelativeSource={RelativeSource Self}}"
                           RenderTransformOrigin="0.5,0.5"
                           Opacity="0">
                    <UIElement.RenderTransform>
                        <TranslateTransform />
                    </UIElement.RenderTransform>
                    <Decorator RenderTransformOrigin="0.5,0.5"
                               RenderTransform="{StaticResource A_Transform_Italic}">
                        <local:FZTextBlock Color="#fff"
                                           Style="{StaticResource A_Style_FZTextBlock_HorizonA}"
                                           CapHeight="118"
                                           Text="{Binding PrizesAvailable, Converter={StaticResource A_Converter_PrizeString}}" />
                    </Decorator>
                </Decorator>
            </StackPanel>
        </Grid>

                <Decorator ClipToBounds="True"
                   Width="1920"
                   Height="540"
                   local:MotionBlurEffect.MotionBlurPositionXControl="{Binding Path=(UIElement.RenderTransform).(TranslateTransform.X), ElementName=TilesWrapper, Converter={StaticResource A_Converter_BlurMultiplier}}">
            <FrameworkElement.Style>
                <Style TargetType="FrameworkElement">
                    <Setter Property="Effect"
                            Value="{StaticResource A_MotionBlurEffect}" />
                    <Style.Triggers>
                        <Trigger Property="local:MotionBlurEffect.MotionBlurPositionXControl"
                                 Value="0">
                            <Setter Property="Effect"
                                    Value="{x:Null}" />
                        </Trigger>
                    </Style.Triggers>
                </Style>
            </FrameworkElement.Style>
            <UIElement.RenderTransform>
                <TranslateTransform />
            </UIElement.RenderTransform>
            <Grid HorizontalAlignment="Center"
                  x:Name="TilesWrapper">
                <UIElement.RenderTransform>
                    <TranslateTransform />
                </UIElement.RenderTransform>
                <StackPanel Orientation="Horizontal"
                            HorizontalAlignment="Center"
                            x:Name="Shadows">
                    <Control Template="{StaticResource A_Template_TileShadow}"
                             x:Name="Shadow0">
                        <FrameworkElement.DataContext>
                            <local:TickerItemsControlItem Index="0" />
                        </FrameworkElement.DataContext>
                    </Control>

                    <Decorator Width="{StaticResource A_Double_TileGaps}" />

                    <Control Template="{StaticResource A_Template_TileShadow}"
                             x:Name="Shadow1">
                        <FrameworkElement.DataContext>
                            <local:TickerItemsControlItem Index="1" />
                        </FrameworkElement.DataContext>
                    </Control>

                    <Decorator Width="{StaticResource A_Double_TileGaps}" />

                    <Control Template="{StaticResource A_Template_TileShadow}"
                             x:Name="Shadow2">
                        <FrameworkElement.DataContext>
                            <local:TickerItemsControlItem Index="2" />
                        </FrameworkElement.DataContext>
                    </Control>

                    <Decorator Width="{StaticResource A_Double_TileGaps}" />

                    <Control Template="{StaticResource A_Template_TileShadow}"
                             x:Name="Shadow3">
                        <FrameworkElement.DataContext>
                            <local:TickerItemsControlItem Index="3" />
                        </FrameworkElement.DataContext>
                    </Control>
                </StackPanel>

                <!-- I wanted to use an ItemsControl but the z ordering is all over the place so we have to deconstruct one instead -->
                <StackPanel Orientation="Horizontal"
                            HorizontalAlignment="Center"
                            x:Name="Tiles">
                    <Control Template="{StaticResource A_Template_Tile}"
                             x:Name="Tile0"
                             Panel.ZIndex="3"
                             Tag="{Binding Rewards[0], ElementName=Page}">
                        <FrameworkElement.DataContext>
                            <local:TickerItemsControlItem Index="0" />
                        </FrameworkElement.DataContext>
                    </Control>

                    <Decorator Width="{StaticResource A_Double_TileGaps}" />

                    <Control Template="{StaticResource A_Template_Tile}"
                             x:Name="Tile1"
                             Panel.ZIndex="2"
                             Tag="{Binding Rewards[1], ElementName=Page}">
                        <FrameworkElement.DataContext>
                            <local:TickerItemsControlItem Index="1" />
                        </FrameworkElement.DataContext>
                    </Control>

                    <Decorator Width="{StaticResource A_Double_TileGaps}" />

                    <Control Template="{StaticResource A_Template_Tile}"
                             x:Name="Tile2"
                             Panel.ZIndex="1"
                             Tag="{Binding Rewards[2], ElementName=Page}">
                        <FrameworkElement.DataContext>
                            <local:TickerItemsControlItem Index="2" />
                        </FrameworkElement.DataContext>
                    </Control>

                    <Decorator Width="{StaticResource A_Double_TileGaps}" />

                    <Control Template="{StaticResource A_Template_Tile}"
                             x:Name="Tile3"
                             Panel.ZIndex="0"
                             Tag="{Binding Rewards[3], ElementName=Page}">
                        <FrameworkElement.DataContext>
                            <local:TickerItemsControlItem Index="3" />
                        </FrameworkElement.DataContext>
                    </Control>

                    <local:EventFire.FzTriggers>
                        <local:Accumulate local:EventFireTrigger.Event="Accumulate"
                                          local:EventFireTrigger.TargetName="Shadow0"
                                          Amount="1"
                                          Property="(FrameworkElement.DataContext).(local:TickerItemsControlItem.Value)" />
                        <local:Accumulate local:EventFireTrigger.Event="Accumulate"
                                          local:EventFireTrigger.TargetName="Shadow1"
                                          Amount="1"
                                          Property="(FrameworkElement.DataContext).(local:TickerItemsControlItem.Value)" />
                        <local:Accumulate local:EventFireTrigger.Event="Accumulate"
                                          local:EventFireTrigger.TargetName="Shadow2"
                                          Amount="1"
                                          Property="(FrameworkElement.DataContext).(local:TickerItemsControlItem.Value)" />
                        <local:Accumulate local:EventFireTrigger.Event="Accumulate"
                                          local:EventFireTrigger.TargetName="Shadow3"
                                          Amount="1"
                                          Property="(FrameworkElement.DataContext).(local:TickerItemsControlItem.Value)" />

                        <local:Accumulate local:EventFireTrigger.Event="Accumulate"
                                          local:EventFireTrigger.TargetName="Tile0"
                                          Amount="1"
                                          Property="(FrameworkElement.DataContext).(local:TickerItemsControlItem.Value)" />
                        <local:Accumulate local:EventFireTrigger.Event="Accumulate"
                                          local:EventFireTrigger.TargetName="Tile1"
                                          Amount="1"
                                          Property="(FrameworkElement.DataContext).(local:TickerItemsControlItem.Value)" />
                        <local:Accumulate local:EventFireTrigger.Event="Accumulate"
                                          local:EventFireTrigger.TargetName="Tile2"
                                          Amount="1"
                                          Property="(FrameworkElement.DataContext).(local:TickerItemsControlItem.Value)" />
                        <local:Accumulate local:EventFireTrigger.Event="Accumulate"
                                          local:EventFireTrigger.TargetName="Tile3"
                                          Amount="1"
                                          Property="(FrameworkElement.DataContext).(local:TickerItemsControlItem.Value)" />
                    </local:EventFire.FzTriggers>
                </StackPanel>

                <StackPanel Orientation="Horizontal"
                            x:Name="SlamTiles">
                    <Control Template="{StaticResource A_Template_Tile_Slam}"
                             x:Name="SlamTile0"
                             Tag="{Binding Rewards[0], ElementName=Page}">
                        <FrameworkElement.DataContext>
                            <local:TickerItemsControlItem Index="0" />
                        </FrameworkElement.DataContext>
                    </Control>

                    <Decorator Width="{StaticResource A_Double_TileGaps}" />

                    <Control Template="{StaticResource A_Template_Tile_Slam}"
                             x:Name="SlamTile1"
                             Tag="{Binding Rewards[1], ElementName=Page}">
                        <FrameworkElement.DataContext>
                            <local:TickerItemsControlItem Index="1" />
                        </FrameworkElement.DataContext>
                    </Control>

                    <Decorator Width="{StaticResource A_Double_TileGaps}" />

                    <Control Template="{StaticResource A_Template_Tile_Slam}"
                             x:Name="SlamTile2"
                             Tag="{Binding Rewards[2], ElementName=Page}">
                        <FrameworkElement.DataContext>
                            <local:TickerItemsControlItem Index="2" />
                        </FrameworkElement.DataContext>
                    </Control>

                    <Decorator Width="{StaticResource A_Double_TileGaps}" />

                    <Control Template="{StaticResource A_Template_Tile_Slam}"
                             x:Name="SlamTile3"
                             Tag="{Binding Rewards[3], ElementName=Page}">
                        <FrameworkElement.DataContext>
                            <local:TickerItemsControlItem Index="3" />
                        </FrameworkElement.DataContext>
                    </Control>

                    <local:EventFire.FzTriggers>
                        <local:Accumulate local:EventFireTrigger.Event="Accumulate"
                                          local:EventFireTrigger.TargetName="SlamTile0"
                                          Amount="1"
                                          Property="(FrameworkElement.DataContext).(local:TickerItemsControlItem.Value)" />
                        <local:Accumulate local:EventFireTrigger.Event="Accumulate"
                                          local:EventFireTrigger.TargetName="SlamTile1"
                                          Amount="1"
                                          Property="(FrameworkElement.DataContext).(local:TickerItemsControlItem.Value)" />
                        <local:Accumulate local:EventFireTrigger.Event="Accumulate"
                                          local:EventFireTrigger.TargetName="SlamTile2"
                                          Amount="1"
                                          Property="(FrameworkElement.DataContext).(local:TickerItemsControlItem.Value)" />
                        <local:Accumulate local:EventFireTrigger.Event="Accumulate"
                                          local:EventFireTrigger.TargetName="SlamTile3"
                                          Amount="1"
                                          Property="(FrameworkElement.DataContext).(local:TickerItemsControlItem.Value)" />
                    </local:EventFire.FzTriggers>
                </StackPanel>
            </Grid>
        </Decorator>



        <local:FZMediaElement Source="game:/Media/UI/Videos/E3/Full_Screen_Glow.bk2"
                              local:FzMediaElementExtension.Loop="False"
                              LoadedBehavior="Stop"
                              UnloadedBehavior="Stop"
                              HorizontalAlignment="Center"
                              Stretch="UniformToFill"
                              Preset="{StaticResource A_FZMaterialPresetAdditive}"
                              x:Name="Video" />

        <Grid x:Name="Bars"
              Opacity="0">
            <local:FZMaterial Color="#000000"
                              Opacity="0.3"
                              Height="27"
                              VerticalAlignment="Bottom" />
            <local:FZMaterial Color="#000000"
                              Opacity="0.3"
                              Height="27"
                              VerticalAlignment="Top" />
        </Grid>

        <FrameworkElement>
            <FrameworkElement.Style>
                <Style>
                    <Style.Triggers>
                        <MultiDataTrigger>
                            <MultiDataTrigger.Conditions>
                                <Condition Binding="{Binding Rewards[0].Completed}"
                                           Value="True" />
                                <Condition Binding="{Binding Rewards[1].Completed}"
                                           Value="True" />
                                <Condition Binding="{Binding Rewards[2].Completed}"
                                           Value="True" />
                                <Condition Binding="{Binding Rewards[3].Completed}"
                                           Value="True" />
                                <Condition Binding="{Binding DataContext.Reached, ElementName=SlamTile3}"
                                           Value="True" />
                            </MultiDataTrigger.Conditions>
                            <MultiDataTrigger.EnterActions>
                                <local:RaiseFzEvent EventName="AllGold" />
                            </MultiDataTrigger.EnterActions>
                        </MultiDataTrigger>
                    </Style.Triggers>
                </Style>
            </FrameworkElement.Style>
        </FrameworkElement>
    </Grid>
    <local:EventFire.FzTriggers>
        <local:BeginUIStoryboard Storyboard="{StaticResource A_Storyboard_E3YouWonAPrize}"
                                 local:EventFireTrigger.Event="AllGold"/>
    </local:EventFire.FzTriggers>
    <FrameworkElement.Triggers>
        <EventTrigger RoutedEvent="FrameworkElement.Loaded">
            <local:BeginUIStoryboard Storyboard="{StaticResource A_Storyboard_E3Rewards}" />
        </EventTrigger>
    </FrameworkElement.Triggers>
</Page>
