<Page x:Class="ForzaUI.Scenes.Anthem.A_MinorObjectivesScene"
      xmlns:local="clr-namespace:ForzaUI;assembly="
      xmlns:System="clr-namespace:System;assembly=mscorlib"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      Style="{StaticResource A_Style_Page_Generic}"
      DataContext="{Binding RelativeSource={RelativeSource Self}}">
    <Page.Resources>
        <Style x:Key="A_Style_FrameworkElement_CarouselSelectionScale_Dynamic"
           TargetType="FrameworkElement">
            <Setter Property="RenderTransform">
                <Setter.Value>
                    <ScaleTransform />
                </Setter.Value>
            </Setter>
            <Style.Triggers>
                <DataTrigger Binding="{Binding (Selector.IsSelected), RelativeSource={RelativeSource AncestorType=ListBoxItem}}"
                         Value="True">
                    <DataTrigger.EnterActions>
                        <BeginStoryboard HandoffBehavior="SnapshotAndReplace">
                            <BeginStoryboard.Storyboard>
                                <Storyboard>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.RenderTransform).(ScaleTransform.ScaleX)">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                                            Value="1.06" />
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.RenderTransform).(ScaleTransform.ScaleY)">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                                            Value="1.06" />
                                    </DoubleAnimationUsingKeyFrames>
                                </Storyboard>
                            </BeginStoryboard.Storyboard>
                        </BeginStoryboard>
                    </DataTrigger.EnterActions>
                    <DataTrigger.ExitActions>
                        <BeginStoryboard HandoffBehavior="SnapshotAndReplace">
                            <BeginStoryboard.Storyboard>
                                <Storyboard>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.RenderTransform).(ScaleTransform.ScaleX)">
                                        <EasingDoubleKeyFrame KeyTime="0:0:0.3"
                                                      Value="1.0"
                                                      EasingFunction="{local:CircleEasing}" />
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.RenderTransform).(ScaleTransform.ScaleY)">
                                        <EasingDoubleKeyFrame KeyTime="0:0:0.3"
                                                          Value="1.0"
                                                          EasingFunction="{local:CircleEasing}" />
                                    </DoubleAnimationUsingKeyFrames>
                                </Storyboard>
                            </BeginStoryboard.Storyboard>
                        </BeginStoryboard>
                    </DataTrigger.ExitActions>
                </DataTrigger>
            </Style.Triggers>
        </Style>
        
        <Storyboard x:Key="A_Storyboard_SmoothScrollWithMotionBlur">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(local:BlendValue.Blend)"
                                           Storyboard.TargetName="{x:Null}"
                                           FillBehavior="Stop">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                        Value="0" />
                <EasingDoubleKeyFrame KeyTime="0:0:0.267"
                                      Value="1"
                                      EasingFunction="{local:QuarticEasing EasingMode=EaseOut}" />
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>

        <System:Double x:Key="A_Double_FestivalPass_MaxCarouselItemHeight">678</System:Double>
        <System:Double x:Key="A_Double_FestivalPass_MaxCarouselItemWidth">404</System:Double>

        <System:Double x:Key="A_Double_FestivalPass_MaxCarouselItemWidthPlusOffset">410</System:Double>
        <System:Double x:Key="A_Double_FestivalPass_ListItemWidthOffset">404</System:Double>
        <Thickness x:Key="A_Double_FestivalPass_CarouselItemMargin">3,3,3,3</Thickness>
        <System:Double x:Key="A_Double_FestivalPass_MaxCarouselItemHeightWithMargin">684</System:Double>
        
        <Style x:Key="A_Style_FrameworkElement_FestivalPass_ItemContainer"
               TargetType="{x:Type FrameworkElement}">
            <Setter Property="Height"
                    Value="{StaticResource A_Double_FestivalPass_MaxCarouselItemHeight}" />
            <Setter Property="Width"
                    Value="{StaticResource A_Double_FestivalPass_MaxCarouselItemWidth}" />
        </Style>

        <Style x:Key="A_Style_Control_FestivalPassEmptyItem"
               TargetType="{x:Type Control}"
               BasedOn="{StaticResource A_Style_FrameworkElement_FestivalPass_ItemContainer}">
            <Setter Property="Focusable"
                    Value="False" />
            <Setter Property="Template"
                    Value="{StaticResource A_Template_Control_Carousel_EmptyItemStyle}" />
        </Style>

        <Style x:Key="A_Style_Control_FestivalPassEmptyItem_OutOfCarousel"
               TargetType="{x:Type Control}"
               BasedOn="{StaticResource A_Style_Control_FestivalPassEmptyItem}">
            <Setter Property="Margin"
                    Value="{StaticResource A_Double_FestivalPass_CarouselItemMargin}" />
        </Style>

        <ControlTemplate x:Key="A_ControlTemplate_CommonListBox_Carousel_FestivalPass"
                             TargetType="{x:Type local:CommonListBox}">
            <local:VirtualizingWrapPanel IsItemsHost="True"
                                         ScrollOrientation="Horizontal"
                                         KeyboardNavigation.DirectionalNavigation="Contained"
                                         ItemWidth="{StaticResource A_Double_FestivalPass_MaxCarouselItemWidthPlusOffset}"
                                         ItemHeight="{StaticResource A_Double_FestivalPass_MaxCarouselItemHeight}"
                                         EmptyItemStyle="{StaticResource A_Style_Control_FestivalPassEmptyItem_OutOfCarousel}"
                                         SeparatorItemStyle="{StaticResource A_Style_ListBoxItem_FullScreenCarousel_SeparatorItemStyle}"
                                         SeparatorPlacement="{Binding SeparatorPlacementFunc, RelativeSource={RelativeSource AncestorType=Page}}"
                                         SelectionLimitTop="{StaticResource A_Double_FestivalPass_ListItemWidthOffset}"
                                         Style="{StaticResource A_VirtualizingWrapPanel_Default}">
                <local:VirtualizingWrapPanel.RenderTransform>
                    <TranslateTransform X="{Binding Path=(local:BlendValue.Output), RelativeSource={RelativeSource AncestorType=VirtualizingWrapPanel}}" />
                </local:VirtualizingWrapPanel.RenderTransform>
            </local:VirtualizingWrapPanel>
        </ControlTemplate>

        <Style x:Key="A_Style_ListBoxItem_MinorObjectives"
               TargetType="{x:Type ListBoxItem}"
               BasedOn="{StaticResource A_Style_ContentControl_Carousel_ContainerStyle}">
            <Style.Resources>
                <Style x:Key="A_Style_FZMaterial_ShadowBase_Dynamic"
                       TargetType="local:FZMaterial"
                       BasedOn="{StaticResource A_Style_FZMaterial_ShadowBase_Dynamic}">
                    <Setter Property="Margin"
                            Value="-5" />
                </Style>
            </Style.Resources>
            <Setter Property="Margin"
                    Value="{StaticResource A_Double_FestivalPass_CarouselItemMargin}" />
            <Setter Property="IsEnabled"
                    Value="{Binding Enabled}" />
        </Style>

        <Style x:Key="A_Style_CommonListBox_FullScreenCarousel_MinorObjectives"
               TargetType="{x:Type local:CommonListBox}">
            <Setter Property="Template"
                    Value="{StaticResource A_ControlTemplate_CommonListBox_Carousel_FestivalPass}" />
            <Setter Property="VerticalAlignment" 
                    Value="Center" />
            <Setter Property="HorizontalAlignment" 
                    Value="Center" />
            <Setter Property="ItemContainerStyle"
                    Value="{StaticResource A_Style_ListBoxItem_MinorObjectives}" />
            <Setter Property="ScrollViewer.CanContentScroll" 
                    Value="False" />
            <Setter Property="Height" 
                    Value="{StaticResource A_Double_FestivalPass_MaxCarouselItemHeight}" />
            <Setter Property="Margin" 
                    Value="0,0,0,-7" />
            <Setter Property="Width"
                    Value="{Binding Width, RelativeSource={RelativeSource AncestorType=Page}}" />
        </Style>

        <local:LinearTransformConverter x:Key="A_Converter_ScrollOffsetAdjustment"
                                        Scale="-1"
                                        Add="-314" />

        <ItemsPanelTemplate x:Key="A_Template_RewardsPanel">
            <UniformGrid IsItemsHost="True"
                         Columns="2"
                         HorizontalAlignment="Center" />
        </ItemsPanelTemplate>

        <ControlTemplate x:Key="A_ControlTemplate_EventReward" TargetType="Control">
            <ControlTemplate.Resources>
                <local:FZMaterialPresetRoundtangle x:Key="A_Preset_Roundtangle_InnerAllPanel" CornerRadius="2,2,2,2"/>
                <local:FZMaterialPresetRoundtangle x:Key="A_Preset_Roundtangle_InnerTopTextPanel" CornerRadius="2,2,0,0"/>

                <local:MappingConverter x:Key="A_Converter_ThreadNameToEventIcon" Default="{x:Null}">
                    <local:MappingConverterEntry Key="asphalt_series" Value="/ForzaUI;component/Textures/Data_Bound/Series11/MinorObjectives/EventRewards/Prize_RoadRacing.png" />
                    <local:MappingConverterEntry Key="mixed_surface_series" Value="/ForzaUI;component/Textures/Data_Bound/Series11/MinorObjectives/EventRewards/Prize_MixedSurface.png" />
                    <local:MappingConverterEntry Key="cross_country_series" Value="/ForzaUI;component/Textures/Data_Bound/Series11/MinorObjectives/EventRewards/Prize_CrossCountry.png" />
                    <local:MappingConverterEntry Key="street_racing_series" Value="/ForzaUI;component/Textures/Data_Bound/Series11/MinorObjectives/EventRewards/Prize_StreetRace.png" />
                    <local:MappingConverterEntry Key="drag_racing" Value="/ForzaUI;component/Textures/Data_Bound/Series11\MinorObjectives/EventRewards/Prize_DragRace.png" />
                    <local:MappingConverterEntry Key="online_adventure_mixed" Value="/ForzaUI;component/Textures/Data_Bound/InfluenceThreads/MyHorizonLife/online_misc.png" />
                    <local:MappingConverterEntry Key="online_adventure_playground_games" Value="/ForzaUI;component/Textures/Data_Bound/InfluenceThreads/MyHorizonLife/online_misc.png" />
                    <local:MappingConverterEntry Key="online_adventure_racing" Value="/ForzaUI;component/Textures/Data_Bound/InfluenceThreads/MyHorizonLife/online_misc.png" />
                    <local:MappingConverterEntry Key="online_adventure_drift" Value="/ForzaUI;component/Textures/Data_Bound/InfluenceThreads/MyHorizonLife/online_misc.png" />
                </local:MappingConverter>

                <local:MappingConverter x:Key="A_Converter_EventCount_ToEventFormatString" Default="{local:Loc Rivals.IDS_RewardTitle_RacesUnlocked_Format_Plural}">
                    <local:MappingConverterEntry Key="1" Value="{local:Loc Rivals.IDS_RewardTitle_RacesUnlocked_Format}" />
                </local:MappingConverter>

                <Style x:Key="A_Style_FZTextBlock_EventReward_Title" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextblock_RewardPreviewText}">
                    <Setter Property="local:MultiStringFormatter.Format" Value="{Binding EventsUnlocked, Converter={StaticResource A_Converter_EventCount_ToEventFormatString}}"/>
                    <Setter Property="local:MultiStringFormatter.Param0" Value="{Binding EventsUnlocked, FallbackValue=0}"/>
                    <Setter Property="Text" Value="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}}"/>
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding Tag, RelativeSource={RelativeSource Self}}" Value="Gold">
                            <Setter Property="Color" Value="{StaticResource A_Color_Default_Reward_Complete_Text}"/>
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </ControlTemplate.Resources>
            <local:FZMaterial Width="178" Height="178" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0,0,8,0" 
                              Color="#FFFFFF"
                              Style="{StaticResource A_Style_FZMaterial_FlatPanel_Tile_PreviewReward}">
                <Grid>
                    <Grid Margin="6">
                        <local:FZMaterial x:Name="EventBackground" Color="{Binding Thread.Progress.ThreadName, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_InfluenceThreadIdToColor}}"
                                      Preset="{StaticResource A_Preset_Roundtangle_InnerAllPanel}">
                            <local:FZMaterial x:Name="DarkerBackground" Color="#000000" Opacity="0.25" Preset="{StaticResource A_Preset_Roundtangle_InnerAllPanel}"/>
                        </local:FZMaterial>

                        <Grid>
                            <local:FZMaterial x:Name="HeaderTitlePanel" VerticalAlignment="Top" Color="{Binding Thread.Progress.ThreadName, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_InfluenceThreadIdToColor}}"
                                          Preset="{StaticResource A_Preset_Roundtangle_InnerTopTextPanel}" Height="38" Margin="0,-0.1,0,0">
                            </local:FZMaterial>
                            <local:FZMaterial x:Name="EventIcon"  VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="168" Height="168"
                                          ImageSource="{Binding Thread.Progress.ThreadName, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_ThreadNameToEventIcon}}"/>
                        </Grid>
                    </Grid>
                    <local:FZMaterial x:Name="GoldAchievedPanel" ImageSource="{Binding Path=(local:TickerItemsControlItem.Index), Converter={StaticResource A_Converter_Index_To_GoldState}}"
                                    Visibility="Hidden" Margin="5.5" Stretch="Uniform"/>

                    <local:FZTextBlock x:Name="EventTitle" Style="{StaticResource A_Style_FZTextBlock_EventReward_Title}"
                                       VerticalAlignment="Top" HorizontalAlignment="Center" Margin="8,19"/>
                </Grid>
            </local:FZMaterial>
            <ControlTemplate.Triggers>
                <DataTrigger Binding="{Binding (local:BindingProxy.A), RelativeSource={RelativeSource Self}}" Value="Gold">
                    <Setter TargetName="GoldAchievedPanel" Property="Visibility" Value="Visible"/>
                    <Setter TargetName="HeaderTitlePanel" Property="Visibility" Value="Collapsed"/>
                    <Setter TargetName="EventBackground" Property="Color" Value="#FF7A571E"/>
                    <Setter TargetName="DarkerBackground" Property="Visibility" Value="Collapsed"/>
                    <Setter TargetName="EventTitle" Property="Tag" Value="Gold"/>
                </DataTrigger>
                
                <DataTrigger Binding="{Binding Source={StaticResource A_Visibility_ShowForHighContrastOnly}}" Value="{x:Static Visibility.Visible}">
                    <Setter TargetName="EventTitle" Property="Color" Value="{StaticResource A_Color_White}"/>
                </DataTrigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>
        
        <DataTemplate x:Key="A_DataTemplate_MinorObjectiveReward">
            <Grid Margin="2,0,2,2"
                        VerticalAlignment="Top">
                <ContentPresenter Content="{Binding}" x:Name="ObjectiveReward" 
                                  Visibility="{Binding IsEventReward, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}, FallbackValue=Visible}"
                                  ContentTemplate="{StaticResource A_ControlTemplate_RewardPreview}"/>
                <Control x:Name="EventReward" 
                         Visibility="{Binding IsEventReward, Converter={StaticResource A_FZBooleanToVisibilityConverter}, FallbackValue=Collapsed}" Template="{StaticResource A_ControlTemplate_EventReward}"/>
            </Grid>
            <DataTemplate.Triggers>
                <DataTrigger Binding="{Binding DataContext.ObjectiveComplete, RelativeSource={RelativeSource FindAncestor, AncestorType=local:TickerItemsControl}}" Value="{StaticResource A_Boolean_True}">
                    <Setter TargetName="ObjectiveReward" Property="local:BindingProxy.A" Value="Gold"/>
                    <Setter TargetName="EventReward" Property="local:BindingProxy.A" Value="Gold"/>
                </DataTrigger>
            </DataTemplate.Triggers>
        </DataTemplate>

        <Style x:Key="A_Style_MinorObjective_FZRun_INFLUENCEICON" TargetType="Control">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate>
                        <Decorator Width="36" Height="36" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,-24,-4,0" >
                            <local:FZMaterial ImageSource="/ForzaUI;component/Textures/Anthem/Icons/Influence_Icon.png" Width="24" Height="24" Margin="0,0,0,-6"/>
                        </Decorator>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <DataTemplate x:Key="A_DataTemplate_MinorObjectiveTier">
            <DataTemplate.Resources>
                <Style x:Key="A_Style_FZMaterial_TierEmblem" TargetType="local:FZMaterial">
                    <Setter Property="Width" Value="398"/>
                    <Setter Property="Height" Value="288"/>
                    <Setter Property="HorizontalAlignment" Value="Center"/>
                    <Setter Property="VerticalAlignment" Value="Top"/>
                    <Setter Property="ImageSource" Value="/ForzaUI;component/Textures/Data_Bound/Series11/MinorObjectives/White_Emblem.png"/>
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding ObjectiveComplete}" Value="{StaticResource A_Boolean_True}">
                            <Setter Property="ImageSource" Value="/ForzaUI;component/Textures/Data_Bound/Series11/MinorObjectives/Gold_Emblem.png"/>
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
                <Style x:Key="A_Style_FZMaterial_TierEmblem_Shadow" TargetType="local:FZMaterial">
                    <Setter Property="Width" Value="398"/>
                    <Setter Property="Height" Value="584"/>
                    <Setter Property="HorizontalAlignment" Value="Right"/>
                    <Setter Property="VerticalAlignment" Value="Top"/>
                    <Setter Property="ImageSource" Value="/ForzaUI;component/Textures/Data_Bound/Series11/MinorObjectives/Emblem_LongShadow.png"/>
                </Style>
                <local:FZMaterialPresetRoundtangle x:Key="A_Preset_Roundtangle_BackgroundOutline" CornerRadius="4,4,4,4"/>
                <local:FZMaterialPresetRoundtangle x:Key="A_Preset_Roundtangle_Background" CornerRadius="2,2,2,2"/>
                <local:FZMaterialPresetRoundtangle x:Key="A_Preset_Roundtangle_DarkInnerAllPanel" CornerRadius="2,2,2,2"/>

                <Style x:Key="A_Style_FZTextBlock_ObjectiveTierText" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}">
                    <Setter Property="Color" Value="#FFFFFF"/>
                    <Setter Property="TextWrapping" Value="NoWrap"/>
                    <Setter Property="CapHeight" Value="18"/>
                </Style>

                <Style x:Key="A_Style_FZTextBlock_TierDescription" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_ObjectiveTierText}">
                    <Setter Property="local:CompareValue.A" Value="{Binding Tier}" />
                    <Setter Property="local:CompareValue.B" Value="{Binding Thread.Progress.Tier, RelativeSource={RelativeSource AncestorType=Page}, FallbackValue=0}" />

                    <Setter Property="local:MultiStringFormatter.Format" Value="{local:Loc TiledMenus.IDS_RequireXInfluenceToUnlockFormat}"/>
                    <Setter Property="local:MultiStringFormatter.Param0" Value="{Binding UnlockInfluence, Converter={StaticResource A_NumUnitConverter_ShowUnit_0dp}, FallbackValue=0}"/>
                    <Setter Property="local:TextBlockInlineMarkup.Markup" Value="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}}"/>
                    <Setter Property="local:TextBlockInlineMarkup.ResourceBaseName" Value="A_Style_MinorObjective_FZRun_"/>
                    <Style.Triggers>
                        <!-- Completed tier -->
                        <DataTrigger Binding="{Binding ObjectiveComplete}" Value="{StaticResource A_Boolean_True}">
                            <Setter Property="local:TextBlockInlineMarkup.Markup" Value="{local:Loc TiledMenus.IDS_TierComplete}"/>
                        </DataTrigger>
                        <!-- Current completed tier -->
                        <DataTrigger Binding="{Binding Path=(local:CompareValue.Result), RelativeSource={RelativeSource Self}}" Value="0">
                            <Setter Property="local:TextBlockInlineMarkup.Markup" Value="{local:Loc TiledMenus.IDS_CurrentTier}"/>
                        </DataTrigger>
                        <!-- Next inprogress tier -->
                        <DataTrigger Binding="{Binding ActiveObjective}" Value="{StaticResource A_Boolean_True}">
                            <Setter Property="local:MultiStringFormatter.Param0" Value="{Binding RemainingInfluence, Converter={StaticResource A_NumUnitConverter_ShowUnit_0dp}, FallbackValue=0}"/>
                            <Setter Property="local:MultiStringFormatter.Format" Value="{local:Loc TiledMenus.IDS_EarnInfluenceUnlockFormat}"/>
                            <Setter Property="local:TextBlockInlineMarkup.Markup" Value="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}}"/>
                        </DataTrigger>
                    </Style.Triggers>
                </Style>

                <CornerRadius x:Key="A_CornerRadius_TileStroke">4</CornerRadius>
                <Thickness x:Key="A_Thickness_SelectionStroke">6</Thickness>
                
                <local:FZMaterialPresetRoundtangleStroke x:Key="A_FZMaterialPresetRoundtangleStroke_ContainerOutline"
                                                     BasedOn="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterAll}"
                                                     CornerRadius="{DynamicResource A_CornerRadius_TileStroke}"
                                                     Thickness="{StaticResource A_Thickness_SelectionStroke}" />

                <Style x:Key="A_Style_FZMaterial_Empty_Tile_Outline" TargetType="local:FZMaterial" BasedOn="{StaticResource A_Style_FZMaterial_FlatPanel_Tile}">
                    <Setter Property="Width" Value="178"/>
                    <Setter Property="Height" Value="178"/>
                    <Setter Property="Color" Value="#FFFFFFFF"/>
                    <Setter Property="Opacity" Value="0.4"/>
                    <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangleStroke_ContainerOutline}"/>
                </Style>

                <Style x:Key="A_Style_FZTextBlock_TierText" TargetType="local:FZTextBlock">
                    <Setter Property="FontFamily" Value="Horizon_C"/>
                    <Setter Property="Color" Value="#404040"/>
                    <Setter Property="LineStackingStrategy" Value="BlockLineHeight"/>
                    <Setter Property="LineHeight" Value="20"/>
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding ObjectiveComplete}" Value="{StaticResource A_Boolean_True}">
                            <Setter Property="Color" Value="#332A02"/>
                            <Setter Property="Opacity" Value="0.7"/>
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </DataTemplate.Resources>
            <Grid Width="{StaticResource A_Double_FestivalPass_MaxCarouselItemWidth}"
                  Height="{StaticResource A_Double_FestivalPass_MaxCarouselItemHeight}">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="87"/>
                    </Grid.RowDefinitions>
                    <Grid Grid.Row="0" x:Name="TopPanel">
                        <local:FZMaterial x:Name="BackingGradientOutline" Margin="3,3,3,3"
                                VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Preset="{StaticResource A_Preset_Roundtangle_BackgroundOutline}"
                                Color="{Binding Thread.Progress.ThreadName, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_InfluenceThreadIdToColor}, FallbackValue=#FF0864CB}">
                            <local:FZMaterial Color="#000000" Opacity="0.25" Preset="{StaticResource A_Preset_Roundtangle_BackgroundOutline}"/>
                        </local:FZMaterial>

                        <local:FZMaterial x:Name="BackingGradient" Margin="6,6,6,6"
                                          VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
                                          Preset="{StaticResource A_Preset_Roundtangle_Background}"
                                          Color="{Binding Thread.Progress.ThreadName, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_InfluenceThreadIdToColor}, FallbackValue=#FF0864CB}"/>

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

                        <DockPanel HorizontalAlignment="Center">
                            <Grid DockPanel.Dock="Top">
                                <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_TierEmblem}">
                                    <Grid>
                                        <DockPanel MaxWidth="140" MaxHeight="100">
                                            <local:FZTextBlock HorizontalAlignment="Center" VerticalAlignment="Center" DockPanel.Dock="Bottom"
                                                           Effect="{StaticResource A_Effect_HighContrastModeDropShadow_Large}"
                                                           FontFamily="Horizon_C" TrackingAdjust="0.1" Color="#FFFFFF" CapHeight="16"
                                                           Text="{local:Loc TiledMenus.IDS_Tier}"/>
                                            <Decorator Height="8" DockPanel.Dock="Bottom"/>
                                            <local:FZTextBlock HorizontalAlignment="Center" VerticalAlignment="Center" CapHeight="64" 
                                                           Effect="{StaticResource A_Effect_HighContrastModeDropShadow_Large}"
                                                           FontFamily="Horizon_C" Color="#FFFFFF" StretchDirection="DownOnly"
                                                           Text="{Binding Tier}"/>
                                        </DockPanel>
                                        <Decorator VerticalAlignment="Bottom" Margin="0,0,0,28" Height="52">
                                            <Decorator RenderTransform="{StaticResource A_Transform_Italic}" VerticalAlignment="Stretch" HorizontalAlignment="Center" Margin="0,6,0,6">
                                                <local:FZTextBlock Text="{Binding Thread.Title,  RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_StringToUpper}}" 
                                                               MaxWidth="160" MaxHeight="40" TextWrapping="WrapWithOverflow" FontSize="24" TextAlignment="Center" Margin="3,0,0,0"
                                                               Style="{StaticResource A_Style_FZTextBlock_TierText}" VerticalAlignment="Center"/>
                                            </Decorator>
                                        </Decorator>
                                    </Grid>
                                </local:FZMaterial>
                            </Grid>

                            <Grid Margin="8" DockPanel.Dock="Bottom" VerticalAlignment="Bottom" Height="242">
                                <local:FZMaterial x:Name="TintPanel" Opacity="0.25" Color="#000000" 
                                                  Preset="{StaticResource A_Preset_Roundtangle_DarkInnerAllPanel}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>

                                <Grid x:Name="FirstTierIntroPanel" Width="380" HorizontalAlignment="Center"  VerticalAlignment="Bottom" Margin="0,0,0,10" Visibility="Collapsed">
                                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_Empty_Tile_Outline}" Width="372" HorizontalAlignment="Center"/>
                                    <Decorator RenderTransform="{StaticResource A_Transform_Italic}" RenderTransformOrigin="0.5,0.5" VerticalAlignment="Center" HorizontalAlignment="Center">
                                        <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_ObjectiveTierText}" 
                                                       Text="{local:Loc TiledMenus.IDS_ThreadUnlocked}" LineAdjust="-0.3"
                                                       TextWrapping="Wrap" TextAlignment="Center"
                                                       HorizontalAlignment="Stretch" CapHeight="31"
                                                       VerticalAlignment="Center" Margin="24"/>
                                    </Decorator>
                                </Grid>

                                <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_TierDescription}" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="12,22,12,12"/>
                                <Grid x:Name="TierRewards" HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="8,0,0,8" Width="386">
                                    <UniformGrid x:Name="EmptyItems" Columns="2" Margin="0,0,8,3">
                                        <local:FZMaterial Grid.Column="0" Style="{StaticResource A_Style_FZMaterial_Empty_Tile_Outline}" Margin="0,0,3,0"/>
                                        <local:FZMaterial Grid.Column="1" Style="{StaticResource A_Style_FZMaterial_Empty_Tile_Outline}" Margin="3,0,0,0"/>
                                    </UniformGrid>
                                    <local:TickerItemsControl HorizontalAlignment="Center"
                                                      ItemsPanel="{StaticResource A_Template_RewardsPanel}"
                                                      ItemTemplate="{StaticResource A_DataTemplate_MinorObjectiveReward}"
                                                      ItemsSource="{Binding ObjectiveRewards}">
                                    </local:TickerItemsControl>
                                </Grid>
                            </Grid>
                        </DockPanel>
                    </Grid>
                    <Grid x:Name="BottomSpace"  Grid.Row="1" Margin="0,0,0,6">
                        <DockPanel HorizontalAlignment="Center" VerticalAlignment="Center">
                            <local:FZTextBlock DockPanel.Dock="Top" 
                                               x:Name="TierFooter"
                                               HorizontalAlignment="Center"
                                               Text="{Binding Tier, Converter={StaticResource A_Converter_ObjectiveTierToString}}" 
                                               Style="{StaticResource A_Style_FZTextBlock_TileTitle}"/>
                            <local:FZTextBlock HorizontalAlignment="Center"
                                               Text="{Binding Thread.Title,  RelativeSource={RelativeSource AncestorType=Page}}" 
                                               Style="{StaticResource A_Style_FZTextBlock_TileText_ImageTile}"
                                               Color="{StaticResource A_Color_Tile_Text}"/>
                        </DockPanel>
                    </Grid>
                </Grid>
            </Grid>
            <DataTemplate.Triggers>
                <DataTrigger Binding="{Binding ObjectiveComplete}" Value="{StaticResource A_Boolean_True}">
                    <Setter Property="ImageSource" TargetName="BackingGradientOutline" Value="/ForzaUI;component/Textures/Data_Bound/Series11/MinorObjectives/Gold_Background.png"/>
                    <Setter Property="ImageSource" TargetName="BackingGradient" Value="/ForzaUI;component/Textures/Data_Bound/Series11/MinorObjectives/Gold_Background.png"/>
                    <Setter Property="Color" TargetName="BackingGradientOutline" Value="#FFFFFF"/>
                    <Setter Property="Color" TargetName="BackingGradient" Value="#FFFFFF"/>
                    <Setter Property="Color" TargetName="TierFooter" Value="{StaticResource A_Color_Tile_Text}"/>
                </DataTrigger>
                <!-- First tier is thread starting-->
                <DataTrigger Binding="{Binding Tier}" Value="1">
                    <Setter Property="Visibility" TargetName="FirstTierIntroPanel" Value="Visible"/>
                    <Setter Property="Visibility" TargetName="TierRewards" Value="Collapsed"/>
                </DataTrigger>

                <DataTrigger Binding="{Binding Source={StaticResource A_Visibility_ShowForHighContrastOnly}}" Value="{x:Static Visibility.Visible}">
                    <Setter TargetName="TintPanel"
                            Property="Opacity"
                            Value="0.6" />
                </DataTrigger>
            </DataTemplate.Triggers>
        </DataTemplate>
    </Page.Resources>
    <local:UIPageTransitionManager.TransitionManager>
        <local:UIPageTransitionManager Preset="{StaticResource A_UIPageTransitionManagerPreset_Menu}" />
    </local:UIPageTransitionManager.TransitionManager>
    <Grid>
        <Control Style="{StaticResource A_Style_Control_ScreenBackground}" />

        <!-- Bars -->
        <local:PlayerBarControl Style="{StaticResource A_Style_PlayerBarControl_WithTokens}"
                                x:Name="TopBar" />
                                
        <ContentControl Style="{StaticResource A_Style_ButtonBar}"
                        x:Name="BottomBar">
            <ContentControl x:Name="DefaultHelpPanel"
                            Style="{StaticResource A_Style_ContentControl_DefaultButtonBar}"
                            local:ControllerButtonPanel.BDescription="{local:Loc HelpButtons.IDS_Back}"/>
        </ContentControl>

        <Border Style="{StaticResource A_Style_Border_ScenePadding_Opus}">
            <Grid Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_0}">
                <StackPanel Margin="0,24,0,0">
                    <ContentControl Content="{Binding Thread.Title, Converter={StaticResource A_StringToUpper}}"
                                    Style="{StaticResource A_Style_ContentControl_ScreenTitleBlock}"
                                    local:BindingProxy.A="/ForzaUI;component/Textures/Data_Bound/Series6/FestivalPass/FestivalPass_Title.png"
                                    HorizontalAlignment="Left" />
                    <Grid>
                        <local:CommonListBox x:Name="Carousel" ItemTemplate="{StaticResource A_DataTemplate_MinorObjectiveTier}"
                                         Style="{StaticResource A_Style_CommonListBox_FullScreenCarousel_MinorObjectives}"
                                         SelectedItem="{Binding SelectedItem}"
                                         ItemsSource="{Binding Collection}"
                                         local:FocusOnPageFocusGained.SelectorSelectedItem="True" />
                        <local:NavigationArrows Style="{StaticResource A_Style_Control_NavigationArrows}"
                                                Margin="-40,0,-20,0"
                                                CanSelectPrev="{Binding CanSelectPrev, ElementName=Carousel}"
                                                CanSelectNext="{Binding CanSelectNext, ElementName=Carousel}"
                                                ScrollPagePrevCommand="{Binding ScrollPagePrevCommand, ElementName=Carousel}"
                                                ScrollPageNextCommand="{Binding ScrollPageNextCommand, ElementName=Carousel}" />
                    </Grid>
                </StackPanel>
            </Grid>
        </Border>
    </Grid>
</Page>
