<Page xmlns:local="clr-namespace:ForzaUI"
      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"
      xmlns:System="clr-namespace:System;assembly=mscorlib"
      x:Class="ForzaUI.A_BucketListBlueprintCarousel"
      mc:Ignorable="d"
      Style="{StaticResource A_Style_Page_Generic}"
      DataContext="{Binding RelativeSource={RelativeSource Self}}"
      Margin="0">

    <Page.Resources>
        <ResourceDictionary>

            <!-- BucketList info Style -->
            <ControlTemplate x:Key="A_ControlTemplate_ContentControl_ItemTile_Bucketlist" TargetType="ContentControl">
                <ControlTemplate.Resources>
                    <Storyboard x:Key="SelectItemStory">
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"
                                                           Storyboard.TargetName="ScaledContainer">
                            <EasingDoubleKeyFrame KeyTime="0:0:0.3"
                                                      Value="1.06" />
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)"
                                                           Storyboard.TargetName="ScaledContainer">
                            <EasingDoubleKeyFrame KeyTime="0:0:0.3"
                                                      Value="1.06" />
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                           Storyboard.TargetName="DropShadow">
                            <EasingDoubleKeyFrame KeyTime="0:0:0"
                                                      Value="0" />
                            <EasingDoubleKeyFrame KeyTime="0:0:0.3"
                                                      Value="0.6" />
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"
                                                           Storyboard.TargetName="DropShadow">
                            <EasingDoubleKeyFrame KeyTime="0:0:0"
                                                      Value="0.75" />
                            <EasingDoubleKeyFrame KeyTime="0:0:0.3"
                                                      Value="1.06" />
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)"
                                                           Storyboard.TargetName="DropShadow">
                            <EasingDoubleKeyFrame KeyTime="0:0:0"
                                                      Value="0.75" />
                            <EasingDoubleKeyFrame KeyTime="0:0:0.3"
                                                      Value="1.06" />
                        </DoubleAnimationUsingKeyFrames>
                        <Int32AnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.ZIndex)"
                                                      Storyboard.Target="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem}}">
                            <EasingInt32KeyFrame KeyTime="0:0:0.3"
                                                     Value="20" />
                        </Int32AnimationUsingKeyFrames>
                    </Storyboard>
                    <Storyboard x:Key="DeselectItemStory">
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"
                                                           Storyboard.TargetName="ScaledContainer">
                            <EasingDoubleKeyFrame KeyTime="0:0:0.3"
                                                      Value="1.0" />
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)"
                                                           Storyboard.TargetName="ScaledContainer">
                            <EasingDoubleKeyFrame KeyTime="0:0:0.3"
                                                      Value="1.0" />
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                           Storyboard.TargetName="DropShadow">
                            <EasingDoubleKeyFrame KeyTime="0:0:0.3"
                                                      Value="0" />
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"
                                                           Storyboard.TargetName="DropShadow">
                            <EasingDoubleKeyFrame KeyTime="0:0:0.3"
                                                      Value="0.75" />
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)"
                                                           Storyboard.TargetName="DropShadow">
                            <EasingDoubleKeyFrame KeyTime="0:0:0.3"
                                                      Value="0.75" />
                        </DoubleAnimationUsingKeyFrames>
                        <Int32AnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.ZIndex)"
                                                          Storyboard.Target="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem}}">
                            <EasingInt32KeyFrame KeyTime="0:0:0.3"
                                                     Value="0" />
                        </Int32AnimationUsingKeyFrames>
                    </Storyboard>

                    <Style x:Key="A_Style_FZMaterial_MouseRollOverVisual_Dynamic"
                           BasedOn="{StaticResource A_Style_FZMaterial_MouseRollOverVisual_Default}"
                           TargetType="local:FZMaterial">
                        <Setter Property="Preset">
                            <Setter.Value>
                                <local:FZMaterialPresetRoundtangleStroke BasedOn="{StaticResource A_FZMaterialPresetRoundtangleStroke_Rollover}"
                                                                         CornerRadius="{StaticResource A_CornerRadius_FlyerOuterBorder}"
                                                                         Thickness="8" />
                            </Setter.Value>
                        </Setter>
                    </Style>

                  <Style x:Key="A_Style_Control_BucketListFlyer_Internal_BorderedWithSelectionHighlight"
                           BasedOn="{StaticResource A_Style_Control_CampaignFlyer_Internal_BorderedWithSelectionHighlight}"
                           TargetType="Control">
                        <Style.Resources>                            
                            <local:MappingConverter x:Key="A_Converter_InitialFlyerRotationFromScene" Default="{StaticResource A_Double_FlyerRotation_FrontFaceShowing}">
                                <local:MappingConverterEntry Key="{x:Static local:SceneEntryEnum.BucketListBrowser}" Value="{StaticResource A_Double_FlyerRotation_FrontFaceShowing}" />
                                <local:MappingConverterEntry Key="{x:Static local:SceneEntryEnum.BucketListSuper7}" Value="{StaticResource A_Double_FlyerRotation_BackFaceShowing}" />
                                <local:MappingConverterEntry Key="{x:Static local:SceneEntryEnum.BucketListSuper7HighStakes}" Value="{StaticResource A_Double_FlyerRotation_BackFaceShowing}" />
                            </local:MappingConverter>

                        </Style.Resources>
                        <Setter Property="FontSize" Value="{Binding SceneEnum, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_InitialFlyerRotationFromScene}}"/>
                  </Style>

                </ControlTemplate.Resources>
                <Grid Margin="-6,-6,0,0">
                    <Decorator RenderTransformOrigin="0.5,0.5">
                        <Decorator.RenderTransform>
                            <TransformGroup>
                                <ScaleTransform ScaleX="{Binding FontSize, ElementName=Flyer, Converter={StaticResource A_LinearTransformConverter_FlyerFlippingShadow}}" />
                            </TransformGroup>
                        </Decorator.RenderTransform>
                        <local:FZMaterial x:Name="DropShadow"
                                      Style="{StaticResource A_Style_FZMaterial_ShadowBase_ForSubgraph}"
                                      Margin="-12"
                                      RenderTransformOrigin="0.5,0.5"
                                      IsHitTestVisible="False">
                            <local:FZMaterial.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform ScaleX="0.75" ScaleY="0.75" />
                                    <TranslateTransform />
                                </TransformGroup>
                            </local:FZMaterial.RenderTransform>
                        </local:FZMaterial>
                    </Decorator>
                    <Decorator x:Name="ScaledContainer"
                          Width="{StaticResource A_Double_BucketList_TileItem_Width}"
                          Height="{StaticResource A_Double_BucketList_TileItem_Height}"
                          RenderTransformOrigin="0.5,0.5">
                        <Decorator.RenderTransform>
                            <TransformGroup>
                                <ScaleTransform ScaleX="1" ScaleY="1" />
                                <TranslateTransform />
                            </TransformGroup>
                        </Decorator.RenderTransform>
                        <Viewbox Width="484" Stretch="Fill"
                                 Height="703">
                            <Grid>
                                <local:AudioEvent x:Name="Audio" />
                                <local:RoutedEventCommand x:Name="ClickOnMouseItem"
                                                          RoutedEvent="UIElement.MouseLeftButtonDown"/>
                                <Control Name="Flyer" Style="{StaticResource A_Style_Control_BucketListFlyer_Internal_BorderedWithSelectionHighlight}"
                                         Template="{StaticResource A_ControlTemplate_Control_BucketListFlyer_Internal}"
                                         DataContext="{Binding SetupItem}" />
                                <local:FZMaterial Color="#00000000"
                                                  x:Name="HitTestHelper"
                                                  local:RoutedEventCommand.Action="{Binding ElementName=ClickOnMouseItem}"/>
                            </Grid>
                        </Viewbox>
                    </Decorator>
                </Grid>
                <ControlTemplate.Triggers>
                    <DataTrigger Binding="{Binding (Selector.IsSelected), RelativeSource={RelativeSource Self}}"
                                     Value="True">
                        <Setter TargetName="ClickOnMouseItem" Property="Command" Value="{Binding SelectCommand, RelativeSource={RelativeSource AncestorType=Page}}"/>
                        <DataTrigger.EnterActions>
                            <BeginStoryboard HandoffBehavior="SnapshotAndReplace"
                                                         Storyboard="{StaticResource SelectItemStory}" />
                        </DataTrigger.EnterActions>
                        <DataTrigger.ExitActions>
                            <BeginStoryboard HandoffBehavior="SnapshotAndReplace"
                                                         Storyboard="{StaticResource DeselectItemStory}" />
                        </DataTrigger.ExitActions>
                    </DataTrigger>

                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding SetupItem.IsFlyerFlipped}" Value="True" />
                            <Condition Binding="{Binding SetupItem.AllowFlipAnimation}" Value="True" />
                        </MultiDataTrigger.Conditions>
                        <MultiDataTrigger.EnterActions>
                            <BeginStoryboard HandoffBehavior="SnapshotAndReplace"
                                             Storyboard="{StaticResource A_Storyboard_ShowFrontOfFlyer_Bucketlist}" />
                        </MultiDataTrigger.EnterActions>
                    </MultiDataTrigger>
                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding SetupItem.IsFlyerFlipped}" Value="False" />
                            <Condition Binding="{Binding SetupItem.AllowFlipAnimation}" Value="True" />
                        </MultiDataTrigger.Conditions>
                        <MultiDataTrigger.EnterActions>
                            <BeginStoryboard HandoffBehavior="SnapshotAndReplace"
                                             Storyboard="{StaticResource A_Storyboard_ShowBackOfFlyer_Bucketlist}" />
                        </MultiDataTrigger.EnterActions>
                    </MultiDataTrigger>

                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding SetupItem.IsFlyerFlipped}" Value="True" />
                            <Condition Binding="{Binding SetupItem.AllowFlipAnimation}" Value="False" />
                        </MultiDataTrigger.Conditions>
                        <MultiDataTrigger.EnterActions>
                            <BeginStoryboard HandoffBehavior="SnapshotAndReplace"
                                             Storyboard="{StaticResource A_Storyboard_ShowFrontOfFlyer_Bucketlist_Instant}" />
                        </MultiDataTrigger.EnterActions>
                    </MultiDataTrigger>
                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding SetupItem.IsFlyerFlipped}" Value="False" />
                            <Condition Binding="{Binding SetupItem.AllowFlipAnimation}" Value="False" />
                        </MultiDataTrigger.Conditions>
                        <MultiDataTrigger.EnterActions>
                            <BeginStoryboard HandoffBehavior="SnapshotAndReplace"
                                             Storyboard="{StaticResource A_Storyboard_ShowBackOfFlyer_Bucketlist_Instant}" />
                        </MultiDataTrigger.EnterActions>
                    </MultiDataTrigger>
                </ControlTemplate.Triggers>
            </ControlTemplate>

            <Style x:Key="A_Style_ListBoxItem_BucketlistItemTile" TargetType="ListBoxItem">
                <Setter Property="Focusable" Value="True" />
                <Setter Property="Template" Value="{StaticResource A_ControlTemplate_ContentControl_ItemTile_Bucketlist}" />
                <Setter Property="local:ZPanel.DisableClipping" Value="True" />
                <Style.Triggers>
                    <DataTrigger Binding="{Binding IsSelectable}" Value="False" >
                        <Setter Property="Focusable" Value="False" />
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_FZTextBlock_BlueprintText" TargetType="local:FZTextBlock"
                   BasedOn="{StaticResource A_Style_FZTextBlock_HorizonB}">
                <Setter Property="Color" Value="{StaticResource A_Color_Tile_Title_Alternate}" />
                <Setter Property="FontSize" Value="48" />
                <Setter Property="TextWrapping" Value="Wrap" />
                <Setter Property="LineHeight" Value="48.0" />
                <Setter Property="LineStackingStrategy" Value="BlockLineHeight" />
            </Style>

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

            <SkewTransform x:Key="A_Transform_Italic_Super7_Header" AngleX="-8"/>
            <Double x:Key="A_Double_HeaderHeight">72</Double>
            <Double x:Key="A_Double_SubHeaderHeight">44</Double>
            <Double x:Key="A_Super7_BottomDeck_Height">214</Double>
            <Double x:Key="A_HighStakes_BottomDeck_Height">340</Double>
            <Color x:Key="A_Color_Super7_SubHeader">#FFFFFF</Color>
            <Color x:Key="A_Color_Super7_Header_HighlightGradientA">#331A70</Color>
            <Color x:Key="A_Color_Super7_Header_HighlightGradientB">#2D1440</Color>
            <Color x:Key="A_Color_Super7HighStakes_Header_HighlightGradientA">#C90051</Color>
            <Color x:Key="A_Color_Super7HighStakes_Header_HighlightGradientB">#81004A</Color>

            <Double x:Key="A_Double_Super7Credits">15500</Double>

            <Style x:Key="A_Style_FZTextBlock_HeaderText_Super7"
                   TargetType="local:FZTextBlock"
                   BasedOn="{StaticResource A_Style_FZTextBlock_HeaderBlock}">
                <Setter Property="RenderTransform" Value="{StaticResource A_Transform_Italic_Super7_Header}" />
            </Style>

            <Style x:Key="A_Style_FZTextBlock_SubHeaderText_Super7"
                   TargetType="local:FZTextBlock"
                   BasedOn="{StaticResource A_Style_FZTextBlock_HeaderText_Super7}">
                <Setter Property="CapHeight" Value="16" />
            </Style>

            <Style x:Key="A_Style_FZTextBlock_PanelSubText_Super7"
                   TargetType="local:FZTextBlock"
                   BasedOn="{StaticResource A_Style_FZTextBlock_HorizonB}">
                <Setter Property="CapHeight" Value="18" />
                <Setter Property="RenderTransform" Value="{StaticResource A_Transform_Italic_Super7_Header}" />
                <Setter Property="Color" Value="#FFFFFF" />
            </Style>

            <Style x:Key="A_Style_FZTextBlock_PanelSubTextBold_Super7"
                   TargetType="local:FZTextBlock"
                   BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}">
                <Setter Property="CapHeight" Value="35" />
                <Setter Property="RenderTransform" Value="{StaticResource A_Transform_Italic_Super7_Header}" />
                <Setter Property="Color" Value="#FFFFFF" />
            </Style>

            <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPresetRoundtangle_Super7_Header_Gradient"
                BasedOn="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterTopOnly}"
                GradientColorA="{StaticResource A_Color_Super7_Header_HighlightGradientA}"
                GradientColorB="{StaticResource A_Color_Super7_Header_HighlightGradientB}"
                GradientAngle="90"/>

            <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPresetRoundtangle_Super7HighStakes_Bottom_Gradient"
                BasedOn="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterBottomOnly}"
                GradientColorA="{StaticResource A_Color_Super7HighStakes_Header_HighlightGradientA}"
                GradientColorB="{StaticResource A_Color_Super7HighStakes_Header_HighlightGradientB}"
                GradientAngle="90"/>

            <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPresetRoundtangle_Super7HighStakes_Header_Gradient"
                BasedOn="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterTopOnly}"
                GradientColorA="{StaticResource A_Color_Super7HighStakes_Header_HighlightGradientA}"
                GradientColorB="{StaticResource A_Color_Super7HighStakes_Header_HighlightGradientB}"
                GradientAngle="90"/>

            <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPresetRoundtangle_Super7_SubHeader_Gradient"
                BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
                GradientColorA="{StaticResource A_Color_Super7_Header_HighlightGradientA}"
                GradientColorB="{StaticResource A_Color_Super7_Header_HighlightGradientB}"
                GradientAngle="90"/>

            <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPresetRoundtangle_Super7HighStakes_SubHeader_Gradient"
                BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
                GradientColorA="{StaticResource A_Color_Super7HighStakes_Header_HighlightGradientA}"
                GradientColorB="{StaticResource A_Color_Super7HighStakes_Header_HighlightGradientB}"
                GradientAngle="90"/>

            <local:MappingConverter x:Key="A_Converter_Super7BottomDockHeightFromScene" Default="214">
                <local:MappingConverterEntry Key="{x:Static local:SceneEntryEnum.BucketListSuper7HighStakes}" Value="340" />
            </local:MappingConverter>      

            <local:MappingConverter x:Key="A_Converter_TextAboveReward_FromScene" Default="{local:Loc BucketListBlueprint.IDS_ChallengeBrowser_CompletionBonus}">
                <local:MappingConverterEntry Key="{x:Static local:SceneEntryEnum.BucketListSuper7HighStakes}" Value="{local:Loc BucketListBlueprint.IDS_HighStake_NextReward}" />
            </local:MappingConverter>                       

            <local:MappingConverter x:Key="A_Converter_VisualModeToHeaderPreset"
                                    Default="{StaticResource A_FZMaterialPresetRoundtangle_Super7_Header_Gradient}">
                <local:MappingConverterEntry Key="{x:Static local:SceneEntryEnum.BucketListSuper7HighStakes}" Value="{StaticResource A_FZMaterialPresetRoundtangle_Super7HighStakes_Header_Gradient}" />
            </local:MappingConverter>

            <local:MappingConverter x:Key="A_Converter_VisualModeToSubHeaderPreset"
                                    Default="{StaticResource A_FZMaterialPresetRoundtangle_Super7_SubHeader_Gradient}">
                <local:MappingConverterEntry Key="{x:Static local:SceneEntryEnum.BucketListSuper7HighStakes}" Value="{StaticResource A_FZMaterialPresetRoundtangle_Super7HighStakes_SubHeader_Gradient}" />
            </local:MappingConverter>

            <Style x:Key="A_Style_FZMaterial_FlatPanel_Super7_HeaderPanel"
                   TargetType="{x:Type local:FZMaterial}">
                <Setter Property="Preset" Value="{Binding SceneEnum, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_VisualModeToHeaderPreset}}" />
                <Setter Property="Color" Value="{StaticResource A_Color_Super7_SubHeader}"/>
                <Setter Property="Height" Value="{StaticResource A_Double_HeaderHeight}"/>
            </Style>

            <Style x:Key="A_Style_FZMaterial_FlatPanel_Super7HS_BottomPanel"
                   TargetType="{x:Type local:FZMaterial}">
                <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_Super7HighStakes_Bottom_Gradient}" />
                <Setter Property="Color" Value="{StaticResource A_Color_Super7_SubHeader}"/>
                <Setter Property="Height" Value="{StaticResource A_Double_HeaderHeight}"/>
            </Style>            

            <Style x:Key="A_Style_FZMaterial_FlatPanel_Super7_SubHeaderPanel"
                   TargetType="{x:Type local:FZMaterial}"
                   BasedOn="{StaticResource A_Style_FZMaterial_FlatPanel_Super7_HeaderPanel}">
                <Setter Property="Preset" Value="{Binding SceneEnum, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_VisualModeToSubHeaderPreset}}" />
                <Setter Property="Height" Value="{StaticResource A_Double_SubHeaderHeight}"/>
            </Style>
            
            <local:MappingConverter x:Key="A_Converter_CollapsedIfNotSuper7"
                                    Default="{x:Static Visibility.Collapsed}">
                <local:MappingConverterEntry Key="{x:Static local:SceneEntryEnum.BucketListSuper7}" Value="{x:Static Visibility.Visible}" />
                <local:MappingConverterEntry Key="{x:Static local:SceneEntryEnum.BucketListSuper7HighStakes}" Value="{x:Static Visibility.Visible}" />
            </local:MappingConverter>

            <local:MappingConverter x:Key="A_Converter_CollapsedIfNull"
                                    Default="{x:Static Visibility.Visible}">
                <local:MappingConverterEntry Key="{x:Null}" Value="{x:Static Visibility.Collapsed}" />                
            </local:MappingConverter>

            <local:MappingConverter x:Key="A_Converter_CollapsedIfSuper7"
                                    Default="{x:Static Visibility.Visible}">
                <local:MappingConverterEntry Key="{x:Static local:SceneEntryEnum.BucketListSuper7}" Value="{x:Static Visibility.Collapsed}" />
                <local:MappingConverterEntry Key="{x:Static local:SceneEntryEnum.BucketListSuper7HighStakes}" Value="{x:Static Visibility.Collapsed}" />
            </local:MappingConverter>

            <local:MappingConverter x:Key="A_Converter_VisibleOnlyIfSuper7Mode"
                                    Default="{x:Static Visibility.Collapsed}">
                <local:MappingConverterEntry Key="{x:Static local:SceneEntryEnum.BucketListSuper7}" Value="{x:Static Visibility.Visible}" />
            </local:MappingConverter>

            <local:MappingConverter x:Key="A_Converter_VisibleOnlyIfSuper7HighStakesMode"
                                    Default="{x:Static Visibility.Collapsed}">
                <local:MappingConverterEntry Key="{x:Static local:SceneEntryEnum.BucketListSuper7HighStakes}" Value="{x:Static Visibility.Visible}" />
            </local:MappingConverter>

            <QuarticEase x:Key="A_EasingFunction_Progress_Animation"
                         EasingMode="EaseOut" />

            <local:UIStoryboard x:Key="A_Storyboard_Super7Progress_BlendValueInputChanged">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="{x:Null}"
                                               FillBehavior="Stop"
                                               Storyboard.TargetProperty="(local:BlendValue.Blend)">
                    <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                            Value="0" />
                    <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                            Value="0" />
                    <EasingDoubleKeyFrame KeyTime="0:0:0.5"
                                          Value="1"
                                          EasingFunction="{StaticResource A_EasingFunction_Progress_Animation}">
                    </EasingDoubleKeyFrame>
                </DoubleAnimationUsingKeyFrames>
            </local:UIStoryboard>

            <local:LinearTransformConverter x:Key="A_LinearTransformConverter_CompletionTransform" Scale="1.0005"/>

            <local:MappingConverter x:Key="A_Converter_TitleIconFromVisualMode"
                                    Default="/ForzaUI;component/Textures/Anthem/Icons/Titles/Blueprint.png">
                <local:MappingConverterEntry Key="{x:Static local:SceneEntryEnum.BucketListSuper7}" Value="/ForzaUI;component/Textures/Data_Bound/SuperChallenges/Super7_TitleIcon.png" />
                <local:MappingConverterEntry Key="{x:Static local:SceneEntryEnum.BucketListSuper7HighStakes}" Value="/ForzaUI;component/Textures/Data_Bound/SuperChallenges/Super7_TitleIcon.png" />
                <local:MappingConverterEntry Key="{x:Static local:SceneEntryEnum.BucketListShowroom}" Value="/ForzaUI;component/Textures/Data_Bound/SuperChallenges/Super7_TitleIcon.png" />
            </local:MappingConverter>

            <local:MappingConverter x:Key="A_Converter_TitleFromVisualMode"
                                    Default="{local:Loc ScreenTitles.IDS_CommunityChallenges}">
                <local:MappingConverterEntry Key="{x:Static local:SceneEntryEnum.BucketListSuper7}" Value="{local:Loc ScreenTitles.IDS_Super7}" />
                <local:MappingConverterEntry Key="{x:Static local:SceneEntryEnum.BucketListSuper7HighStakes}" Value="{local:Loc ScreenTitles.IDS_Super7HighStakes}" />
                <local:MappingConverterEntry Key="{x:Static local:SceneEntryEnum.BucketListShowroom}" Value="{local:Loc ScreenTitles.IDS_Super7HighStakes}" />
            </local:MappingConverter>

            <local:MappingConverter x:Key="A_Converter_RewardBackingFromMode"
                                    Default="">
                <local:MappingConverterEntry Key="{x:Static local:SceneEntryEnum.BucketListSuper7}" Value="/ForzaUI;component/Textures/Data_Bound/SuperChallenges/prizebacking_standard.png" />
                <local:MappingConverterEntry Key="{x:Static local:SceneEntryEnum.BucketListSuper7HighStakes}" Value="/ForzaUI;component/Textures/Data_Bound/SuperChallenges/prizebacking_highstakes.png" />
            </local:MappingConverter>
        </ResourceDictionary>
    </Page.Resources>

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

    <Grid>
        <Control Style="{StaticResource A_Style_Control_ScreenBackground}" />
        <local:PlayerBarControl x:Name="TopBar" Style="{StaticResource A_Style_PlayerBarControl}" />

        <local:NetworkCountdownControl Style="{StaticResource A_Style_NetworkCountdownControl_BucketListSetup}" />

        <Border x:Name="LayoutRoot"
                Style="{StaticResource A_Style_Border_ScenePadding}"
                ClipToBounds="false">
            <StackPanel Margin="0,0,0,42" VerticalAlignment="Bottom" HorizontalAlignment="Center" ClipToBounds="false"
                        Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_0}">
                <Grid>
                    <ContentControl x:Name="ContentControl_SceneTitle"
                                    Content="{Binding Title, RelativeSource={RelativeSource AncestorType=Page}}"
                                    Style="{StaticResource A_Style_ContentControl_ScreenTitleBlock}"
                                    HorizontalAlignment="Left"
                                    local:BindingProxy.A="{Binding SceneEnum, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_TitleIconFromVisualMode}}"/>
                </Grid>
                <Decorator Visibility="{Binding SceneEnum, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_CollapsedIfSuper7}}">
                    <local:ItemsSelector x:Name="CategoryList"
                                         ItemsSource="{Binding Categories}"
                                         SelectedItem="{Binding SelectedCategory}"
                                         Focusable="False"
                                         HorizontalAlignment="Left"
                                         Margin="0,0,0,12"
                                         WrapSelection="True"
                                         Style="{StaticResource A_Style_Carousel6ItemList_TabBar}"
                                         PageSize="1"
                                         Visibility="{Binding Categories.Count, Converter={StaticResource A_Converter_Categories_CountToVisibility}, FallbackValue=Collapsed}"
                                         local:AttachedRoutedEventCommand.RoutedEvent="Selector.SelectionChanged"
                                         local:AttachedRoutedEventCommand.Command="{Binding CategorySelectionChangedCommand}" />
                </Decorator>
                <Grid>
                    <Grid Margin="0,15,0,0">
                        <local:WrapListBox x:Name="PART_ListBox_Challenges"
                                               Style="{StaticResource A_Style_Carousel_CampaignEventFlyer}"
                                               ItemsSource="{Binding SelectedCategory.Challenges}"
                                               SelectedItem="{Binding SelectedCategory.SelectedItem}"
                                               ItemContainerStyle="{StaticResource A_Style_ListBoxItem_BucketlistItemTile}"
                                               PageSize="1"
                                               IsEnabled="True"
                                               local:AttachedRoutedEventCommand.RoutedEvent="Selector.SelectionChanged"
                                               local:AttachedRoutedEventCommand.Command="{Binding ItemSelectionChangedCommand}"
                                               local:FocusOnPageFocusGained.SelectorSelectedItem="True" />

                        <ProgressBar x:Name="IdleIndicator"
                                             IsIndeterminate="True"
                                             Style="{StaticResource A_Style_ProgressBar_WaitSpinner}"
                                             Height="56"
                                             Visibility="{Binding SelectedCategory.IsLoading, Converter={StaticResource A_FZBooleanToVisibilityConverter}, FallbackValue=Collapsed}"/>

                        <Decorator Width="400" Height="400" HorizontalAlignment="Center" Tag="{Binding SelectedCategory.Challenges.Count}">
                            <Decorator.Style>
                                <Style TargetType="FrameworkElement">
                                    <Setter Property="Visibility" Value="Collapsed" />
                                    <Style.Triggers>
                                        <MultiDataTrigger>
                                            <MultiDataTrigger.Conditions>
                                                <Condition Binding="{Binding Tag, RelativeSource={RelativeSource Self}}">
                                                    <Condition.Value>
                                                        <System:Int32>0</System:Int32>
                                                    </Condition.Value>
                                                </Condition>
                                                <Condition Binding="{Binding SelectedCategory.IsLoading, RelativeSource={RelativeSource AncestorType=Page}}" Value="False"/>
                                            </MultiDataTrigger.Conditions>
                                            <Setter Property="Visibility" Value="Visible"/>
                                        </MultiDataTrigger>
                                    </Style.Triggers>
                                </Style>
                            </Decorator.Style>
                            <local:FZTextBlock Color="{StaticResource A_Color_SubHeader_Text}"
                                                HorizontalAlignment="Center"
                                                TextAlignment="Center"
                                                Style="{StaticResource A_Style_FZTextBlock_Heading_Tight}"
                                                Text="{local:Loc EventBlueprint.IDS_UGC_NoEventsFound}"
                                                VerticalAlignment="Center"
                                                TextWrapping="Wrap"/>
                        </Decorator>                                             
                    </Grid>
                    <Grid DataContext="{Binding SelectedItem, ElementName=List}"
                          HorizontalAlignment="Left"
                          VerticalAlignment="Center">
                        <Grid Width="406"
                              Height="732"
                              Visibility="{Binding SceneEnum, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_CollapsedIfNotSuper7}}">
                            <local:FZMaterialGlassCapture />
                            <DockPanel>
                                <local:FZMaterial x:Name="Super7Header"
                                                  DockPanel.Dock="Top"
                                                  Visibility="{Binding SceneEnum, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_VisibleOnlyIfSuper7Mode}}"
                                                  Style="{StaticResource A_Style_FZMaterial_FlatPanel_Super7_HeaderPanel}">

                                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_HeaderText_Super7}"
                                                       Text="{local:Loc InGame.IDS_Progress}" />                                                    
                                </local:FZMaterial>

                                <local:FZMaterial x:Name="HighStakesHeader" DockPanel.Dock="Top"
                                                  Visibility="{Binding SceneEnum, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_VisibleOnlyIfSuper7HighStakesMode}}"
                                                  Style="{StaticResource A_Style_FZMaterial_FlatPanel_Super7_HeaderPanel}">

                                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_HeaderText_Super7}"
                                        TextAlignment="Center"
                                        Text="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}}"
                                        local:MultiStringFormatter.Param0="{Binding ChallengesCompleted, RelativeSource={RelativeSource AncestorType=Page}}"
                                        local:MultiStringFormatter.Param1="{Binding ChallengeCount, RelativeSource={RelativeSource AncestorType=Page}}"
                                        local:MultiStringFormatter.Format="{local:Loc BucketListBlueprint.IDS_ChallengeBrowser_Super7_HS_ChallengeProgress}" />   
                                </local:FZMaterial>

                                <ContentControl DockPanel.Dock="Top" Template="{StaticResource A_ControlTemplate_SidePanelContent}">
                                    <DockPanel>
                                        <DockPanel DockPanel.Dock="Bottom" Margin="0,40,0,0">
                                            <local:FZMaterial DockPanel.Dock="Top"
                                                              Style="{StaticResource A_Style_FZMaterial_FlatPanel_Super7_SubHeaderPanel}">                                                              
                                                <local:FZTextBlock Text="{Binding SceneEnum, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_TextAboveReward_FromScene}}"
                                                                   Style="{StaticResource A_Style_FZTextBlock_SubHeaderText_Super7}" />

                                            </local:FZMaterial>
                                            <Grid Height="{Binding SceneEnum, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_Super7BottomDockHeightFromScene}}">
                                                <local:FZMaterial ImageSource="{Binding SceneEnum, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_RewardBackingFromMode}}"
                                                                  Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterBottomOnly}" />
                                                <!-- Reward Thumbnail -->
                                                <StackPanel>
                                                    <ContentControl x:Name="RewardWidget" Content="{Binding CompletionReward, RelativeSource={RelativeSource AncestorType=Page}}"
                                                                ContentTemplate="{StaticResource A_ControlTemplate_RewardPreview}"
                                                                Visibility="{Binding CompletionReward, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_CollapsedIfNull}}"
                                                                HorizontalAlignment="Center"
                                                                Margin="0,20,0,20"
                                                                VerticalAlignment="Center" />

                                                    <local:FZMaterial UniformGrid.Row="1" Height="2" Color="#FFFFFF" Opacity="0.25" Margin="15,6,15,27"
                                                        Visibility="{Binding SceneEnum, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_VisibleOnlyIfSuper7HighStakesMode}}"/>

                                                    <DockPanel Margin="8,0,0,0" Visibility="{Binding SceneEnum, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_VisibleOnlyIfSuper7HighStakesMode}}">
                                                        <local:FZMaterial ImageSource="/ForzaUI;component/Textures/Data_Bound/SuperChallenges/HighStakes/RewardPool_Icon.png" Height="80" Width="80" DockPanel.Dock="Left" />
                                                        <Decorator Width="13" />
                                                        <StackPanel DockPanel.Dock="Right">
                                                            <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_PanelSubText_Super7}"
                                                                                Text="{local:Loc BucketListBlueprint.IDS_RewardsAccrued }"
                                                                                HorizontalAlignment="Left" />
                                                            <Decorator Height="12" />
                                                            <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_PanelSubTextBold_Super7}"
                                                                                Text="{Binding RewardsAccrued, RelativeSource={RelativeSource AncestorType=Page}}"
                                                                                HorizontalAlignment="Left" />
                                                        </StackPanel>
                                                    </DockPanel>                                                    
                                                </StackPanel>
                                            </Grid>
                                        </DockPanel>
                                        <Grid>
                                            <Grid x:Name="Super7Data" Visibility="{Binding SceneEnum, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_VisibleOnlyIfSuper7Mode}}">
                                                <StackPanel>
                                                    <Grid HorizontalAlignment="Center">
                                                        <local:FZMaterial ImageSource="/ForzaUI;component/Textures/Data_Bound/SuperChallenges/SUPER16_ProgressInfographic.png"
                                                                          Width="178"
                                                                          Height="178" />
                                                        <Grid Height="275"
                                                              Width="275">
                                                            <local:FZMaterial Color="{StaticResource A_Color_Options_DifficultyBonus}"
                                                                              Tag="{Binding ProgressRatio, RelativeSource={RelativeSource AncestorType=Page}, NotifyOnTargetUpdated=True}"
                                                                              local:BlendValue.InputChangedStoryboard="{StaticResource A_Storyboard_Super7Progress_BlendValueInputChanged}"
                                                                              local:BlendValue.Input="{Binding ProgressRatio, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_LinearTransformConverter_CompletionTransform}}"
                                                                              local:BlendValue.BlendFromPreviousOutput="True"
                                                                              local:BlendValue.ShouldSkipInitialInputChange="False">
                                                                <local:FZMaterial.Preset>
                                                                    <local:FZMaterialPresetRadialBar x:Name="Preset"
                                                                                                     TargetRatio="1.0"
                                                                                                     ShadowIntensity="0"
                                                                                                     TipGlowFade="0.0"
                                                                                                     AngleAmount="0"
                                                                                                     BarWidth="0.15"
                                                                                                     BackgroundColor="#00FFFFFF"
                                                                                                     Ratio="{Binding Path=(local:BlendValue.Output), RelativeSource={RelativeSource FindAncestor, AncestorType=local:FZMaterial}}">
                                                                    </local:FZMaterialPresetRadialBar>
                                                                </local:FZMaterial.Preset>
                                                            </local:FZMaterial>
                                                        </Grid>
                                                    </Grid>
                                                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_HeaderText_Super7}"
                                                                       TextAlignment="Center"
                                                                       CapHeight="21"
                                                                       Text="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}}"
                                                                       local:MultiStringFormatter.Param0="{Binding ChallengesCompleted, RelativeSource={RelativeSource AncestorType=Page}}"
                                                                       local:MultiStringFormatter.Param1="{Binding ChallengeCount, RelativeSource={RelativeSource AncestorType=Page}}"
                                                                       local:MultiStringFormatter.Format="{local:Loc BucketListBlueprint.IDS_ChallengeBrowser_Super7ChallengeProgress}" />
                                                </StackPanel>
                                            </Grid>

                                            <!-- High Stakes Browser Widget-->
                                            <Grid x:Name="HighStakesData" Visibility="{Binding SceneEnum, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_VisibleOnlyIfSuper7HighStakesMode}}">
                                                <StackPanel VerticalAlignment="Top">
                                                    <UniformGrid Rows="3"
                                                                 Margin="18,18,0,0"
                                                                 Height="150">
                                                        <DockPanel UniformGrid.Row="0">
                                                            <local:FZMaterial  Style="{StaticResource A_Style_FZMaterial_FlatPanel_HeaderPill}" Color="{StaticResource A_Color_Super7HighStakes_Header_HighlightGradientA}" Height="69">
                                                                <local:FZMaterial ImageSource="/ForzaUI;component/Textures/Data_Bound/SuperChallenges/HighStakes/Burns_Icon.png"
                                                                              Height="67"
                                                                              Width="67"
                                                                              DockPanel.Dock="Left" />
                                                            </local:FZMaterial>

                                                            <Decorator Width="13" />
                                                            <StackPanel DockPanel.Dock="Right">
                                                                <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_PanelSubText_Super7}"
                                                                                   Text="{local:Loc BucketListBlueprint.IDS_ChallengeBrowser_Burns}"
                                                                                   HorizontalAlignment="Left" />
                                                                <Decorator Height="12" />
                                                                <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_PanelSubTextBold_Super7}"
                                                                                   Text="{Binding Burns, RelativeSource={RelativeSource AncestorType=Page}}"
                                                                                   HorizontalAlignment="Left" />
                                                            </StackPanel>
                                                        </DockPanel>
                                                        
                                                        <local:FZMaterial UniformGrid.Row="1" Height="2" Color="#FFFFFF" Opacity="0.25" Margin="0,17,10,0" />

                                                        <DockPanel UniformGrid.Row="2">
                                                            <local:FZMaterial  Style="{StaticResource A_Style_FZMaterial_FlatPanel_HeaderPill}" Color="{StaticResource A_Color_Super7HighStakes_Header_HighlightGradientA}" Height="69">
                                                                <local:FZMaterial ImageSource="/ForzaUI;component/Textures/Data_Bound/SuperChallenges/HighStakes/Lives_Icon.png"
                                                                              Height="67"
                                                                              Width="67"
                                                                              DockPanel.Dock="Left" />
                                                            </local:FZMaterial>
                                                            <Decorator Width="13" />
                                                            <StackPanel DockPanel.Dock="Right">
                                                                <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_PanelSubText_Super7}"
                                                                                   Text="{local:Loc BucketListBlueprint.IDS_ChallengeBrowser_Lives}"
                                                                                   HorizontalAlignment="Left" />
                                                                <Decorator Height="12" />
                                                                <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_PanelSubTextBold_Super7}"
                                                                                   Text="{Binding Lives, RelativeSource={RelativeSource AncestorType=Page}}"
                                                                                   HorizontalAlignment="Left" />
                                                            </StackPanel>
                                                        </DockPanel>
                                                    </UniformGrid>
                                                </StackPanel>
                                            </Grid>
                                        </Grid>
                                    </DockPanel>
                                </ContentControl>

                                <local:FZMaterial  x:Name="HighStakesFooter" DockPanel.Dock="Bottom" Style="{StaticResource A_Style_FZMaterial_FlatPanel_Super7HS_BottomPanel}" Margin="0,-5,0,0"
                                    Visibility="{Binding SceneEnum, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_VisibleOnlyIfSuper7HighStakesMode}}">
                                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                                        <local:ControllerButtonControl Style="{StaticResource A_Style_ControllerButtonControl_Default_ShowAlways}" Margin="10,0,5,0" UserLargeIcon="true"  Height="35" Button="X" />
                                        <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_HeaderText_Super7}" CapHeight="25" MaxWidth="350" Text="{Binding Source={local:Loc BucketListBlueprint.IDS_View_RewardsPool}, Converter={StaticResource A_StringToUpper}}" />
                                    </StackPanel>
                                </local:FZMaterial>                                

                            </DockPanel>
                        </Grid>
                    </Grid>
                </Grid>
            </StackPanel>
        </Border>

        <ContentControl Style="{StaticResource A_Style_ButtonBar}"
                        x:Name="BottomBar">
            <local:ControllerButtonPanel x:Name="HelpPanel"
                                         Style="{StaticResource A_Style_ControllerButtonPanel_Default}">
                <local:ControllerButtonControl Button="A"
                                               Description="{local:Loc HelpButtons.IDS_Select}"
                                               Visibility="{Binding SelectedItem, FallbackValue=Collapsed, ElementName=PART_ListBox_Challenges, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"/>
                <local:ControllerButtonControl Button="B"
                                               Description="{local:Loc HelpButtons.IDS_Back}"/>
                <local:ControllerButtonControl Button="Y"
                                               Description="{local:Loc HelpButtons.IDS_BucketListBlueprintOptions}"
                                               Visibility="{Binding CanViewChallengeOptions, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"/>
                <local:ControllerButtonControl Button="X" 
                                               Description="{local:Loc BucketListBlueprint.IDS_View_RewardsPool}"
                                               Visibility="{Binding SceneEnum, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_VisibleOnlyIfSuper7HighStakesMode}}"/>
                <local:ControllerButtonControl Button="RBumper"
                                               Description="{local:Loc HelpButtons.IDS_HighStakeBurn}"
                                               Visibility="{Binding ShowBurnButton, FallbackValue=Collapsed, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"/>
                <local:ControllerButtonControl Button="Start"
                                               Description="{Binding ResetButtonText, FallbackValue={x:Null}}"
                                               Visibility="{Binding IsSuper7ModeActive, FallbackValue=Collapsed, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"/>


            </local:ControllerButtonPanel>
        </ContentControl>

        <FZTextBlock x:Name="DebugOnly"
                     CapHeight="30"
                     VerticalAlignment="Bottom"
                     Text="{Binding DebugChallengeDetails, RelativeSource={RelativeSource AncestorType=Page}}"
                     Visibility="{Binding DebugChallengeDetails, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_StringVisConverter}, FallbackValue=Collapsed}" />
    </Grid>
</Page>
