<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Double
        x:Key="A_Double_PopupTextWidth">650</Double>
    <Style
        x:Key="A_Style_FZTextBlock_PopupText"
        TargetType="local:FZTextBlock"
        BasedOn="{StaticResource A_Style_FZTextBlock_Body_Tight}">
        <Setter
            Property="TextWrapping"
            Value="Wrap" />
        <Setter
            Property="Color"
            Value="{StaticResource A_Color_Body_Text}" />
        <Setter
            Property="Margin"
            Value="24" />
        <Setter
            Property="Width"
            Value="{StaticResource A_Double_PopupTextWidth}" />
        <Setter
            Property="HorizontalAlignment"
            Value="Center" />
        <Setter
            Property="TextAlignment"
            Value="Center" />
        <Setter
            Property="FontSize"
            Value="22" />
    </Style>
    <Style
        x:Key="A_Style_Decorator_MessageBox_Separator"
        TargetType="Decorator">
        <Setter
            Property="Visibility"
            Value="Collapsed" />
        <Style.Triggers>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition
                        Binding="{Binding HasOptions, FallbackValue=False}"
                        Value="True" />
                    <Condition
                        Binding="{Binding HasMessage}"
                        Value="True" />
                </MultiDataTrigger.Conditions>
                <Setter
                    Property="Visibility"
                    Value="Visible" />
            </MultiDataTrigger>
        </Style.Triggers>
    </Style>
    <Double
        x:Key="A_Double_MessageBox_Width">600</Double>
    <Double
        x:Key="A_Double_SettingsBox_Width">672</Double>

    <Double x:Key="A_Double_Default_TitleBlock_Width">668</Double>

    <Style TargetType="{x:Type local:FZRun}"
           x:Key="A_Style_Run_PopupTitleBlock_SUPERSCRIPT">
        <Setter Property="SubscriptScale" Value="-0.75" />
        <Setter Property="Converter" Value="{StaticResource A_StringToLower}" />
    </Style>

    <MappingConverter x:Key="A_MappingConverter_PopupTitleBlock">
        <MappingConverterEntry Key="{NoCase SUPERSCRIPT}" Value="{StaticResource A_Style_Run_PopupTitleBlock_SUPERSCRIPT}" />
    </MappingConverter>

    <Style
        x:Key="A_Style_ContentControl_PopupTitleBlock"
        TargetType="ContentControl">
        <Setter Property="Width"
                Value="{StaticResource A_Double_Default_TitleBlock_Width}"/>
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="ContentControl">
                    <FZMaterial
                        Style="{StaticResource H_Style_Container_PopUp_Heading}"
                        Width="{TemplateBinding Width}">
                        <FZTextBlock
                            Text="{TemplateBinding Content}"
                            MarkupConverter="{StaticResource A_MappingConverter_PopupTitleBlock}"
                            ScreenReader.Line="{TemplateBinding Content}"
                            ScreenReader.Event="OnLoad"
                            ScreenReader.LineType="ScreenTitle"
                            Style="{StaticResource H_Style_Text_Heading_28px}" />
                    </FZMaterial>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger
                Property="Content"
                Value="{Null}">
                <Setter
                    Property="Visibility"
                    Value="Collapsed" />
            </Trigger>
        </Style.Triggers>
    </Style>
     
    <ImageSource
        x:Key="A_BitmapImage_DefaultPopupIcon">/ForzaUI;component/Textures/Anthem/Icons/Titles/PopupMessageBox.png</ImageSource>
    <Style
        x:Key="A_Style_ContentControl_PopupContentBlock"
        TargetType="ContentControl">
        <Style.Resources>
            <ResourceDictionary>
                <Int32
                    x:Key="A_Int32_Icon_ZIndex">1</Int32>
            </ResourceDictionary>
        </Style.Resources>
        <Setter
            Property="Tag"
            Value="{StaticResource A_BitmapImage_DefaultPopupIcon}" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="ContentControl">
                    <FZMaterial
                        Style="{StaticResource H_Style_Container_GlassHighBlur_Description}"
                        Margin="0,0,0,2">
                        <Grid>
                            <ContentPresenter
                                Margin="0,0,0,0"
                                Panel.ZIndex="{DynamicResource A_Int32_Icon_ZIndex}" />
                        </Grid>
                    </FZMaterial>
                    <ControlTemplate.Triggers>
                        <Trigger
                            Property="Content"
                            Value="{Null}">
                            <Setter
                                Property="Visibility"
                                Value="Collapsed" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="A_Style_ContentControl_PopupContentBlock_IconFront"
        BasedOn="{StaticResource A_Style_ContentControl_PopupContentBlock}"
        TargetType="ContentControl">
        <Style.Resources>
            <ResourceDictionary>
                <Int32
                    x:Key="A_Int32_Icon_ZIndex">-1</Int32>
            </ResourceDictionary>
        </Style.Resources>
    </Style>
    <ControlTemplate
        x:Key="A_ControlTemplate_ScrollViewer_Popup_ExternalRightPosition"
        TargetType="ScrollViewer">
        <Grid>
            <Canvas
                HorizontalAlignment="Right">
                <ScrollBar
                    x:Name="PART_VerticalScrollBar"
                    HorizontalAlignment="Left"
                    Minimum="0"
                    Margin="8,0,0,0"
                    MinHeight="{Binding ActualHeight, ElementName=PART_ScrollContentPresenter}"
                    Maximum="{TemplateBinding ScrollViewer.ScrollableHeight}"
                    ViewportSize="{TemplateBinding ScrollViewer.ViewportHeight}"
                    Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"
                    Visibility="{TemplateBinding ScrollViewer.ComputedVerticalScrollBarVisibility}"
                    Style="{StaticResource A_Style_ScrollBar_TextMenu}" />
            </Canvas>
            <ScrollContentPresenter
                x:Name="PART_ScrollContentPresenter"
                Content="{TemplateBinding Content}"
                CanContentScroll="{TemplateBinding ScrollViewer.CanContentScroll}"
                ClipToBounds="True" />
        </Grid>
    </ControlTemplate>
    <Style
        x:Key="A_Style_FZRun_Popup_BOLD"
        TargetType="local:FZRun">
        <Setter
            Property="FontFamily"
            Value="Horizon_C" />
        <Setter
            Property="Color"
            Value="{StaticResource H_Color_Primary_Green}" />
    </Style>
    <Style
        x:Key="A_Style_FZRun_Popup_INLINE_INPUT"
        TargetType="Control">
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <ControllerButtonControl
                        Style="{StaticResource A_Style_ControllerButtonControl_Standalone}"
                        MinHeight="24"
                        MinWidth="24"
                        InputOverride="{Binding MarkupInput, RelativeSource={RelativeSource AncestorType=Page}, FallbackValue={Null}}"
                        AllowMouseClick="False"
                        AncestorPropertySetter.Type="{Type FZTextBlock}"
                        AncestorPropertySetter.AttachedPropertyType="{Type local:MultiStringFormatter}"
                        AncestorPropertySetter.Property="Param0"
                        AncestorPropertySetter.Value="{Binding ScreenReaderName, RelativeSource={RelativeSource Self}}"
                        AncestorPropertySetter.AllowParentBindingFailure="{StaticResource A_Boolean_True}" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style 
        x:Key="A_Style_FZRun_Popup_HIGHLIGHT"
        TargetType="FZRun">
        <Setter Property="Color" Value="{StaticResource H_Color_Primary_Yellow}"/>    
    </Style>
    <Style 
        x:Key="A_Style_FZRun_Popup_ALTHIGHLIGHT"
        TargetType="FZRun">
        <Setter Property="Color" Value="{StaticResource H_Color_Primary_Green}"/>
    </Style>
    <MappingConverter x:Key="A_MappingConverter_Popup">
        <MappingConverterEntry Key="{NoCase BOLD}" Value="{StaticResource A_Style_FZRun_Popup_BOLD}" />
        <MappingConverterEntry Key="{NoCase INLINE_INPUT}" Value="{StaticResource A_Style_FZRun_Popup_INLINE_INPUT}" />
        <MappingConverterEntry Key="{NoCase HIGHLIGHT}" Value="{StaticResource A_Style_FZRun_Popup_HIGHLIGHT}" />
        <MappingConverterEntry Key="{NoCase ALTHIGHLIGHT}" Value="{StaticResource A_Style_FZRun_Popup_ALTHIGHLIGHT}" />
        <MappingConverterEntry Key="{NoCase CREDITS}" Value="{StaticResource A_Style_FZRun_TextMenu_CREDITS}" />
        <MappingConverterEntry Key="{NoCase DJ}" Value="{StaticResource A_Style_FZRun_TextMenu_DISCOVER_JAPAN}" />
        <MappingConverterEntry Key="{NoCase HP}" Value="{StaticResource A_Style_FZRun_TextMenu_HORIZON_POINTS}" />
    </MappingConverter>
    <StringSubstitutionConverter
        x:Key="A_Converter_PopupMarkupSubstitution">
        <StringSubstitution Find="[INLINE_INPUT]" Replace="{StaticResource A_String_0FormatString}" />
        <StringSubstitution Find="[DJ]" Replace="{Loc Campaign.IDS_ScreenReader_DiscoverJapanPoints}" />
        <StringSubstitution Find="[HP]" Replace="{Loc Campaign.IDS_ScreenReader_HorizonPoints}" />
    </StringSubstitutionConverter>

    <Style x:Key="H_Style_AutoScrollPanel" TargetType="AutoScrollPanel">
        <Setter Property="ScrollType" Value="Speed" />
        <Setter Property="ScrollSeparation" Value="50" />
        <Setter Property="Speed" Value="20.0" />
        <Setter Property="ClipToBounds" Value="True" />
        <Setter Property="Focusable" Value="False" />
        <Setter Property="IsEnabled" Value="False" />
        <Setter Property="Orientation" Value="Vertical" />
        <Setter Property="AllowScrolling" Value="True" />
    </Style>

    <DataTemplate x:Key="A_DataTemplate_MultiAlignedText_DataItem">
        <DataTemplate.Resources>
            <MappingConverter x:Key="A_Converter_AlignmentTypeEnum_to_AVUI_TextAlignment" Default="{x:Static TextAlignment.Left}">
                <MappingConverterEntry Key="{X:Static AlignmentTypeEnum.Left}" Value="{x:Static TextAlignment.Left}"/>
                <MappingConverterEntry Key="{X:Static AlignmentTypeEnum.Center}" Value="{x:Static TextAlignment.Center}"/>
                <MappingConverterEntry Key="{X:Static AlignmentTypeEnum.Right}" Value="{x:Static TextAlignment.Right}"/>
            </MappingConverter>

            <MappingConverter x:Key="A_Converter_AlignmentTypeEnum_to_AVUI_HorizontalAlignment" Default="{x:Static HorizontalAlignment.Left}">
                <MappingConverterEntry Key="{X:Static AlignmentTypeEnum.Left}" Value="{x:Static HorizontalAlignment.Left}"/>
                <MappingConverterEntry Key="{X:Static AlignmentTypeEnum.Center}" Value="{x:Static HorizontalAlignment.Center}"/>
                <MappingConverterEntry Key="{X:Static AlignmentTypeEnum.Right}" Value="{x:Static HorizontalAlignment.Right}"/>
            </MappingConverter>

            <Style x:Key="A_Style_FZMaterial_BulletPoint" TargetType="FZMaterial">
                <Setter Property="Preset" Value="{Roundtangle CornerRadius=5}"/>
                <Setter Property="Width" Value="10"/>
                <Setter Property="Height" Value="10"/>
                <Setter Property="Margin" Value="10,0"/>
                <Setter Property="Visibility" Value="Collapsed"/>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding ListType}" Value="{x:Static ListTypeEnum.BulletPoint}">
                        <Setter Property="Visibility" Value="Visible"/>
                    </DataTrigger>
                </Style.Triggers>
            </Style>
        </DataTemplate.Resources>
        <DockPanel Margin="0,10"
                   HorizontalAlignment="{Binding Alignment, Converter={StaticResource A_Converter_AlignmentTypeEnum_to_AVUI_HorizontalAlignment}}">
            <FZMaterial Style="{StaticResource A_Style_FZMaterial_BulletPoint}"
                        VerticalAlignment="Top"
                        DockPanel.Dock="Left"/>
            <FZTextBlock Text="{Binding Message}"
                        TextAlignment="{Binding Alignment, Converter={StaticResource A_Converter_AlignmentTypeEnum_to_AVUI_TextAlignment}}"
                        Style="{StaticResource H_Style_Text_Description_Body_16px}"
                        HorizontalAlignment="Stretch"
                        DockPanel.Dock="Left"
                        Margin="0"
                        MultiStringFormatter.Format="{Binding ScreenReaderMessage, Converter={StaticResource A_Converter_PopupMarkupSubstitution}}"
                        ScreenReader.Line="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}, Converter={StaticResource A_Converter_TrimInlineMarkup}}"
                        ScreenReader.Event="OnLoad"
                        ScreenReader.LineType="ScreenDescription"
                        MarkupConverter="{StaticResource A_MappingConverter_Popup}"/>
        </DockPanel>
    </DataTemplate>
</ResourceDictionary>