<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_SellSheet"
      mc:Ignorable="d"
      Style="{StaticResource A_Style_Page_Generic}"
      DataContext="{Binding RelativeSource={RelativeSource Self}}"
      Margin="0">
    <Page.Resources>
        <ResourceDictionary>


            <!-- Scene based Color Converter-->
            <local:MappingConverter x:Key="A_Scene_Color_Converter">
                <local:MappingConverterEntry Key="{x:Static local:SceneEntryEnum.PatchSellSheet}" Value="{StaticResource A_Color_Tile_AlternateBackground}"/>
            </local:MappingConverter>

            <!---TEXT Styles-->
            <!--Seasonal Events Control. Use uppercase because converter used puts all text in uppercase-->
            <Style x:Key="A_Style_FZRun_BOLD" TargetType="local:FZRun">
                <Setter Property="FontFamily" Value="Horizon_A" />
            </Style>
            <Style x:Key="A_Style_FZRun_HorizonC_BOLD" TargetType="local:FZRun">
                <Setter Property="FontFamily" Value="Horizon_C" />
            </Style>
            <Style x:Key="A_Style_FZRun_HorizonC_HIGHLIGHT" TargetType="local:FZRun" BasedOn="{StaticResource A_Style_FZRun_HorizonC_BOLD}">
                <Setter Property="Color" Value="{StaticResource H_Color_Primary_Yellow}" />
            </Style>
            <MappingConverter x:Key="A_MappingConverter_Text_SellSheet_Title">
                <MappingConverterEntry Key="{NoCase BOLD}" Value="{StaticResource A_Style_FZRun_BOLD}" />
            </MappingConverter>
            <MappingConverter x:Key="A_MappingConverter_Text_SellSheet_Desc">
                <MappingConverterEntry Key="{NoCase BOLD}" Value="{StaticResource A_Style_FZRun_HorizonC_BOLD}" />
                <MappingConverterEntry Key="{NoCase HIGHLIGHT}" Value="{StaticResource A_Style_FZRun_HorizonC_HIGHLIGHT}" />
            </MappingConverter>

            <Style x:Key="A_Style_FZTextBlock_SellSheetText" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}">
                <Setter Property="Color" Value="{StaticResource A_Color_White}"/>
                <Setter Property="FontSize" Value="24"/>
            </Style>

            <Style x:Key="A_Style_FZTextBlock_SellSheet_Title_Base" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_SellSheetText}">
                <Setter Property="TextAlignment" Value="Center"/>
                <Setter Property="MarkupConverter" Value="{StaticResource A_MappingConverter_Text_SellSheet_Title}"/>
                <Setter Property="CapHeight" Value="76"/>
                <Setter Property="LineStackingStrategy" Value="BlockLineHeight"/>
                <Setter Property="LineHeight" Value="86"/>
                <Setter Property="FontFamily" Value="Horizon_A"/>
                <Setter Property="MaxHeight" Value="150"/>
                <Setter Property="TextWrapping" Value="Wrap"/>
            </Style>

            <Style x:Key="A_Style_FZTextBlock_SellSheet_Title_Default" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_SellSheet_Title_Base}">
                <Setter Property="Text" Value="{Binding ScreenTitle, Converter={StaticResource A_StringToUpper}}"/>
            </Style>
            <Style x:Key="A_Style_FZTextBlock_SellSheet_Title_Patchnotes" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_SellSheet_Title_Default}">
                <Setter Property="CapHeight" Value="36"/>
                <Setter Property="TextWrapping" Value="NoWrap"/>
                <Setter Property="Margin" Value="0,14,0,0"/>
                <Setter Property="Color" Value="{StaticResource H_Color_Primary_Yellow}" />
            </Style>

            <local:MappingConverter x:Key="A_Scene_Title_Converter" Default="{StaticResource A_Style_FZTextBlock_SellSheet_Title_Default}">
                <local:MappingConverterEntry Key="{x:Static local:SceneEntryEnum.PatchSellSheet}" Value="{StaticResource A_Style_FZTextBlock_SellSheet_Title_Patchnotes}"/>
            </local:MappingConverter>

            <Style x:Key="A_Style_FZTextBlock_SellSheet_SubTitle_Base" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_SellSheetText}">
                <Setter Property="TextAlignment" Value="Center"/>
                <Setter Property="CapHeight" Value="36"/>
                <Setter Property="FontFamily" Value="Horizon_B"/>
                <Setter Property="Visibility" Value="Collapsed"/>
                <Setter Property="Margin" Value="0,12,0,0"/>
            </Style>

            <Style x:Key="A_Style_FZTextBlock_SellSheet_SubTitle_Default" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_SellSheet_SubTitle_Base}">
                <Setter Property="Visibility" Value="Visible"/>
            </Style>

            <local:MappingConverter x:Key="A_Scene_SubTitle_Converter" Default="{StaticResource A_Style_FZTextBlock_SellSheet_SubTitle_Base}">
                <local:MappingConverterEntry Key="{x:Static local:SceneEntryEnum.PatchSellSheet}" Value="{StaticResource A_Style_FZTextBlock_SellSheet_SubTitle_Default}"/>
            </local:MappingConverter>
            
            <Style x:Key="A_Style_FZTextBlock_SellSheet_Description" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_SellSheetText}">
                <Setter Property="FontSize" Value="29"/>
                <Setter Property="FontFamily" Value="Horizon_D"/>
                <Setter Property="TextAlignment" Value="Left"/>
                <Setter Property="TextWrapping" Value="Wrap"/>
                <Setter Property="MaxHeight" Value="500"/>
                <Setter Property="MarkupConverter" Value="{StaticResource A_MappingConverter_Text_SellSheet_Desc}"/>
                <Setter Property="Text" Value="{Binding ScreenDescription}"/>
                <Setter Property="Margin" Value="0,0,0,0"/>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding SceneEnum}" Value="{x:Static local:SceneEntryEnum.PatchSellSheet}">
                        <Setter Property="HorizontalAlignment" Value="Center"/>
                        <Setter Property="MaxWidth" Value="550"/>
                        <Setter Property="FontSize" Value="22"/>
                        <Setter Property="MaxHeight" Value="350"/>
                        <Setter Property="Margin" Value="0,-16,0,0"/>
                    </DataTrigger>
                </Style.Triggers>
            </Style>
            
            <Style x:Key="A_Style_FZTextBlock_SellSheet_ItemTitle" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_SellSheetText}">
                <Setter Property="FontSize" Value="42"/>
                <Setter Property="FontFamily" Value="Horizon_B"/>
                <Setter Property="MarkupConverter" Value="{StaticResource A_MappingConverter_Text_SellSheet_Title}"/>
            </Style>
            <Style x:Key="A_Style_FZTextBlock_SellSheet_ItemDescription" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_SellSheetText}">
                <Setter Property="CapHeight" Value="15"/>
                <Setter Property="FontFamily" Value="Horizon_D"/>
                <Setter Property="TextWrapping" Value="Wrap"/>
                <Setter Property="MarkupConverter" Value="{StaticResource A_MappingConverter_Text_SellSheet_Desc}"/>
            </Style>
            
            <!-- Material Styles-->
            <Style x:Key="A_Style_FZMaterial_ColorBar" TargetType="local:FZMaterial">
                <Setter Property="Visibility" Value="Visible"/>
                <Setter Property="Color" Value="{Binding SceneEnum, Converter={StaticResource A_Scene_Color_Converter}}"/>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding SceneEnum}" Value="{x:Static local:SceneEntryEnum.PatchSellSheet}">
                        <Setter Property="Visibility" Value="Collapsed"/>
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <local:MappingConverter x:Key="A_Converter_ActiveTrackToNewTextureLocation" Default="/ForzaUI;component/Textures/">
            </local:MappingConverter>
            
            <Style x:Key="A_Style_FZMaterial_DLC_NewTexture" TargetType="local:FZMaterial">
                <Setter Property="Color" Value="#FFFFFF" />
                <Setter Property="local:MultiStringFormatter.Format" Value="{StaticResource A_String_01FormatString}" />
                <Setter Property="local:MultiStringFormatter.Param0" Value="{Binding ActiveTrack, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_ActiveTrackToNewTextureLocation}}" />
                <Setter Property="local:MultiStringFormatter.Param1" Value="New.png" />
                <Setter Property="ImageSource" Value="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}}" />
                <Setter Property="Visibility" Value="Collapsed"/>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding ActiveTrack, RelativeSource={RelativeSource AncestorType=Page}}" Value="{x:Static local:XAMLTrack.ExpansionOne}">
                        <Setter Property="Visibility" Value="Visible"/>
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_Event_Activity" TargetType="Control">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="Control">
                            <Grid Width="174" Height="174" VerticalAlignment="Center">
                                <local:FZMaterial ImageSource="{Binding Icon}" Stretch="Uniform">
                                    <Grid Visibility="{Binding ShowNew, Converter={StaticResource A_FZBooleanToVisibilityConverter}}">
                                        <Decorator x:Name="New_Text" MaxWidth="56" VerticalAlignment="Bottom" Margin="0,0,0,46" HorizontalAlignment="Center" Visibility="Collapsed">
                                            <local:FZTextBlock Text="{local:Loc InGame.IDS_New}" Color="#FF484620" HorizontalAlignment="Center" FontSize="21" VerticalAlignment="Center" />
                                        </Decorator>

                                        <local:FZMaterial x:Name="LocalisedNewTextImage" Style="{StaticResource A_Style_FZMaterial_DLC_NewTexture}"/>
                                    </Grid>
                                </local:FZMaterial>
                            </Grid>

                            <ControlTemplate.Triggers>
                                <DataTrigger Binding="{Binding ActiveTrack, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" Value="{x:Static local:XAMLTrack.Default}">
                                    <Setter TargetName="New_Text" Property="Visibility" Value="Visible"/>
                                    <Setter TargetName="LocalisedNewTextImage" Property="Visibility" Value="Collapsed"/>
                                </DataTrigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            
            <!--Item Template for Sell sheet Event Item-->
            <DataTemplate DataType="{x:Type local:SellSheetActivityItem}">
                <DockPanel Width="700" Height="108" Margin="0,34,0,0">
                    <Decorator DockPanel.Dock="Right"  Width="530">
                        <StackPanel Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Left">
                            <local:FZTextBlock Text="{Binding Title}" Style="{StaticResource A_Style_FZTextBlock_SellSheet_ItemTitle}"/>
                            <Decorator VerticalAlignment="Bottom" HorizontalAlignment="Stretch" Margin="0,16,0,0" MaxHeight="48" >
                                <local:FZTextBlock Text="{Binding Description}" MaxHeight="58" VerticalAlignment="Center"
                                               Style="{StaticResource A_Style_FZTextBlock_SellSheet_ItemDescription}"/>
                            </Decorator>
                        </StackPanel>
                    </Decorator>
                    <Control Style="{StaticResource A_Style_Event_Activity}"/>
                </DockPanel>
            </DataTemplate>

            <Style x:Key="A_Style_Control_Reward" TargetType="Control">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="Control">
                            <Grid Width="174" Height="174" VerticalAlignment="Center">
                                <local:FZMaterial x:Name="RarityColor" Width="94" Height="94" Style="{StaticResource A_Style_FZMaterial_RewardBacking}" >
                                    <local:FZMaterial ImageSource="{Binding RewardType, Converter={StaticResource A_Converter_RewardTypeToIcon}}" Stretch="Uniform" 
                                                      Width="94" Height="94" VerticalAlignment="Bottom"/>
                                </local:FZMaterial>
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            
            <!--Item Template for Sell sheet Reward Item-->
            <DataTemplate DataType="{x:Type local:SellSheetRewardItem}">
                <DockPanel Width="700" Height="108" Margin="0,34,0,0">
                    <Decorator DockPanel.Dock="Right"  Width="530">
                        <StackPanel Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Left">
                            <local:FZTextBlock Text="{Binding RewardType, Converter={StaticResource A_Converter_RewardTypeToNewString}}" Style="{StaticResource A_Style_FZTextBlock_SellSheet_ItemTitle}" FontFamily="Horizon_A"/>
                            <Decorator Height="18"/>
                            <local:FZTextBlock Text="{Binding Description}" Margin="0,0,24,0" Style="{StaticResource A_Style_FZTextBlock_SellSheet_ItemDescription}"/>
                        </StackPanel>
                    </Decorator>
                    <Control Style="{StaticResource A_Style_Control_Reward}"/>
                </DockPanel>
            </DataTemplate>

            <Style x:Key="A_Style_FZTextblock_CommunityUpdate_TitleText" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_SellSheet_ItemTitle}">
                <Setter Property="FontFamily" Value="Horizon_A"/>
                <Setter Property="FontSize" Value="28" />
            </Style>
            <Style x:Key="A_Style_FZTextblock_CommunityUpdate_PageTitleText" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_SellSheet_ItemTitle}">
                <Setter Property="FontFamily" Value="Horizon_A" />
                <Setter Property="FontSize" Value="140" />
            </Style>

            <Style x:Key="A_Style_FZtextblock_CommunityUpdate_BodyText" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_SellSheet_ItemDescription}">
                <Style.Triggers>
                    <DataTrigger Binding="{Binding SceneEnum, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" Value="{x:Static local:SceneEntryEnum.PatchSellSheet}">
                        <Setter Property="CapHeight" Value="12"/>
                        <Setter Property="HorizontalAlignment" Value="Left" />
                    </DataTrigger>
                </Style.Triggers>
            </Style>
            
            <Style x:Key="A_Style_FZMaterial_TitleSeparator" TargetType="local:FZMaterial">
                <Setter Property="Height" Value="2"/>
                <Setter Property="Color" Value="#FFFFFFFF"/>
                <Setter Property="Opacity" Value="0.3"/>
            </Style>
            
            <Style x:Key="A_Style_FZTextBlock_PatchNotes_Page_Title" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextblock_CommunityUpdate_PageTitleText}">
                <Setter Property="Text" Value="{local:Loc ScreenTitles.IDS_SellSheet_Patch_Notes}" />
                <Setter Property="HorizontalAlignment" Value="Left" />
            </Style>
            <!--Item Template for CommunityUpdate Item. I use properties to control the item template rather tha creating a new template.-->
            <DataTemplate DataType="{x:Type local:CommunityUpdateItem}">
                <Grid x:Name="Container" Height="Auto" VerticalAlignment="Center" HorizontalAlignment="Stretch">
                    <local:FZMaterial x:Name="BulletPoint" Visibility="Visible" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="12,6,0,0" Width="5" Height="2" />
                    <local:FZTextBlock x:Name="ItemText" Text="{Binding Text}" Margin="22,0,29,30" Style="{StaticResource A_Style_FZtextblock_CommunityUpdate_BodyText}"/>
                    <local:FZMaterial x:Name="TitleSeparator" Visibility="Collapsed" VerticalAlignment="Center" Margin="12,20,0,0" Style="{StaticResource A_Style_FZMaterial_TitleSeparator}" />
                </Grid>
                <DataTemplate.Triggers>
                    <DataTrigger Binding="{Binding IsTitle}" Value="True">
                        <Setter Property="Style" TargetName="ItemText" Value="{StaticResource A_Style_FZTextblock_CommunityUpdate_TitleText}"/>
                        <Setter Property="Visibility" TargetName="TitleSeparator" Value="Visible"/>
                        <Setter Property="CapHeight" TargetName="ItemText" Value="22"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding BulletPoint}" Value="False">
                        <Setter Property="Margin" TargetName="ItemText" Value="12,0,29,24"/>
                        <Setter Property="Visibility" TargetName="BulletPoint" Value="Collapsed"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding SceneEnum, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" Value="{x:Static local:SceneEntryEnum.PatchSellSheet}">
                        <Setter Property="Width" TargetName="Container" Value="Auto"/>
                        <Setter Property="Margin" TargetName="Container" Value="12,0,0,0"/>
                    </DataTrigger>
                </DataTemplate.Triggers> 
            </DataTemplate>

            <!-- Container Style-->
            <Style x:Key="A_Style_ListBoxItem_SellSheetMenu" TargetType="ListBoxItem">
                <Setter Property="Focusable" Value="False" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="ListBoxItem">
                                <ContentPresenter />
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>

            <!-- Create custom Scroll viewer to support arrows around our scrolling. -->
            <Style TargetType="local:FZMaterial" x:Key="A_Style_FZMaterial_Arrow_Visibility_Base">
                <Setter Property="Opacity" Value="1"/>
                <Setter Property="Width" Value="18"/>
                <Setter Property="Height" Value="9"/>
                <Setter Property="Data" Value="{StaticResource A_Geometry_SpinnerArrow}" />
            </Style>
            <Style x:Key="A_Style_FZMaterial_Arrow_Top" TargetType="local:FZMaterial" BasedOn="{StaticResource A_Style_FZMaterial_Arrow_Visibility_Base}">
                <Setter Property="RenderTransform">
                    <Setter.Value>
                        <ScaleTransform ScaleY="-1" />
                    </Setter.Value>
                </Setter>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:FZScrollViewer}}, Path=(local:FZScrollViewer.IsAtTop)}" Value="True">
                        <Setter Property="Opacity" Value="0.5"/>
                    </DataTrigger>
                </Style.Triggers>
            </Style>
            <Style x:Key="A_Style_FZMaterial_Arrow_Bottom" TargetType="local:FZMaterial" BasedOn="{StaticResource A_Style_FZMaterial_Arrow_Visibility_Base}">
                <Style.Triggers>
                    <DataTrigger Binding="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:FZScrollViewer}}, Path=(local:FZScrollViewer.IsAtBottom)}" Value="True">
                        <Setter Property="Opacity" Value="0.5"/>
                    </DataTrigger>
                </Style.Triggers>
            </Style>
            <ControlTemplate x:Key="A_Style_SellSheet_FZScrollViewer" TargetType="{x:Type local:FZScrollViewer}">
                <Grid HorizontalAlignment="Left">
                    <ContentControl Style="{StaticResource A_ContentControl_HorizontalFadeViewer}">
                            <ScrollContentPresenter HorizontalAlignment="Right" CanContentScroll="True"/>
                    </ContentControl>
                    <Grid>
                        <local:FZMaterial x:Name="ScrollUpArrow" Margin="0,-10,0,0" VerticalAlignment="Top"
                                      Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
                                      Style="{StaticResource A_Style_FZMaterial_Arrow_Top}"/>
                        <ScrollBar x:Name="PART_VerticalScrollBar"
                                Background="{StaticResource A_Brush_ScrollBarBackground}"
                                Foreground="{StaticResource A_Brush_ScrollBarForeground}"
                                HorizontalAlignment="Right"
                                Minimum="0" 
                                Maximum="{TemplateBinding ScrollableHeight}" 
                                ViewportSize="{TemplateBinding ViewportHeight}" 
                                Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource Mode=TemplatedParent}}" 
                                Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" 
                                Margin="0, 0, -25, 0"
                                Style="{StaticResource A_Style_ScrollBar_Default}"/>
                        <local:FZMaterial x:Name="ScrollDownArrow" Margin="0,0,0,-20" VerticalAlignment="Bottom"
                                      Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
                                      Style="{StaticResource A_Style_FZMaterial_Arrow_Bottom}"/>
                    </Grid>
                </Grid>
            </ControlTemplate>

            <!--Adjust the item list scroll padding based on the scene we are using. We should be using specific data templates for the items -->
            <local:MappingConverter x:Key="A_MappingConverter_SceneTypeToItemMargin" Default="0,12,0,48">
                <local:MappingConverterEntry Key="{x:Static local:SceneEntryEnum.PatchSellSheet}" Value="0,10,0,6"/>
            </local:MappingConverter>

            <!--Adjust the item list max scroll based on the scene we are using. -->
            <local:MappingConverter x:Key="A_MappingConverter_SceneTypeToMaxScrollHeight" Default="496">
                <local:MappingConverterEntry Key="{x:Static local:SceneEntryEnum.PatchSellSheet}" Value="600"/>
            </local:MappingConverter>

            <Style x:Key="A_Style_Listbox_SellingItems" TargetType="local:CommonListBox">
                <Setter Property="MaxHeight" Value="{Binding SceneEnum, Converter={StaticResource A_MappingConverter_SceneTypeToMaxScrollHeight}}"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="local:CommonListBox">
                            <Grid ClipToBounds="False">
                                <local:FZScrollViewer
                                                Template="{StaticResource A_Style_SellSheet_FZScrollViewer}"
                                                Width="800"
                                                VerticalScrollBarVisibility="Auto"
                                                CanContentScroll="True"
                                                KeepSelectionOnScreen="False" Margin="0,3">
                                    <StackPanel Orientation="Vertical" IsItemsHost="True" 
                                                    Margin="{Binding SceneEnum, Converter={StaticResource A_MappingConverter_SceneTypeToItemMargin}}" 
                                                    Focusable="False"/>
                                </local:FZScrollViewer>
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
                <Setter Property="ItemContainerStyle" Value="{StaticResource A_Style_ListBoxItem_SellSheetMenu}"/>
            </Style>

            <local:MappingConverter x:Key="A_Converter_Scene_To_Background_Tint" Default="#9A000000">
              <local:MappingConverterEntry Key="{x:Static local:SceneEntryEnum.PatchSellSheet}" Value="#33000000"/>
            </local:MappingConverter>

            <Style x:Key="A_Style_FrameworkElement_Sellsheet_ContentPanel" TargetType="FrameworkElement">
                <Setter Property="Width" Value="936"/>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding SceneEnum}" Value="{x:Static local:SceneEntryEnum.PatchSellSheet}">
                        <Setter Property="Width" Value="1920"/>
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <MappingConverter x:Key="A_LangStrToSellSheetTitleMargin" Default="0">
                <MappingConverterEntry Key="CHS" Value="0,0,0,20"/>
                <MappingConverterEntry Key="CHT" Value="0,0,0,20"/>
                <MappingConverterEntry Key="JP" Value="0,0,0,16"/>
                <MappingConverterEntry Key="KO" Value="0,0,0,16"/>
            </MappingConverter>

            <Style x:Key="A_Style_Decorator_Sell_Sheet_Title" TargetType="Decorator">
                <Setter Property="Visibility" Value="Visible"/>
                <Setter Property="MaxWidth" Value="740"/>
                <Setter Property="Margin" Value="{Binding LangStr, Source={StaticResource PART_UISceneContext}, Converter={StaticResource A_LangStrToSellSheetTitleMargin}}"/>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding SceneEnum}" Value="{x:Static local:SceneEntryEnum.PatchSellSheet}">
                        <Setter Property="MaxWidth" Value="1080"/>
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_Decorator_Sell_Sheet_SubTitle" TargetType="Decorator" BasedOn="{StaticResource A_Style_Decorator_Sell_Sheet_Title}">
                <Setter Property="Margin" Value="0"/>
            </Style>
        </ResourceDictionary>
    </Page.Resources>

    <local:UIPageTransitionManager.TransitionManager>
        <local:UIPageTransitionManager Preset="{StaticResource A_UIPageTransitionManagerPreset_Menu}"/>
    </local:UIPageTransitionManager.TransitionManager>
    <Grid>
        <Grid x:Name="PART_LayoutRoot" Style="{StaticResource A_Style_FrameworkElement_LayoutRoot}">
            <Border ClipToBounds="false">
                <Grid Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_0}"
                  ClipToBounds="false">

                    <!--Background Image/video-->
                    <local:FZMaterial ImageSource="{Binding ScreenBackground}" Stretch="UniformToFill"
                                  Visibility="{Binding Downloaded, RelativeSource={RelativeSource Self}, Converter={StaticResource A_FZBooleanToVisibilityConverter}}" />

                    <!--Text and image Content resting layer -->
                    <StackPanel Orientation="Horizontal">
                        <local:FZMaterial HorizontalAlignment="Left" Width="12" Style="{StaticResource A_Style_FZMaterial_ColorBar}"/>
                        <Decorator>
                            <Grid Style="{StaticResource A_Style_FrameworkElement_Sellsheet_ContentPanel}">
                                <local:FZMaterial Style="{StaticResource A_Style_FrameworkElement_Sellsheet_ContentPanel}" Color="{Binding SceneEnum, Converter={StaticResource A_Converter_Scene_To_Background_Tint}}"/>
                                <Grid>
                                    <local:FZMaterialGlassCapture />
                                    <StackPanel x:Name="ContentBaseElement" Orientation="Horizontal"  HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,247,0,0">
                                       
                                        <StackPanel x:Name="PageInfoAndDescription" Orientation="Vertical" VerticalAlignment="Top" Margin="185,0,0,0" MaxWidth="540">
                                            <StackPanel Orientation="Vertical" x:Name="PageInfo">
                                                <local:FZTextBlock x:Name="PageTitle" Style="{StaticResource A_Style_FZTextBlock_PatchNotes_Page_Title}" />
                                                <StackPanel x:Name="PatchDate" Orientation="Vertical" MaxHeight="180">
                                                    <Decorator Style="{StaticResource A_Style_Decorator_Sell_Sheet_Title}">
                                                        <local:FZTextBlock HorizontalAlignment="Left" Style="{Binding SceneEnum, Converter={StaticResource A_Scene_Title_Converter}}"
                                                                            local:ScreenReader.Line="{Binding (Text), RelativeSource={RelativeSource Self}, Converter={StaticResource A_Converter_TrimInlineMarkup}}"
                                                                            local:ScreenReader.Event="OnLoad"
                                                                            local:ScreenReader.LineType="ScreenTitle" />
                                                    </Decorator>
                                                    <Decorator x:Name="SeasonSubText" Style="{StaticResource A_Style_Decorator_Sell_Sheet_SubTitle}">
                                                        <local:FZTextBlock HorizontalAlignment="Center" Style="{Binding SceneEnum, Converter={StaticResource A_Scene_SubTitle_Converter}}"
                                                                           local:ScreenReader.Line="{Binding Text, RelativeSource={RelativeSource Self}}"
                                                                           local:ScreenReader.Event="OnLoad"
                                                                           local:ScreenReader.LineType="ScreenSubtitle" />
                                                    </Decorator>
                                                </StackPanel>
                                            </StackPanel>
                                            <Decorator x:Name="Description" Margin="0,38,0,36" VerticalAlignment="Top">
                                                <local:FZTextBlock HorizontalAlignment="Stretch" VerticalAlignment="Top" TextWrapping="Wrap" MaxWidth="678"
                                                            Style="{StaticResource A_Style_FZTextBlock_SellSheet_Description}"
                                                            local:ScreenReader.Line="{Binding (Text), RelativeSource={RelativeSource Self}, Converter={StaticResource A_Converter_TrimInlineMarkup}}"
                                                            local:ScreenReader.Event="OnLoad"
                                                            local:ScreenReader.LineType="ScreenDescription" />
                                            </Decorator>
                                        </StackPanel>
                                        <Decorator x:Name="VerticalSpacing" Width="130" />
                                        <Decorator x:Name="PatchNotes" Height="{Binding SceneEnum, Converter={StaticResource A_MappingConverter_SceneTypeToMaxScrollHeight}}"
                                                   MaxWidth="800"
                                                   DockPanel.Dock="Bottom" 
                                                   VerticalAlignment="Top"
                                                   Margin="0,0,0,148">
                                            <StackPanel Orientation="Vertical" VerticalAlignment="Top" >
                                                <local:CommonListBox x:Name="PART_CommonListBox_SellSheetList"
                                                 ItemsSource="{Binding Items}"
                                                 HorizontalAlignment="Center"
                                                 Style="{StaticResource A_Style_Listbox_SellingItems}"/>
                                            </StackPanel>
                                        </Decorator>
                                    </StackPanel> 
                                </Grid>
                            </Grid>
                        </Decorator>
                    </StackPanel>
                </Grid>
            </Border>
        </Grid>
        <Decorator Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_0}">
            <ContentControl x:Name="BottomBar" Style="{StaticResource A_Style_ButtonBar}">
                <ContentControl x:Name="PART_DefaultHelpPanel"
                                local:ControllerButtonPanel.BDescription="{local:Loc HelpButtons.IDS_Back}"
                        Style="{StaticResource A_Style_ContentControl_DefaultButtonBar}"/>
            </ContentControl>
        </Decorator>
    </Grid>
</Page>
