<Page x:Class="ForzaUI.Scenes.Anthem.A_WhatsNew"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:local="clr-namespace:ForzaUI"
      xmlns:System="clr-namespace:System;assembly=mscorlib"
      Style="{StaticResource A_Style_Page_Generic}"
      DataContext="{Binding RelativeSource={RelativeSource Self}}">

    <Page.Resources>

        <local:MappingConverter x:Key="A_Converter_Season_To_String_Global_Upper">
            <local:MappingConverterEntry Key="{x:Static local:Season.Spring}"
                                         Value="{local:Loc InGame.IDS_Season_Spring_Global_Upper}" />
            <local:MappingConverterEntry Key="{x:Static local:Season.Summer}"
                                         Value="{local:Loc InGame.IDS_Season_Summer_Global_Upper}" />
            <local:MappingConverterEntry Key="{x:Static local:Season.Autumn}"
                                         Value="{local:Loc InGame.IDS_Season_Autumn_Global_Upper}" />
            <local:MappingConverterEntry Key="{x:Static local:Season.Winter}"
                                         Value="{local:Loc InGame.IDS_Season_Winter_Global_Upper}" />
        </local:MappingConverter>

        <local:MappingConverter x:Key="A_Converter_ActiveSeriesBool_To_TimerLabel"
                                Default="{Loc Festival.IDS_WhatsNew_SeriesEndsIn}">
            <local:MappingConverterEntry Key="False"
                                         Value="{Loc Festival.IDS_WhatsNew_SeriesEnded}" />
        </local:MappingConverter>

        <local:MappingConverter x:Key="A_Converter_WhatsNew_Season_To_Icon">
            <local:MappingConverterEntry Key="{x:Static local:Season.Spring}"
                                         Value="game:\Media\UI\Textures\Data_Bound\FestivalPass\Seasons\Spring.png" />
            <local:MappingConverterEntry Key="{x:Static local:Season.Summer}"
                                         Value="game:\Media\UI\Textures\Data_Bound\FestivalPass\Seasons\Summer.png" />
            <local:MappingConverterEntry Key="{x:Static local:Season.Autumn}"
                                         Value="game:\Media\UI\Textures\Data_Bound\FestivalPass\Seasons\Autumn.png" />
            <local:MappingConverterEntry Key="{x:Static local:Season.Winter}"
                                         Value="game:\Media\UI\Textures\Data_Bound\FestivalPass\Seasons\Winter.png" />
        </local:MappingConverter>
        
        <Style x:Key="A_Style_FZTextBlock_WhatsNewC"
               TargetType="local:FZTextBlock"
               BasedOn="{StaticResource A_Style_FZTextBlock_HorizonC}">
            <Setter Property="Color" Value="{StaticResource H_Color_Primary_White}" />
            <Setter Property="CapHeight" Value="34" />
            <Setter Property="MarkupConverter" Value="{StaticResource A_MappingConverter_ProgressSliderValue_Markup}" />
            <Setter Property="VerticalAlignment" Value="Center" />
            <Setter Property="TextAlignment" Value="Left" />
            <Setter Property="LineAdjust" Value="-0.725" />
        </Style>

        <Style x:Key="A_Style_WhatsNew_PageTitle"
               TargetType="local:FZTextBlock"
               BasedOn="{StaticResource A_Style_FZTextBlock_WhatsNewC}">
            <Setter Property="Color" Value="{StaticResource H_Color_Primary_White}" />
            <Setter Property="CapHeight" Value="42" />
            <Setter Property="MarkupConverter" Value="{StaticResource A_MappingConverter_ProgressSliderValue_Markup}" />
            <Setter Property="VerticalAlignment" Value="Center" />
            <Setter Property="HorizontalAlignment" Value="Left" />
            <Setter Property="Margin" Value="52,39,0,0" />
            <Setter Property="Text" Value="{Binding Title}" />
            <Setter Property="TextAlignment" Value="Left" />
            <Setter Property="LineAdjust" Value="-0.55" />
        </Style>

        <Style x:Key="A_Style_WhatsNew_PageDescription"
               TargetType="local:FZTextBlock"
               BasedOn="{StaticResource A_Style_FZTextBlock_HorizonB}">
            <Setter Property="Color" Value="{StaticResource H_Color_Primary_White}" />
            <Setter Property="CapHeight" Value="18" />
            <Setter Property="MarkupConverter" Value="{StaticResource A_MappingConverter_ProgressSliderValue_Markup}" />
            <Setter Property="VerticalAlignment" Value="Center" />
            <Setter Property="HorizontalAlignment" Value="Left" />
            <Setter Property="Margin" Value="52,29,0,0" />
            <Setter Property="Text" Value="{Binding Description}" />
            <Setter Property="TextAlignment" Value="Left" />
            <Setter Property="TextWrapping" Value="Wrap" />
            <Setter Property="Width" Value="750" />
            <Setter Property="LineAdjust" Value="-0.65" />
        </Style>

        <Style x:Key="A_Style_WhatsNew_TileTitle"
               TargetType="local:FZTextBlock"
               BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}">
            <Setter Property="Color" Value="{StaticResource H_Color_Primary_White}" />
            <Setter Property="CapHeight" Value="32" />
            <Setter Property="MarkupConverter" Value="{StaticResource A_MappingConverter_ProgressSliderValue_Markup}" />
            <Setter Property="VerticalAlignment" Value="Center" />
            <Setter Property="HorizontalAlignment" Value="Center" />
            <Setter Property="Margin" Value="0,16" />
            <Setter Property="Text" Value="{Binding Title}" />
            <Setter Property="TextAlignment" Value="Center" />
            <Setter Property="Width" Value="auto" />
        </Style>

        <Style x:Key="A_Style_WhatsNew_TileDescription"
               TargetType="local:FZTextBlock"
               BasedOn="{StaticResource A_Style_FZTextBlock_HorizonB}">
            <Setter Property="Color" Value="{StaticResource H_Color_Primary_White}" />
            <Setter Property="CapHeight" Value="16" />
            <Setter Property="MarkupConverter" Value="{StaticResource A_MappingConverter_ProgressSliderValue_Markup}" />
            <Setter Property="VerticalAlignment" Value="Top" />
            <Setter Property="HorizontalAlignment" Value="Left" />
            <Setter Property="Margin" Value="36,24" />
            <Setter Property="Text" Value="{Binding Description}" />
            <Setter Property="TextAlignment" Value="Left" />
            <Setter Property="TextWrapping" Value="Wrap" />
            <Setter Property="Width" Value="auto" />
        </Style>
        
        <Style x:Key="A_Style_FZTextBlock_WhatsNew_CarName"
                TargetType="local:FZTextBlock"
               BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}">
            <Setter Property="Color" Value="{StaticResource H_Color_Primary_White}" />
            <Setter Property="CapHeight" Value="21" />
            <Setter Property="VerticalAlignment" Value="Top" />
            <Setter Property="HorizontalAlignment" Value="Center" />
            <Setter Property="TextAlignment" Value="Center" />
            <Setter Property="Width" Value="auto" />
        </Style>

        <Style x:Key="A_Style_FZTextBlock_WhatsNew_BulletPoint"
                TargetType="local:FZTextBlock"
               BasedOn="{StaticResource A_Style_FZTextBlock_HorizonC}">
            <Setter Property="Color" Value="{StaticResource H_Color_Primary_White}" />
            <Setter Property="CapHeight" Value="23" />
            <Setter Property="MarkupConverter" Value="{StaticResource A_MappingConverter_ProgressSliderValue_Markup}" />
            <Setter Property="VerticalAlignment" Value="Center" />
            <Setter Property="HorizontalAlignment" Value="Left" />
            <Setter Property="Margin" Value="16,0"/>
            <Setter Property="TextAlignment" Value="Left" />
            <Setter Property="TextWrapping" Value="Wrap" />
            <Setter Property="Width" Value="750" />
            <Setter Property="LineAdjust" Value="-0.55" />
        </Style>

        <Style x:Key="A_Style_FZTextBlock_WhatsNew_EndsIn_Label"
               TargetType="local:FZTextBlock"
               BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}">
            <Setter Property="Color" Value="{StaticResource H_Color_Primary_White}" />
            <Setter Property="CapHeight" Value="38" />
            <Setter Property="MarkupConverter" Value="{StaticResource A_MappingConverter_ProgressSliderValue_Markup}" />
            <Setter Property="VerticalAlignment" Value="Center" />
            <Setter Property="TextAlignment" Value="Right" />
        </Style>

        <Style x:Key="A_Style_FZTextBlock_WhatsNew_EndsIn_Value"
               TargetType="local:FZTextBlock"
               BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}">
            <Setter Property="Color" Value="{StaticResource H_Color_Primary_Yellow}" />
            <Setter Property="CapHeight" Value="33" />
            <Setter Property="MarkupConverter" Value="{StaticResource A_MappingConverter_ProgressSliderValue_Markup}" />
            <Setter Property="VerticalAlignment" Value="Center" />
            <Setter Property="TextAlignment" Value="Right" />
        </Style>

        <Style x:Key="A_Style_FZMaterial_WhatsNewBackground" TargetType="FZMaterial" BasedOn="{StaticResource A_Style_FrameworkElement_FadeOnlyTransition_0}">
            <Setter Property="ImageSource"
                    Value="{Binding BackgroundPath, FallbackValue=Game:\Media\UI\Textures\Data_Bound\FestivalPass\FPDefaultBackground.png}" />
        </Style>

        <Style x:Key="A_Style_FZMaterial_WhatsNewPageIcon" TargetType="FZMaterial" BasedOn="{StaticResource A_Style_FrameworkElement_FadeOnlyTransition_0}">
            <Setter Property="ImageSource" Value="game:\Media\UI\Textures\Data_Bound\FestivalPass\Series_Highlights_Icon.png" />
            <Style.Triggers>
                <!-- change the icon when the current page is a Series Highlight -->
                <DataTrigger Binding="{Binding SelectedPage.UsePlaylistBranding}" Value="True" >
                    <Setter Property="ImageSource" Value="game:\Media\UI\Textures\Data_Bound\FestivalPass\Festival_Playlist_Branding.png" />
                </DataTrigger>
            </Style.Triggers>
        </Style>
        
        <DataTemplate DataType="{x:Type WhatsNewCar}">
            <DockPanel HorizontalAlignment="Left" Height="216" Margin="32,46,0,0">
                <FZTextBlock DockPanel.Dock="Top" Text="{Binding CarOrdinal, Converter={StaticResource A_Converter_CarNameShort}}" 
                             Style="{StaticResource A_Style_FZTextBlock_WhatsNew_CarName}"/>
                <Grid DockPanel.Dock="Bottom" 
                      HorizontalAlignment="Left" Height="34" Width="308">
                    <local:FZMaterial Preset="{Roundtangle CornerRadius=2}"
                                  VerticalAlignment="Stretch"
                                  HorizontalAlignment="Stretch"
                                  Color="{Binding Season, Converter={StaticResource A_Converter_Season_To_Color}}">
                    </local:FZMaterial>
                    <StackPanel x:Name="SeasonTitleContainer" Orientation="Horizontal">
                        <local:FZMaterial ImageSource="{Binding Season, Converter={StaticResource A_Converter_WhatsNew_Season_To_Icon}}"
                                            Width="34" Height="34"
                                            Margin="4,0"/>

                        <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_HorizonA}"
                                            Text="{Binding Season, Converter={StaticResource A_Converter_Season_To_String_Global_Upper}}"
                                            Color="{StaticResource H_Color_Primary_Black}"
                                            CapHeight="16"
                                            VerticalAlignment="Center"/>
                    </StackPanel>
                </Grid>
                
                <FZMaterial HorizontalAlignment="Center" 
                            ImageSource="{Binding CarOrdinal, Converter={CarOrdinalConverter}, ConverterParameter=thumbnail}" 
                            Stretch="Uniform"
                            Width="268" 
                            Height="150"
                            Visibility="{Binding Downloaded, RelativeSource={RelativeSource Self}, Converter={StaticResource A_FZBooleanToVisibilityConverter_UseHidden}}"/>

            </DockPanel>
        </DataTemplate>

        <ControlTemplate x:Key="A_ControlTemplate_CommonListBox_NewCars"
                         TargetType="{x:Type local:WrapListBox}">
            <DockPanel HorizontalAlignment="Center" Height="700">
                <WrapPanel IsItemsHost="True"
                           Orientation="Vertical" />
            </DockPanel>
        </ControlTemplate>

        <DataTemplate DataType="{x:Type WhatsNewPageCars}">
            <StackPanel HorizontalAlignment="Left">
                <FZTextBlock Style="{StaticResource A_Style_WhatsNew_PageTitle}"/>
                <FZTextBlock Style="{StaticResource A_Style_WhatsNew_PageDescription}"/>

                <WrapListBox HorizontalAlignment="Left" ItemsSource="{Binding NewCars}" Template="{StaticResource A_ControlTemplate_CommonListBox_NewCars}" />

            </StackPanel>
        </DataTemplate>
        
        <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPreset_Circle_WhatsNew"
                                           CornerRadius="10"/>

        <DataTemplate x:Key="A_DataTemplate_BulletPoint">
            <StackPanel Orientation="Horizontal" Margin="52,35,0,0">
                <FZMaterial Preset="{StaticResource A_FZMaterialPreset_Circle_WhatsNew}" 
                            Width="21" 
                            Height="21" 
                            Color="{StaticResource H_Color_Primary_Yellow}"
                            VerticalAlignment="Center"/>
                <FZTextBlock Style="{StaticResource A_Style_FZTextBlock_WhatsNew_BulletPoint}" 
                             Text="{Binding}"/>
            </StackPanel>
        </DataTemplate>
        
        <ControlTemplate x:Key="A_ControlTemplate_ListBox_BulletPoints"
                         TargetType="{x:Type local:WrapListBox}">
            <DockPanel HorizontalAlignment="Center" Height="700">
                <WrapPanel IsItemsHost="True"
                           Orientation="Vertical" />
            </DockPanel>
        </ControlTemplate>
        
        <DataTemplate DataType="{x:Type WhatsNewPageBulletPoints}">
            <StackPanel HorizontalAlignment="Left">
                <FZTextBlock Style="{StaticResource A_Style_WhatsNew_PageTitle}"/>
                <FZTextBlock Style="{StaticResource A_Style_WhatsNew_PageDescription}"/>
                <WrapListBox Template="{StaticResource A_ControlTemplate_ListBox_BulletPoints}"
                         ItemsSource="{Binding BulletPoints}" 
                         ItemTemplate="{StaticResource A_DataTemplate_BulletPoint}"
                         Margin="0,20,0,0"/>
            </StackPanel>
        </DataTemplate>

        <Style x:Key="A_Style_ElementWithFullscreen"
           TargetType="{x:Type FrameworkElement}">
            <Style.Triggers>
                <DataTrigger Binding="{Binding IsFullscreen}" Value="True">
                    <Setter Property="Margin" Value="{Binding FullscreenMargins}"/>
                </DataTrigger>
            </Style.Triggers>
        </Style>
        
        <DataTemplate x:Key="A_ControlTemplate_WhatsNewTile_Large">
            <StackPanel Orientation="Horizontal">
                <Grid Width="1104" Height="621" Margin="0,0,10,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>

                    <Decorator Grid.Column="0" Grid.Row="0" Grid.RowSpan="2" 
                               Visibility="{Binding ImageSourcePath, Converter={StaticResource A_StringVisConverter}}">
                        <FZMaterial ImageSource="{Binding ImageSource}" /> 
                    </Decorator>

                    <!-- black background so that in fullscreen videos at non-standard window aspect ratios, we get a pillarboxed or letterboxed theater experience instead of seeing the scene poke through on the edges -->
                    <FZMaterial Grid.Column="0" Grid.Row="0" Grid.RowSpan="2" Color="#000000" 
                                Stretch="Fill" 
                                Style="{StaticResource A_Style_ElementWithFullscreen}" 
                                Visibility="{Binding VideoSource, Converter={StaticResource A_StringVisConverter}}"/>
                    
                    <FZMediaElement
                        x:Name="PART_Video"
                        Grid.Column="0" Grid.Row="0" Grid.RowSpan="2"
                        LoadedBehavior="Play"
                        Stretch="Uniform"
                        HorizontalAlignment="Stretch"
                        VerticalAlignment="Stretch"
                        IsHitTestVisible="False"
                        Loop="True"
                        Source="{Binding VideoSource}"
                        Visibility="{Binding VideoSource, Converter={StaticResource A_StringVisConverter}}"
                        Style="{StaticResource A_Style_ElementWithFullscreen}"/>

                    <FZMaterial Grid.Column="0" Grid.Row="1" Color="#81000000"
                                Visibility="{Binding IsFullscreen, Converter={StaticResource A_FZBooleanToVisibilityConverter_UseHidden_Inverse}}"/>
                    <!-- semitransparent title bg -->
                    <FZTextBlock Grid.Column="0" Grid.Row="1" Style="{StaticResource A_Style_WhatsNew_TileTitle}"
                                 Visibility="{Binding IsFullscreen, Converter={StaticResource A_FZBooleanToVisibilityConverter_UseHidden_Inverse}}"/>
                </Grid>
                
                <!-- Description panel to the right, only if there is a provided description-->
                <Decorator Visibility="{Binding IsFullscreen, Converter={StaticResource A_FZBooleanToVisibilityConverter_UseHidden_Inverse}}">
                    <Grid Width="560" Height="621" Visibility="{Binding Description, Converter={StaticResource A_StringVisConverter}}">
                        <FZMaterial Color="#81000000"/>
                        <FZTextBlock Style="{StaticResource A_Style_WhatsNew_TileDescription}"/>
                    </Grid>
                </Decorator>
            </StackPanel>
        </DataTemplate>

        <DataTemplate x:Key="A_ControlTemplate_WhatsNewTile_Medium">
            <StackPanel Orientation="Vertical">
                <Grid Width="828" Height="466" Margin="10">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>

                    <FZMaterial Grid.Column="0" Grid.Row="0" Grid.RowSpan="2" 
                                ImageSource="{Binding ImageSource}"
                                Visibility="{Binding Downloaded, RelativeSource={RelativeSource Self}, Converter={StaticResource A_FZBooleanToVisibilityConverter_UseHidden}}"/>
                    <FZMaterial Grid.Column="0" Grid.Row="1" Color="#81000000"/>
                    <!-- semitransparent title bg -->
                    <FZTextBlock Grid.Column="0" Grid.Row="1" Style="{StaticResource A_Style_WhatsNew_TileTitle}"/>

                </Grid>

                <!-- Description panel below, only if there is a provided description-->
                <Grid Width="828" MaxHeight="162" Visibility="{Binding Description, Converter={StaticResource A_StringVisConverter}}">
                    <FZMaterial Color="#81000000"/>
                    <FZTextBlock Style="{StaticResource A_Style_WhatsNew_TileDescription}"/>
                </Grid>
            </StackPanel>
        </DataTemplate>

        <DataTemplate x:Key="A_ControlTemplate_WhatsNewTile_Small">
            <StackPanel Orientation="Vertical">
                <Grid Width="580" Height="326" Margin="6,8">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>

                    <FZMaterial Grid.Column="0" Grid.Row="0" Grid.RowSpan="2" 
                                ImageSource="{Binding ImageSource}"
                                Visibility="{Binding Downloaded, RelativeSource={RelativeSource Self}, Converter={StaticResource A_FZBooleanToVisibilityConverter_UseHidden}}"/>
                    <FZMaterial Grid.Column="0" Grid.Row="1" Color="#81000000"/>
                    <!-- semitransparent title bg -->
                    <FZTextBlock Grid.Column="0" Grid.Row="1" Style="{StaticResource A_Style_WhatsNew_TileTitle}"/>

                </Grid>

                <!-- Description panel below, only if there is a provided description-->
                <Grid Width="580" MaxHeight="162" Visibility="{Binding Description, Converter={StaticResource A_StringVisConverter}}">
                    <FZMaterial Color="#81000000"/>
                    <FZTextBlock Style="{StaticResource A_Style_WhatsNew_TileDescription}"/>
                </Grid>
            </StackPanel>
        </DataTemplate>

        <MappingConverter x:Key="A_WhatsNewTileSizeConverter"
                          Default="{StaticResource A_ControlTemplate_WhatsNewTile_Small}">
            <MappingConverterEntry Key="1" Value="{StaticResource A_ControlTemplate_WhatsNewTile_Large}" />
            <MappingConverterEntry Key="2" Value="{StaticResource A_ControlTemplate_WhatsNewTile_Medium}" />
            <MappingConverterEntry Key="3" Value="{StaticResource A_ControlTemplate_WhatsNewTile_Small}" />
        </MappingConverter>

        <ControlTemplate x:Key="A_ControlTemplate_ListBox_WhatsNewTiles"
                         TargetType="{x:Type ListBox}">
            <Decorator HorizontalAlignment="Center" Height="650">
                <WrapPanel IsItemsHost="True"
                           Orientation="Vertical" 
                           VerticalAlignment="Center"
                           HorizontalAlignment="Center"/>
            </Decorator>
        </ControlTemplate>
        
        <DataTemplate DataType="{x:Type WhatsNewPageTiled}">
            <ListBox x:Name="PART_TilesListBox"  Template="{StaticResource A_ControlTemplate_ListBox_WhatsNewTiles}"
                ItemsSource="{Binding Tiles}" 
                ItemTemplate="{Binding NumTiles, Converter={StaticResource A_WhatsNewTileSizeConverter}}"/>
        </DataTemplate>

    </Page.Resources>

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

    <Grid>
        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_Glass_ScreenBackground}" />
        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_WhatsNewBackground}" />
        <local:FZMaterialGlassCapture />

        <local:MappingConverterResourcePreloader Converter="{StaticResource A_Converter_WhatsNew_Season_To_Icon}"
                                                 ValueType="{Type BitmapImage}"/>

        <PageInputHandler x:Name="NextPageCommand"
                          Command="{Binding NextPageCommand}"
                          Button="A" />
        <PageInputHandler x:Name="PrevPageCommand"
                          Command="{Binding PrevPageCommand}"
                          Button="B" />
        <PageInputHandler x:Name="ToggleFullscreenCommand"
                          Command="{Binding ToggleFullscreenCommand}"
                          Button="X" />
        <PageInputHandler x:Name="ExitCommand"
                          Command="{Binding ExitCommand}"
                          Button="Back" />

        <Border Style="{StaticResource A_Style_FrameworkElement_LayoutRoot}">
            <StackPanel Margin="92,95,0,0"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Orientation="Horizontal"
                        Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_1}">
                <StackPanel HorizontalAlignment="Left" VerticalAlignment="Center" Orientation="Vertical" MinWidth="316">
                    <FZTextBlock x:Name="SceneTitleTextBlock"  HorizontalAlignment="Left" Text="{Loc Festival.IDS_WhatsNew_SceneTitle}" CapHeight="41" Style="{StaticResource A_Style_FZTextBlock_WhatsNewC}"/>
                    <FZTextBlock Margin="0,12" HorizontalAlignment="Left" Text="{Binding DisplayDate}"  Style="{StaticResource A_Style_FZTextBlock_WhatsNew_EndsIn_Value}"
                            local:MultiStringFormatter.Format="{local:Loc Festival.IDS_ScreenReader_Format_WhatsNew_Title}"
                            local:MultiStringFormatter.Param0="{Binding Text, ElementName=SceneTitleTextBlock}"
                            local:MultiStringFormatter.Param1="{Binding Text, RelativeSource={RelativeSource Self}}"
                            local:ScreenReader.Event="OnChange"
                            local:ScreenReader.LineType="ScreenTitle"
                            local:ScreenReader.Line="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}}"/>
                </StackPanel>
                <local:FZMaterial Height="100" Width="3" Color="{StaticResource H_Color_Primary_White}" Margin="24,0,24,0"
                                  VerticalAlignment="Center"/>
                <local:FZMaterial GetSizeFromTexture="True" HorizontalAlignment="Left" VerticalAlignment="Center"  Style="{StaticResource A_Style_FZMaterial_WhatsNewPageIcon}" />
                <local:FZTextBlock Margin="28,0"
                                   Style="{StaticResource A_Style_FZTextBlock_WhatsNewC}" 
                                   Text="{Loc Festival.IDS_WhatsNew_SeriesHighlightsTitle}"
                                   Visibility="{Binding SelectedPage.UsePlaylistBranding, Converter={StaticResource A_FZBooleanToVisibilityConverter_UseHidden_Inverse}}"/>
            </StackPanel>
        </Border>

        <Border Style="{StaticResource A_Style_Border_ScenePadding_Opus}">
            <StackPanel Orientation="Vertical"
                        Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_1}"
                        VerticalAlignment="Top"
                        Margin="40,0,0,0">
                <StackPanel  HorizontalAlignment="Right"
                             Margin="-55,-20,20,37"
                             Orientation="Vertical">
                    <local:FZTextBlock x:Name="TimerDefinitionText"
                                                Style="{StaticResource A_Style_FZTextBlock_WhatsNew_EndsIn_Label}"
                                                Text="{Binding IsActiveSeries, Converter={StaticResource A_Converter_ActiveSeriesBool_To_TimerLabel}}"
                                                VerticalAlignment="Center"
                                                HorizontalAlignment="Right"
                                                local:MultiStringFormatter.Format="{local:Loc Festival.IDS_ScreenReader_Format_WhatsNew_SeriesStatus}"
                                                local:MultiStringFormatter.Param0="{Binding Text, RelativeSource={RelativeSource Self}}"
                                                local:MultiStringFormatter.Param1="{Binding Text, ElementName=TimerValueText}"
                                                local:ScreenReader.Event="OnChange"
                                                local:ScreenReader.LineType="ScreenSubtitle"
                                                local:ScreenReader.Line="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}, Converter={StaticResource A_Converter_TrimInlineMarkup}}"                                       />
                    <DockPanel Margin="5,10,10,10"
                                LastChildFill="False"
                                Visibility="{Binding IsActiveSeries, Converter={StaticResource A_FZBooleanToVisibilityConverter_UseHidden}}">
                        <Decorator RenderTransform="{StaticResource A_Transform_Italic}"
                                        RenderTransformOrigin="0.5,0.5"
                                        DockPanel.Dock="Right">
                            <local:FZTextBlock x:Name="TimerValueText"
                                                Style="{StaticResource A_Style_FZTextBlock_WhatsNew_EndsIn_Value}"
                                                Text="{Binding SeriesEndsIn}"
                                                VerticalAlignment="Center"
                                                HorizontalAlignment="Center"/>
                        </Decorator>
                        <local:FZMaterial DockPanel.Dock="Right"
                                            Width="34"
                                            Height="34"
                                            Margin="12,0"
                                            x:Name="TimerIcon"
                                            VerticalAlignment="Center"
                                            ImageSource="/ForzaUI;component/Textures/Data_Bound/Anthem/Icons/Timer_Larger.png"
                                            Color="{StaticResource H_Color_Primary_White}"/>
                    </DockPanel>
                </StackPanel>

                <Grid Width="{StaticResource A_Double_FestivalPass_BackgroundImageWidth}"
                        Height="{StaticResource A_Double_FestivalPass_BackgroundImageHeight}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top">
                    <local:FZMaterial Width="{StaticResource A_Double_FestivalPass_BackgroundImageWidth}"
                                        Height="{StaticResource A_Double_FestivalPass_BackgroundImageHeight}"
                                        ImageSource="{Binding PlaylistPageBackgroundPath}"
                                        Visibility="{Binding SelectedPage.UsePlaylistBranding, Converter={StaticResource A_FZBooleanToVisibilityConverter}}">
                    </local:FZMaterial>
                    <ContentPresenter x:Name="PART_PageContent"  IsHitTestVisible="False" Focusable="False" Content="{Binding SelectedPage}"
                            local:ScreenReader.Line="{Binding NarratorString, Converter={StaticResource A_Converter_TrimInlineMarkup}}"
                            local:ScreenReader.LineType="SelectedDetails"
                            local:ScreenReader.Event="OnChange"/>
                </Grid>
            </StackPanel>
        </Border>

        <!-- buttonbar is after the content of the page so that when a video tile is in fullscreen mode it still renders behind the buttonbar -->
        <ContentControl Style="{StaticResource A_Style_ButtonBar}"
                        x:Name="BottomBar"
                        Visibility="{Binding ShowHelpButtonBar, Converter={StaticResource A_FZBooleanToVisibilityConverter_UseHidden}}">
            <local:ControllerButtonPanel x:Name="PART_HelpPanel"
                                         Style="{StaticResource A_Style_ControllerButtonPanel_Default}">
                <local:ControllerButtonControl Button="A"
                                               Visibility="{Binding Command.Enabled, ElementName=NextPageCommand, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"
                                               Description="{Binding Command.Name, ElementName=NextPageCommand}" />
                <local:ControllerButtonControl Button="B"
                                               Visibility="{Binding ShowPrevPageButton, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"
                                               Description="{Binding Command.Name, ElementName=PrevPageCommand}" />
                <local:ControllerButtonControl Button="X"
                                               Visibility="{Binding Command.Enabled, ElementName=ToggleFullscreenCommand, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"
                                               Description="{local:Loc HelpButtons.IDS_ToggleFullscreen}" />
                <local:ControllerButtonControl Button="Back"
                                               Visibility="{Binding Command.Enabled, ElementName=ExitCommand, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"
                                               Description="{local:Loc HelpButtons.IDS_Exit}" />
            </local:ControllerButtonPanel>
        </ContentControl>
    </Grid>
</Page>
