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

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

    <Page.Resources>
        <Color x:Key="A_Color_Background">#1d1f20</Color>
        <Color x:Key="A_Color_PromoStamp">#00FEC3</Color>
        <Color x:Key="A_Color_PhotoChallengeGold">#E5C648</Color>
        <Color x:Key="A_Color_WhiteLineDivider">#30F5F5F5</Color>

        <Style x:Key="A_Style_FZTextBlock_CarsCollected"
               TargetType="local:FZTextBlock">
            <Setter Property="VerticalAlignment"
                    Value="Top" />
            <Setter Property="FontFamily"
                    Value="Horizon_B" />
            <Setter Property="FontSize"
                    Value="78" />
            <Setter Property="Color"
                    Value="{StaticResource A_Color_SubHeader_Text}" />
        </Style>

        <Style x:Key="A_Style_FZTextBlock_CarsCollected_FirstNum"
               TargetType="local:FZTextBlock"
               BasedOn="{StaticResource A_Style_FZTextBlock_CarsCollected}">
            <Setter Property="FontFamily"
                    Value="Horizon_A" />
        </Style>

        <!-- Do not change the names of these Duration & EasingFunction resources; they are accessed directly from the scene. -->
        <Duration x:Key="A_Duration_NewCarListItem">0:0:0.32</Duration>
        <QuadraticEase x:Key="A_EasingFunction_NewCarListItem"
                       EasingMode="EaseInOut" />

        <DoubleAnimationUsingKeyFrames x:Key="A_AnimationUsingKeyFrames_Stamp_XScale"
                                Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
            <EasingDoubleKeyFrame KeyTime="0"
                                  Value="2" />
            <EasingDoubleKeyFrame KeyTime="0:0:0.5"
                                  Value="1">
                <EasingDoubleKeyFrame.EasingFunction>
                    <CubicEase EasingMode="EaseIn" />
                </EasingDoubleKeyFrame.EasingFunction>
            </EasingDoubleKeyFrame>
        </DoubleAnimationUsingKeyFrames>

        <DoubleAnimationUsingKeyFrames x:Key="A_AnimationUsingKeyFrames_Stamp_YScale"
                                Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
            <EasingDoubleKeyFrame KeyTime="0"
                                  Value="2" />
            <EasingDoubleKeyFrame KeyTime="0:0:0.5"
                                  Value="1">
                <EasingDoubleKeyFrame.EasingFunction>
                    <CubicEase EasingMode="EaseIn" />
                </EasingDoubleKeyFrame.EasingFunction>
            </EasingDoubleKeyFrame>
        </DoubleAnimationUsingKeyFrames>

        <Style x:Key="A_Style_FZMaterial_BaseStamp" TargetType="local:FZMaterial">
            <Setter Property="Opacity"
                    Value="0" />
            <Setter Property="HorizontalAlignment" 
                    Value="Right" />
            <Setter Property="VerticalAlignment" 
                    Value="Top" />
            <Setter Property="Margin" 
                    Value="0,12,18,0" />
            <Setter Property="RenderTransformOrigin"
                    Value="0.5,0.5"/>
        </Style>

        <Style x:Key="A_Style_FZMaterial_PromoStamp" BasedOn="{StaticResource A_Style_FZMaterial_BaseStamp}"
               TargetType="local:FZMaterial">
            <Setter Property="Width"
                    Value="256" />
            <Setter Property="Height"
                    Value="256" />
            <Setter Property="ImageSource"
                    Value="/ForzaUI;component/Textures/Data_Bound/Promo/Promo_Results/Horizon_Promo_Stamp.png" />
            <Setter Property="Color" 
                    Value="{StaticResource A_Color_PromoStamp}" />
            <Setter Property="local:MultiDataConversion.TargetType"
                    Value="{x:Type Int32}" />
            <Setter Property="local:MultiDataConversion.Value"
                    Value="{Binding ProgressCurrentNum}" />
            <Setter Property="local:MultiDataConversion.Parameter"
                    Value="{Binding ProgressOutOf}" />
            <Setter Property="local:MultiDataConversion.Converter"
                    Value="{StaticResource A_CompareConverter}" />
            <Style.Triggers>
                <DataTrigger Binding="{Binding (local:MultiDataConversion.Output), RelativeSource={RelativeSource Self}}"
                             Value="{x:Static local:CompareResult.Equal}">
                    <DataTrigger.EnterActions>
                        <BeginStoryboard>
                            <BeginStoryboard.Storyboard>
                                <Storyboard>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity">
                                        <LinearDoubleKeyFrame KeyTime="0"
                                                              Value="0" />
                                        <LinearDoubleKeyFrame KeyTime="0:0:0.5"
                                                              Value="1" />
                                        <LinearDoubleKeyFrame KeyTime="0:0:2.1"
                                                              Value="1" />
                                        <LinearDoubleKeyFrame KeyTime="0:0:2.4"
                                                              Value="0" />
                                    </DoubleAnimationUsingKeyFrames>
                                    <StaticResourceExtension ResourceKey="A_AnimationUsingKeyFrames_Stamp_XScale"/>
                                    <StaticResourceExtension ResourceKey="A_AnimationUsingKeyFrames_Stamp_YScale"/>
                                </Storyboard>
                            </BeginStoryboard.Storyboard>
                        </BeginStoryboard>
                    </DataTrigger.EnterActions>
                </DataTrigger>
                <DataTrigger Binding="{Binding (local:MultiDataConversion.Output), RelativeSource={RelativeSource Self}}"
                             Value="{x:Static local:CompareResult.Equal}">
                    <DataTrigger.EnterActions>
                        <local:StartAudioTrigger local:TriggerAnimation.KeyTime="0:0:0.0"
                                                 EventName="/Master/UI/Map/HZ2_SFX_HUD_Map_FestivalUnlock_01"/>
                    </DataTrigger.EnterActions>
                </DataTrigger>
            </Style.Triggers>
        </Style>


        <Style x:Key="A_Style_FZMaterial_PhotoChallengeStamp" BasedOn="{StaticResource A_Style_FZMaterial_BaseStamp}"
               TargetType="local:FZMaterial">
            <Setter Property="Width"
                    Value="278" />
            <Setter Property="Height"
                    Value="278" />
            <Setter Property="ImageSource"
                    Value="/ForzaUI;component/Textures/Data_Bound/Series24/PhotoAnalysis/PhotoChallenge_Stamp.png" />
            <Style.Triggers>
                <DataTrigger Binding="{Binding AreAllChallengesComplete}"
                             Value="{StaticResource A_Boolean_True}">
                    <DataTrigger.EnterActions>
                        <BeginStoryboard>
                            <BeginStoryboard.Storyboard>
                                <Storyboard>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity">
                                        <LinearDoubleKeyFrame KeyTime="0"
                                                              Value="0" />
                                        <LinearDoubleKeyFrame KeyTime="0:0:0.5"
                                                              Value="1" />
                                    </DoubleAnimationUsingKeyFrames>
                                    <StaticResourceExtension ResourceKey="A_AnimationUsingKeyFrames_Stamp_XScale"/>
                                    <StaticResourceExtension ResourceKey="A_AnimationUsingKeyFrames_Stamp_YScale"/>
                                </Storyboard>
                            </BeginStoryboard.Storyboard>
                        </BeginStoryboard>
                    </DataTrigger.EnterActions>
                </DataTrigger>
                <DataTrigger Binding="{Binding AreAllChallengesComplete}"
                             Value="{StaticResource A_Boolean_True}">
                    <DataTrigger.EnterActions>
                        <local:StartAudioTrigger local:TriggerAnimation.KeyTime="0:0:0.0"
                                                 EventName="/Master/UI/Map/HZ2_SFX_HUD_Map_FestivalUnlock_01"/>
                    </DataTrigger.EnterActions>
                </DataTrigger>
            </Style.Triggers>
        </Style>

        <Style x:Key="A_Style_FZTextBlock_PhotoAnalysisCarList"
               TargetType="{x:Type local:FZTextBlock}"
               BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}">
            <Setter Property="CapHeight"
                    Value="19" />
            <Setter Property="HorizontalAlignment"
                    Value="Left" />
            <Setter Property="VerticalAlignment"
                    Value="Center" />
            <Setter Property="Color"
                    Value="{StaticResource A_Color_SubHeader_Text}" />
        </Style>

        <Style x:Key="A_Style_ListBox_List_PhotoAnalysisCarList"
               TargetType="{x:Type local:CommonListBox}"
               BasedOn="{StaticResource A_Style_ListBox_List_Default}">
            <Setter Property="KeyboardNavigation.DirectionalNavigation"
                    Value="None" />
        </Style>

        <ControlTemplate x:Key="A_ControlTemplate_ListBox_BonusItemList" TargetType="{x:Type ListBox}">
            <WrapPanel IsItemsHost="True"
                       Orientation="Horizontal" />
        </ControlTemplate>

        <Style x:Key="A_Style_ListBox_PhotoAnalysisBonusList"
               TargetType="{x:Type local:CommonListBox}"
               BasedOn="{StaticResource A_Style_ListBox_List_Default}">
            <Setter Property="KeyboardNavigation.DirectionalNavigation"
                    Value="None" />
            <Setter Property="Template"
                    Value="{StaticResource A_ControlTemplate_ListBox_BonusItemList}" />
        </Style>

        <ControlTemplate x:Key="A_ControlTemplate_ListBox_ObjectiveList" TargetType="{x:Type ListBox}">
            <StackPanel IsItemsHost="True" VerticalAlignment="Top"
                       Orientation="Vertical" />
        </ControlTemplate>

        <Style x:Key="A_Style_ListBox_PhotoChallengeObjectiveList"
               TargetType="{x:Type local:CommonListBox}"
               BasedOn="{StaticResource A_Style_ListBox_List_Default}">
            <Setter Property="KeyboardNavigation.DirectionalNavigation"
                    Value="None" />
            <Setter Property="Height" 
                    Value="Auto"/>
            <Setter Property="Template"
                    Value="{StaticResource A_ControlTemplate_ListBox_ObjectiveList}" />
        </Style>

        <DataTemplate x:Key="A_DataTemplate_PhotoAnalysisCarList_Item">
            <Grid x:Name="CarItemGrid">
                <Grid.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform />
                        <SkewTransform />
                        <RotateTransform />
                        <TranslateTransform />
                    </TransformGroup>
                </Grid.RenderTransform>

                <local:EventFire x:Name="EventFire" />
                <local:AudioEvent x:Name="ItemAppearAudioEvent" />

                <local:FZTextBlock x:Name="CarNameNormal"
                                   Text="{Binding Name}"
                                   Style="{StaticResource A_Style_FZTextBlock_PhotoAnalysisCarList}" />
            </Grid>
            <DataTemplate.Triggers>
                <DataTrigger Binding="{Binding IsAnimating}"
                             Value="True">
                    <DataTrigger.EnterActions>
                        <BeginStoryboard>
                            <BeginStoryboard.Storyboard>
                                <Storyboard>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"
                                                                   Storyboard.TargetName="CarItemGrid">
                                        <EasingDoubleKeyFrame KeyTime="0"
                                                              Value="-50" />
                                        <EasingDoubleKeyFrame KeyTime="0:0:0.375"
                                                              Value="0">
                                            <EasingDoubleKeyFrame.EasingFunction>
                                                <CubicEase EasingMode="EaseIn" />
                                            </EasingDoubleKeyFrame.EasingFunction>
                                        </EasingDoubleKeyFrame>
                                    </DoubleAnimationUsingKeyFrames>
                                    <StringAnimationUsingKeyFrames Storyboard.TargetProperty="(local:EventFire.EventName)"
                                                                   Storyboard.TargetName="EventFire">
                                        <DiscreteStringKeyFrame KeyTime="0:0:0.375"
                                                                Value="ItemAdded" />
                                    </StringAnimationUsingKeyFrames>
                                    <BooleanAnimationUsingKeyFrames Storyboard.TargetProperty="DataContext.IsAnimating">
                                        <DiscreteBooleanKeyFrame KeyTime="0:0:0.4"
                                                                 Value="False" />
                                    </BooleanAnimationUsingKeyFrames>
                                    <StringAnimationUsingKeyFrames Storyboard.TargetName="ItemAppearAudioEvent"
                                                                   Storyboard.TargetProperty="(local:AudioEvent.SoundName)">
                                        <DiscreteStringKeyFrame KeyTime="0:0:0.0"
                                                                Value="" />
                                        <DiscreteStringKeyFrame KeyTime="0:0:0.4"
                                                                Value="/Master/UI/Promo/HZ2_SFX_HUD_Promo_InfoScreenItemAppear_01" />
                                    </StringAnimationUsingKeyFrames>
                                </Storyboard>
                            </BeginStoryboard.Storyboard>
                        </BeginStoryboard>
                    </DataTrigger.EnterActions>
                </DataTrigger>
            </DataTemplate.Triggers>
        </DataTemplate>

        <Style x:Key="A_Style_FZTextBlock_PhotoAnalysisLevelItem"
               TargetType="{x:Type local:FZTextBlock}"
               BasedOn="{StaticResource A_Style_FZTextBlock_HorizonB}">
            <Setter Property="CapHeight"
                    Value="30" />
            <Setter Property="HorizontalAlignment"
                    Value="Left" />
            <Setter Property="VerticalAlignment"
                    Value="Center" />
            <Setter Property="Color"
                    Value="{StaticResource A_Color_SubHeader_Text}" />
        </Style>

        <Style x:Key="A_Style_FZTextBlock_PhotoAnalysisProgressHeader"
               TargetType="{x:Type local:FZTextBlock}"
               BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}">
            <Setter Property="CapHeight"
                    Value="30" />
            <Setter Property="HorizontalAlignment"
                    Value="Left" />
            <Setter Property="VerticalAlignment"
                    Value="Center" />
            <Setter Property="Color"
                    Value="{StaticResource A_Color_SubHeader_Text}" />
        </Style>

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

        <Style x:Key="A_Style_ListBoxItem_PhotoAnalysisLevelListItem"
               TargetType="{x:Type ListBoxItem}">
            <Setter Property="FocusVisualStyle"
                    Value="{x:Null}" />
            <Setter Property="Focusable"
                    Value="False" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ListBoxItem}">
                        <ContentPresenter />
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <local:UIStoryboard x:Key="A_Storyboard_BonusItemChanged">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="{x:Null}"
                                           FillBehavior="HoldEnd"
                                           Storyboard.TargetProperty="(local:BlendValue.Blend)">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                        Value="0" />
                <DiscreteDoubleKeyFrame KeyTime="0:0:2.0"
                                        Value="0" />
                <EasingDoubleKeyFrame KeyTime="0:0:3.0"
                                      Value="1">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <CubicEase EasingMode="EaseInOut" />
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
            <StringAnimationUsingKeyFrames Storyboard.TargetName="EventFire"
                                           Storyboard.TargetProperty="(local:EventFire.EventName)">
                <DiscreteStringKeyFrame KeyTime="0:0:0.5"
                                        Value="" />
                <DiscreteStringKeyFrame KeyTime="0:0:3.0"
                                        Value="LevelAnimationComplete" />
                <DiscreteStringKeyFrame KeyTime="0:0:3.5"
                                        Value="" />
            </StringAnimationUsingKeyFrames>
            <StringAnimationUsingKeyFrames Storyboard.TargetName="LevelItemChangeover"
                                           Storyboard.TargetProperty="(local:AudioEvent.SoundName)">
                <DiscreteStringKeyFrame KeyTime="0:0:0.0"
                                        Value="" />
                <DiscreteStringKeyFrame KeyTime="0:0:1.0"
                                        Value="AudioUITrigger_PauseImageRoll" />
                <DiscreteStringKeyFrame KeyTime="0:0:2.0"
                                        Value="" />
            </StringAnimationUsingKeyFrames>
        </local:UIStoryboard>

        <System:Double x:Key="A_Double_LevelListItemWidth">700</System:Double>
        <System:Double x:Key="A_Double_LevelListItemWidthAnimationOffset">-700</System:Double>

        <local:LinearTransformConverter x:Key="A_Converter_LevelIndexToOffset" Scale="{StaticResource A_Double_LevelListItemWidthAnimationOffset}" />

        <DataTemplate x:Key="A_DataTemplate_PhotoAnalysisLevelListItem">
            <StackPanel Width="{StaticResource A_Double_LevelListItemWidth}"
                        local:MultiDataConversion.TargetType="{x:Type Int32}"
                        local:MultiDataConversion.Value="{Binding ProgressCurrentNum}"
                        local:MultiDataConversion.Parameter="{Binding ProgressOutOf}"
                        local:MultiDataConversion.Converter="{StaticResource A_CompareConverter}"
                        x:Name="Container">
                <Grid Height="32"
                      MaxWidth="468"
                      HorizontalAlignment="Left">
                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_PhotoAnalysisLevelItem}"
                                       Text="{Binding ProgressToUnlockMessage}"
                                       local:TextBlockInlineMarkup.Markup="{Binding ProgressToUnlockMessage}"
                                       local:TextBlockInlineMarkup.ResourceBaseName="A_Style_FZRun_Markup_LevelProgress_"
                                       VerticalAlignment="Center" />
                </Grid>
                <Decorator Height="24" />
                <ItemsControl ItemsSource="{Binding Rewards}"
                              ItemTemplate="{StaticResource A_DataTemplate_SmallReward}"
                              Focusable="False"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Left" />
                <Decorator Height="28" />
                <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_PhotoAnalysisProgressHeader}"
                                   Text="{local:Loc PhotoCollection.IDS_NextCaptureBonus_Progress}" />
                <Decorator Height="14" />
                <StackPanel Orientation="Horizontal"
                            x:Name="ProgressContainer">
                    <Grid>
                        <local:FZMaterial x:Name="ProgressCurrentNumFlash"
                                          ImageSource="/ForzaUI;component/Textures/Data_Bound/Promo/Promo_Results/Flash_Texture.png"
                                          Margin="-40,-60"
                                          Opacity="0"
                                          Preset="{StaticResource A_FZMaterialPresetAdditive}"
                                          RenderTransformOrigin="0.5,0.5">
                            <local:FZMaterial.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform />
                                    <SkewTransform />
                                    <RotateTransform />
                                    <TranslateTransform />
                                </TransformGroup>
                            </local:FZMaterial.RenderTransform>
                        </local:FZMaterial>
                        <local:FZTextBlock x:Name="ProgressCurrentNum"
                                           Style="{StaticResource A_Style_FZTextBlock_CarsCollected_FirstNum}"
                                           Text="{Binding TotalCarsCaptured, RelativeSource={RelativeSource AncestorType=Page}}"
                                           RenderTransformOrigin="0.5,0.5"
                                           Panel.ZIndex="1">
                            <local:FZTextBlock.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform />
                                    <SkewTransform />
                                    <RotateTransform />
                                    <TranslateTransform />
                                </TransformGroup>
                            </local:FZTextBlock.RenderTransform>
                        </local:FZTextBlock>
                    </Grid>
                    <local:FZTextBlock x:Name="OutOfSlash"
                                       Style="{StaticResource A_Style_FZTextBlock_CarsCollected}"
                                       Text="{local:Loc PhotoCollection.IDS_OutOf_Unformatted}" />
                    <local:FZTextBlock x:Name="ProgressOutOf"
                                       Style="{StaticResource A_Style_FZTextBlock_CarsCollected}"
                                       Text="{Binding TotalCarsAvailable, RelativeSource={RelativeSource AncestorType=Page}}" />
                </StackPanel>
            </StackPanel>
            <DataTemplate.Triggers>
                <DataTrigger Binding="{Binding (local:MultiDataConversion.Output), ElementName=Container}"
                             Value="{x:Static local:CompareResult.Equal}">
                    <DataTrigger.EnterActions>
                        <BeginStoryboard>
                            <BeginStoryboard.Storyboard>
                                <Storyboard>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"
                                                                   Storyboard.TargetName="ProgressCurrentNum">
                                        <EasingDoubleKeyFrame KeyTime="0"
                                                              Value="1" />
                                        <EasingDoubleKeyFrame KeyTime="0:0:0.02"
                                                              Value="1.75">
                                            <EasingDoubleKeyFrame.EasingFunction>
                                                <CubicEase EasingMode="EaseIn" />
                                            </EasingDoubleKeyFrame.EasingFunction>
                                        </EasingDoubleKeyFrame>
                                        <EasingDoubleKeyFrame KeyTime="0:0:0.5"
                                                              Value="1">
                                            <EasingDoubleKeyFrame.EasingFunction>
                                                <CubicEase EasingMode="EaseIn" />
                                            </EasingDoubleKeyFrame.EasingFunction>
                                        </EasingDoubleKeyFrame>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)"
                                                                   Storyboard.TargetName="ProgressCurrentNum">
                                        <EasingDoubleKeyFrame KeyTime="0"
                                                              Value="1" />
                                        <EasingDoubleKeyFrame KeyTime="0:0:0.02"
                                                              Value="1.75">
                                            <EasingDoubleKeyFrame.EasingFunction>
                                                <CubicEase EasingMode="EaseIn" />
                                            </EasingDoubleKeyFrame.EasingFunction>
                                        </EasingDoubleKeyFrame>
                                        <EasingDoubleKeyFrame KeyTime="0:0:0.5"
                                                              Value="1">
                                            <EasingDoubleKeyFrame.EasingFunction>
                                                <CubicEase EasingMode="EaseIn" />
                                            </EasingDoubleKeyFrame.EasingFunction>
                                        </EasingDoubleKeyFrame>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity"
                                                                   Storyboard.TargetName="ProgressCurrentNumFlash">
                                        <EasingDoubleKeyFrame KeyTime="0"
                                                              Value="0" />
                                        <EasingDoubleKeyFrame KeyTime="0:0:0.02"
                                                              Value="1">
                                            <EasingDoubleKeyFrame.EasingFunction>
                                                <CubicEase EasingMode="EaseIn" />
                                            </EasingDoubleKeyFrame.EasingFunction>
                                        </EasingDoubleKeyFrame>
                                        <EasingDoubleKeyFrame KeyTime="0:0:0.5"
                                                              Value="0">
                                            <EasingDoubleKeyFrame.EasingFunction>
                                                <CubicEase EasingMode="EaseIn" />
                                            </EasingDoubleKeyFrame.EasingFunction>
                                        </EasingDoubleKeyFrame>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"
                                                                   Storyboard.TargetName="ProgressCurrentNumFlash">
                                        <EasingDoubleKeyFrame KeyTime="0"
                                                              Value="1" />
                                        <EasingDoubleKeyFrame KeyTime="0:0:0.02"
                                                              Value="1" />
                                        <EasingDoubleKeyFrame KeyTime="0:0:0.5"
                                                              Value="2">
                                            <EasingDoubleKeyFrame.EasingFunction>
                                                <CubicEase EasingMode="EaseIn" />
                                            </EasingDoubleKeyFrame.EasingFunction>
                                        </EasingDoubleKeyFrame>
                                    </DoubleAnimationUsingKeyFrames>
                                </Storyboard>
                            </BeginStoryboard.Storyboard>
                        </BeginStoryboard>
                    </DataTrigger.EnterActions>
                </DataTrigger>
            </DataTemplate.Triggers>
        </DataTemplate>

        <Style x:Key="A_Style_ListBoxItem_PhotoAnalysisCarList"
               TargetType="{x:Type ListBoxItem}">
            <Setter Property="FocusVisualStyle"
                    Value="{x:Null}" />
            <Setter Property="Focusable"
                    Value="False" />

            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ListBoxItem}">
                        <StackPanel ClipToBounds="True">
                            <ContentPresenter Height="52" />
                            <local:FZMaterial Color="{StaticResource A_Color_WhiteLineDivider}"
                                              Style="{StaticResource A_Style_FZMaterial_Panel_HorizontalDivider}"
                                              VerticalAlignment="Bottom"
                                              HorizontalAlignment="Stretch" />
                        </StackPanel>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <local:FZMaterialPresetRoundtangleStroke x:Key="A_FZMaterialPresetRoundtangleStroke_TickBox"
                                                     BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
                                                     CornerRadius="1,1,1,1"
                                                     Thickness="1.5,1.5,1.5,1.5" />
        <local:OffsetKeyTime x:Key="A_KeyTime_ObjectiveStateEnd_Time"
                             KeyTime="0:0:0.5" />

        <Style x:Key="A_Style_FZMaterial_ObjectiveState_Base" TargetType="local:FZMaterial">
            <Setter Property="Opacity" Value="0"/>
            <Setter Property="Width" Value="52"/>
            <Setter Property="Height" Value="52"/>
        </Style>
        <Style x:Key="A_Style_FZMaterial_ObjectiveState_Complete" TargetType="local:FZMaterial" BasedOn="{StaticResource A_Style_FZMaterial_ObjectiveState_Base}">
            <Setter Property="ImageSource" Value="/ForzaUI;component/Textures/Data_Bound/Series24/PhotoAnalysis/Icon_Tick.png"/>
            <Setter Property="Color" Value="#17FF90"/>
            <Style.Triggers>
                <DataTrigger Binding="{Binding DataContext.AreAllChallengesComplete, RelativeSource={RelativeSource FindAncestor, AncestorType=local:CommonListBox}}" Value="{StaticResource A_Boolean_True}">
                    <Setter Property="Color" Value="{StaticResource A_Color_PhotoChallengeGold}"/>
                </DataTrigger>

                <DataTrigger Binding="{Binding ShowAnimation}" Value="{StaticResource A_Boolean_True}">
                    <DataTrigger.EnterActions>
                        <local:StartAudioTrigger local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ObjectiveStateEnd_Time}"
                                                 EventName="AudioUITrigger_PhotoChallenge_Complete"/>
                    </DataTrigger.EnterActions>
                </DataTrigger>
            </Style.Triggers>
        </Style>
        <Style x:Key="A_Style_FZMaterial_ObjectiveState_Failed" TargetType="local:FZMaterial" BasedOn="{StaticResource A_Style_FZMaterial_ObjectiveState_Base}">
            <Setter Property="ImageSource" Value="/ForzaUI;component/Textures/Data_Bound/Series24/PhotoAnalysis/Icon_Cross.png"/>
            <Setter Property="Color" Value="#FF0068"/>
            <Style.Triggers>
                <DataTrigger Binding="{Binding ShowAnimation}" Value="{StaticResource A_Boolean_True}">
                    <DataTrigger.EnterActions>
                        <local:StartAudioTrigger local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ObjectiveStateEnd_Time}"
                                                 EventName="AudioUITrigger_PhotoChallenge_Fail"/>
                    </DataTrigger.EnterActions>
                </DataTrigger>
            </Style.Triggers>
        </Style>

        <local:MappingConverter x:Key="A_MappingConverter_ObjectiveState_To_MaterialStyle" Default="{StaticResource A_Style_FZMaterial_ObjectiveState_Base}">
            <local:MappingConverterEntry Key="{x:Static local:ChallengeObjectiveState.Completed}" Value="{StaticResource A_Style_FZMaterial_ObjectiveState_Complete}"/>
            <local:MappingConverterEntry Key="{x:Static local:ChallengeObjectiveState.Failed}" Value="{StaticResource A_Style_FZMaterial_ObjectiveState_Failed}"/>
        </local:MappingConverter>
        
        <DataTemplate x:Key="A_DataTemplate_PhotoChallengeListItem">
            <DockPanel HorizontalAlignment="Left" VerticalAlignment="Top">
                <Grid DockPanel.Dock="Left">
                    <local:FZMaterial x:Name="TickBox" Height="48" Width="48" VerticalAlignment="Center" HorizontalAlignment="Center"
                                      Preset="{StaticResource A_FZMaterialPresetRoundtangleStroke_TickBox}" Color="{StaticResource A_Color_White}" Opacity="0.5"/>
                    <local:FZMaterial x:Name="ObjectiveState" Style="{Binding ObjectiveState, Converter={StaticResource A_MappingConverter_ObjectiveState_To_MaterialStyle}}" 
                                      RenderTransformOrigin="0.5,0.5" Margin="8,0,0,8">
                        <local:FZMaterial.RenderTransform>
                            <TransformGroup>
                                <ScaleTransform />
                                <SkewTransform />
                                <RotateTransform />
                                <TranslateTransform />
                            </TransformGroup>
                        </local:FZMaterial.RenderTransform>
                    </local:FZMaterial>
                </Grid>
                <local:FZTextBlock x:Name="Description" Text="{Binding ObjectiveText}" HorizontalAlignment="Left"
                                   CapHeight="28"  Color="{StaticResource A_Color_White}" Opacity="0.5" FontFamily="Horizon_B" Margin="16,0,0,0" VerticalAlignment="Center"/>
            </DockPanel>
            <DataTemplate.Triggers>
                <DataTrigger Binding="{Binding ShowAnimation}"
                             Value="{StaticResource A_Boolean_True}">
                    <DataTrigger.EnterActions>
                        <BeginStoryboard>
                            <BeginStoryboard.Storyboard>
                                <Storyboard Storyboard.TargetName="ObjectiveState">
                                    <!-- Other elements like box and text animation -->
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="TickBox">
                                        <LinearDoubleKeyFrame KeyTime="0"
                                                              Value="0.5" />
                                        <LinearDoubleKeyFrame KeyTime="0:0:0.25"
                                                              Value="1" />
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Description">
                                        <LinearDoubleKeyFrame KeyTime="0"
                                                              Value="0.5" />
                                        <LinearDoubleKeyFrame KeyTime="0:0:0.25"
                                                              Value="1" />
                                    </DoubleAnimationUsingKeyFrames>

                                    <!-- Tick animation -->
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity">
                                        <LinearDoubleKeyFrame KeyTime="0"
                                                              Value="0" />
                                        <LinearDoubleKeyFrame KeyTime="0:0:0.25"
                                                              Value="1" />
                                    </DoubleAnimationUsingKeyFrames>
                                    <StaticResourceExtension ResourceKey="A_AnimationUsingKeyFrames_Stamp_XScale"/>
                                    <StaticResourceExtension ResourceKey="A_AnimationUsingKeyFrames_Stamp_YScale"/>
                                </Storyboard>
                            </BeginStoryboard.Storyboard>
                        </BeginStoryboard>
                    </DataTrigger.EnterActions>
                </DataTrigger>
            </DataTemplate.Triggers>
        </DataTemplate>

        <Style x:Key="A_Style_ListBoxItem_PhotoChallengeList"
               TargetType="{x:Type ListBoxItem}">
            <Setter Property="FocusVisualStyle"
                    Value="{x:Null}" />
            <Setter Property="Focusable"
                    Value="False" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ListBoxItem}">
                        <ContentPresenter Height="72" VerticalAlignment="Top"/>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Storyboard x:Key="A_Storyboard_ProcessingFade">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity"
                                           Storyboard.TargetName="BackgroundFader">
                <EasingDoubleKeyFrame KeyTime="0:0:0.0"
                                      Value="1.0" />
                <EasingDoubleKeyFrame KeyTime="0:0:0.75"
                                      Value="1.0">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <CubicEase EasingMode="EaseIn" />
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
                <EasingDoubleKeyFrame KeyTime="0:0:5.0"
                                      Value="0.7">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <CubicEase EasingMode="EaseIn" />
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>

        <Storyboard x:Key="A_Storyboard_ProcessingComplete">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity"
                                           Storyboard.TargetName="ProcessingPhotoText">
                <EasingDoubleKeyFrame KeyTime="0:0:0.0"
                                      Value="1.0" />
                <EasingDoubleKeyFrame KeyTime="0:0:0.15"
                                      Value="0.0">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <CubicEase EasingMode="EaseIn" />
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity"
                                           Storyboard.TargetName="ButtonBarAnimHelper">
                <EasingDoubleKeyFrame KeyTime="0:0:0.0"
                                      Value="0.0" />
                <EasingDoubleKeyFrame KeyTime="0:0:0.15"
                                      Value="0.0" />
                <EasingDoubleKeyFrame KeyTime="0:0:0.3"
                                      Value="1.0">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <CubicEase EasingMode="EaseIn" />
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>

        <Style x:Key="A_Style_FZTextBlock_ItemListTitle"
               TargetType="local:FZTextBlock">
            <Setter Property="FontFamily"
                    Value="Horizon_A" />
            <Setter Property="Color"
                    Value="{StaticResource A_Color_SubHeader_Text}" />
            <Setter Property="CapHeight"
                    Value="30" />
        </Style>

        <Style x:Key="A_Style_ControllerButtonControl_ScrollInputBase" TargetType="local:ControllerButtonControl" BasedOn="{StaticResource A_Style_ControllerButtonControl_Default}">
            <Setter Property="InputOverride" Value="{local:Input Command=INPUTCMD_UI_LEFT_Y_AXIS, Context=INPUTCONTEXT_UI}"/>
            <Setter Property="Visibility" Value="{Binding ScrollEnabled, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"/>
            <Setter Property="Description" Value="{local:Loc HelpButtons.IDS_Scroll}"/>
        </Style>

        <Style x:Key="A_Style_ControllerButtonControl_ScrollInput_Low" TargetType="local:ControllerButtonControl"  BasedOn="{StaticResource A_Style_ControllerButtonControl_ScrollInputBase}">
            <Style.Triggers>
                <DataTrigger Binding="{Binding IsControllerActiveInput}" Value="False">
                    <Setter Property="Description" Value="{local:Loc HelpButtons.IDS_Scroll_Down}"/>
                </DataTrigger>
            </Style.Triggers>
        </Style>
        
        <Style x:Key="A_Style_ControllerButtonControl_ScrollInput_High" TargetType="local:ControllerButtonControl" BasedOn="{StaticResource A_Style_ControllerButtonControl_ScrollInputBase}">
            <Setter Property="UseHighKeyIfLinearCommand" Value="true"/>
            <Setter Property="Visibility" Value="Collapsed"/>
            <Style.Triggers>
                <DataTrigger Binding="{Binding IsControllerActiveInput}" Value="False">
                    <Setter Property="Description" Value="{local:Loc HelpButtons.IDS_Scroll_Up}"/>
                    <Setter Property="Visibility" Value="{Binding ScrollEnabled, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"/>
                </DataTrigger>
            </Style.Triggers>
        </Style>

        <Style x:Key="A_Style_FZTextBlock_PhotoChallenges_RewardTitle"
               TargetType="{x:Type local:FZTextBlock}"
               BasedOn="{StaticResource A_Style_FZTextBlock_HorizonB}">
            <Setter Property="CapHeight"
                    Value="30" />
            <Setter Property="HorizontalAlignment"
                    Value="Left" />
            <Setter Property="VerticalAlignment"
                    Value="Center" />
            <Setter Property="Color"
                    Value="{StaticResource A_Color_SubHeader_Text}"/>
            <Setter Property="Text" Value="{local:Loc PhotoCollection.IDS_PhotoChallengeRewardInstruction}"/>
            <Style.Triggers>
                <DataTrigger Binding="{Binding HorizonPhotoChallenge.AreAllChallengesComplete}" Value="{StaticResource A_Boolean_True}">
                    <Setter Property="Text" Value="{local:Loc PhotoCollection.IDS_RewardUnlocked}"/>
                </DataTrigger>
            </Style.Triggers>
        </Style>

        <Style x:Key="A_Style_FZTextBlock_ChallengeTitle" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_ItemListTitle}">
            <Setter Property="Color" Value="{StaticResource A_Color_White}"/>
            <Setter Property="MinHeight" Value="30"/>
            <Setter Property="local:MultiStringFormatter.Param0" Value="{Binding Title}"/>
            <Setter Property="local:MultiStringFormatter.Format" Value="{local:Loc PhotoCollection.IDS_PhotoChallengeActiveFormat}"/>
            <Setter Property="Text" Value="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}}"/>
            <Style.Triggers>
                <DataTrigger Binding="{Binding AreAllChallengesComplete}" Value="{StaticResource A_Boolean_True}">
                    <Setter Property="Color" Value="{StaticResource A_Color_PhotoChallengeGold}"/>
                    <Setter Property="Text" Value="{local:Loc PhotoCollection.IDS_PhotoChallengeComplete}"/>
                </DataTrigger>
            </Style.Triggers>
        </Style>
    </Page.Resources>

    <Grid x:Name="LayoutRoot"
          Opacity="1">

        <local:FZMaterial x:Name="BackgroundFader"
                          Opacity="0.8"
                          Color="{StaticResource A_Color_Background}" />

        <local:FZMaterialGlassCapture />

        <Grid Style="{StaticResource A_Style_FrameworkElement_LayoutRoot}">
            <Grid Margin="{StaticResource A_Thickness_ScenePadding}">
                <DockPanel HorizontalAlignment="Stretch">
                    <StackPanel HorizontalAlignment="Left" DockPanel.Dock="Left"
                            Margin="16,0,0,0">
                    <StackPanel Visibility="{Binding IsPromoEnabled, Converter={StaticResource A_FZBooleanToVisibilityConverter_UseHidden}}">
                        <Decorator Height="20" />

                        <ContentControl x:Name="ContentControl_SceneTitle"
                                        Content="{local:Loc ScreenTitles.IDS_PhotoAnalysis}"
                                        Style="{StaticResource A_Style_ContentControl_ScreenTitleBlock}"
                                        local:BindingProxy.A="/ForzaUI;component/Textures/Anthem/Icons/Titles/Photo.png"
                                        VerticalAlignment="Top"
                                        HorizontalAlignment="Left" />

                        <Decorator Height="45" />

                        <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_ItemListTitle}"
                                           Text="{local:Loc PhotoCollection.IDS_CarsPhotographedTitle}" />

                        <Decorator Height="24" />

                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_Panel_HorizontalDivider}"
                                          Color="{StaticResource A_Color_WhiteLineDivider}"
                                          VerticalAlignment="Bottom"
                                          HorizontalAlignment="Stretch"
                                          Width="675" />

                        <Canvas Height="325" Width="675" ClipToBounds="True">
                            <local:CommonListBox x:Name="PART_PhotoAnalysisCarList"
                                                 Style="{StaticResource A_Style_ListBox_List_PhotoAnalysisCarList}"
                                                 ItemTemplate="{StaticResource A_DataTemplate_PhotoAnalysisCarList_Item}"
                                                 ItemContainerStyle="{StaticResource A_Style_ListBoxItem_PhotoAnalysisCarList}"
                                                 ItemsSource="{Binding CarItemsCollection}"
                                                 Canvas.Top="{Binding ItemsListTop, RelativeSource={RelativeSource AncestorType=Page}}"
                                                 Height="Auto"
                                                 Width="{Binding ActualWidth, RelativeSource={RelativeSource FindAncestor, AncestorType=Canvas}}">
                            </local:CommonListBox>
                        </Canvas>

                        <Decorator Height="50" />

                        <Grid>
                            <Canvas Height="325"
                                    Width="{StaticResource A_Double_LevelListItemWidth}"
                                    ClipToBounds="True"
                                    HorizontalAlignment="Left"
                                    Margin="-100,0,0,0">
                                <local:CommonListBox x:Name="PART_PhotoAnalysisBonusList"
                                                     Style="{StaticResource A_Style_ListBox_PhotoAnalysisBonusList}"
                                                     ItemTemplate="{StaticResource A_DataTemplate_PhotoAnalysisLevelListItem}"
                                                     ItemContainerStyle="{StaticResource A_Style_ListBoxItem_PhotoAnalysisLevelListItem}"
                                                     ItemsSource="{Binding LevelItems}"
                                                     SelectedIndex="{Binding CurrentLevelItemIndex}"
                                                     local:BlendValue.InputChangedStoryboard="{StaticResource A_Storyboard_BonusItemChanged}"
                                                     local:BlendValue.Input="{Binding CurrentLevelItemIndex, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_LevelIndexToOffset}}"
                                                     local:BlendValue.BlendFromPreviousOutput="True"
                                                     local:BlendValue.ShouldSkipInitialInputChange="True"
                                                     Canvas.Left="{Binding (local:BlendValue.Output), RelativeSource={RelativeSource Self}}"
                                                     MaxHeight="{Binding ActualHeight, RelativeSource={RelativeSource AncestorType=Canvas}}"
                                                     Margin="100,0,0,0"/>
                            </Canvas>
                            <Grid HorizontalAlignment="Left"
                                  Width="{StaticResource A_Double_LevelListItemWidth}">
                                <local:FZMaterial x:Name="PromoStamp" 
                                                  Style="{StaticResource A_Style_FZMaterial_PromoStamp}"
                                                  DataContext="{Binding SelectedItem, ElementName=PART_PhotoAnalysisBonusList}"
                                                  RenderTransformOrigin="0.5,0.5">
                                    <local:FZMaterial.RenderTransform>
                                        <TransformGroup>
                                            <ScaleTransform />
                                            <SkewTransform />
                                            <RotateTransform />
                                            <TranslateTransform />
                                        </TransformGroup>
                                    </local:FZMaterial.RenderTransform>
                                </local:FZMaterial>
                            </Grid>
                        </Grid>

                        <Decorator Height="12" />
                    </StackPanel>

                    <StackPanel x:Name="ProcessingPhotoText"
                                Orientation="Horizontal"
                                Opacity="1"
                                Margin="-12,0,0,0">
                        <ProgressBar IsIndeterminate="True"
                                     Style="{StaticResource A_Style_ProgressBar_WaitSpinner}"
                                     Height="30" />
                        <Decorator Width="10" />
                        <local:FZTextBlock Text="{local:Loc PhotoCollection.IDS_ProcessingPhoto}"
                                           Style="{StaticResource A_Style_FZTextBlock_Heading_Small}"
                                           Color="{StaticResource A_Color_Header_Text}"
                                           CapHeight="30" />
                    </StackPanel>
                </StackPanel>
                <Decorator Width="196" DockPanel.Dock="Left"/>
                    <Decorator HorizontalAlignment="Right"
                               Margin="0,143,12,0">
                        <Decorator MinWidth="850" HorizontalAlignment="Left" Visibility="{Binding HorizonPhotoChallenge, Converter={StaticResource A_FZBooleanToVisibilityConverter}}">
                            <StackPanel>
                                <DockPanel MinHeight="380">
                                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_Panel_VerticalDivider}"
                                          Color="{StaticResource A_Color_WhiteLineDivider}"
                                          VerticalAlignment="Stretch"
                                          HorizontalAlignment="Stretch"
                                          DockPanel.Dock="Left"/>

                                    <Decorator Margin="30,0,0,0" VerticalAlignment="Top">
                                        <StackPanel DataContext="{Binding HorizonPhotoChallenge}" HorizontalAlignment="Left" VerticalAlignment="Top">
                                            <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_ChallengeTitle}"/>
                                            <Decorator Height="30"/>
                                            <local:CommonListBox x:Name="PART_PhotoAnalysisObjectiveList"
                                                     Style="{StaticResource A_Style_ListBox_PhotoChallengeObjectiveList}"
                                                     ItemTemplate="{StaticResource A_DataTemplate_PhotoChallengeListItem}"
                                                     ItemContainerStyle="{StaticResource A_Style_ListBoxItem_PhotoChallengeList}"
                                                     ItemsSource="{Binding ObjectiveItems}"
                                                     HorizontalAlignment="Left" VerticalAlignment="Top"
                                                     ScrollViewer.HorizontalScrollBarVisibility="Disabled"/>
                                        </StackPanel>
                                    </Decorator>
                                </DockPanel>

                                <StackPanel Orientation="Horizontal">
                                    <StackPanel x:Name="PhotoChallengeRewardItem" HorizontalAlignment="Left" Margin="32,52.5,0,0">
                                        <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_PhotoChallenges_RewardTitle}"/>
                                        <Decorator Height="25"/>
                                        <ItemsControl ItemsSource="{Binding HorizonPhotoChallenge.PhotoChallengeRewards}"
                                                  ItemTemplate="{StaticResource A_DataTemplate_SmallReward}"
                                                  Focusable="False"
                                                  VerticalAlignment="Center"
                                                  HorizontalAlignment="Left" />
                                    </StackPanel>

                                    <Grid DockPanel.Dock="Right" Margin="80,-10,0,0" DataContext="{Binding HorizonPhotoChallenge}">
                                        <local:FZMaterial x:Name="PhotoChallengeStamp"
                                              Style="{StaticResource A_Style_FZMaterial_PhotoChallengeStamp}">
                                            <local:FZMaterial.RenderTransform>
                                                <TransformGroup>
                                                    <ScaleTransform />
                                                    <SkewTransform />
                                                    <RotateTransform />
                                                    <TranslateTransform />
                                                </TransformGroup>
                                            </local:FZMaterial.RenderTransform>
                                        </local:FZMaterial>
                                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_PhotoChallengeStamp}"
                                                  ImageSource="/ForzaUI;component/Textures/Data_Bound/Series24/PhotoAnalysis/PhotoChallenge_Stampglow.png"
                                                  Preset="{StaticResource A_FZMaterialPresetAdditive}"
                                                  RenderTransformOrigin="0.5,0.5">
                                            <local:FZMaterial.RenderTransform>
                                                <TransformGroup>
                                                    <ScaleTransform />
                                                    <SkewTransform />
                                                    <RotateTransform />
                                                    <TranslateTransform />
                                                </TransformGroup>
                                            </local:FZMaterial.RenderTransform>
                                        </local:FZMaterial>
                                    </Grid>
                                </StackPanel>
                            </StackPanel>
                        </Decorator>
                    </Decorator>
                </DockPanel>
            </Grid>
        </Grid>
        <local:EventFire x:Name="EventFire" />
        <local:AudioEvent x:Name="LevelItemChangeover" />

        <Decorator x:Name="ButtonBarAnimHelper"
                   Opacity="0">
            <ContentControl x:Name="BottomBar"
                            Style="{StaticResource A_Style_ButtonBar}">
                <ControllerButtonPanel x:Name="HelpPanel"
                                       Style="{StaticResource A_Style_ControllerButtonPanel_Default}" >
                    <local:ControllerButtonControl Button="A"  Description="{local:Loc HelpButtons.IDS_Continue}"/>
                    <local:ControllerButtonControl Button="B" />
                    <local:ControllerButtonControl Button="X" Style="{StaticResource A_Style_ControllerButtonControl_ScrollInput_High}"/>
                    <local:ControllerButtonControl Button="Y" Style="{StaticResource A_Style_ControllerButtonControl_ScrollInput_Low}"/>
                </ControllerButtonPanel>
            </ContentControl>
        </Decorator>
    </Grid>
</Page>
