<Page x:Class="ForzaUI.A_NotificationLayer"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:local="clr-namespace:ForzaUI;assembly="
      xmlns:System="clr-namespace:System;assembly=mscorlib"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      mc:Ignorable="d"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      Style="{StaticResource A_Style_Page_Generic}"
      DataContext="{Binding RelativeSource={x:Static RelativeSource.Self}}">
    <Page.Resources>
        <Thickness x:Key="A_Thickness_DialogueTextInternalMargin">4,-18,4,20</Thickness>

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

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

        <Style x:Key="A_Style_Text_Subtitles"
               TargetType="{x:Type local:FZTextBlock}"
               BasedOn="{StaticResource A_Style_FZTextBlock_Body}">
            <Setter Property="Color"
                    Value="#F5F5F5" />
            <Setter Property="FontSize"
                    Value="28" />
            <Setter Property="Effect"
                    Value="{StaticResource A_DropShadowEffect_DefaultHud}" />
            <Setter Property="TextAlignment"
                    Value="Center" />
        </Style>

        <Color x:Key="A_Color_DialogueDropShadow">#B7262626</Color>
        <DropShadowEffect x:Key="A_DropShadowEffect_DialogueHud" Color="{StaticResource A_Color_DialogueDropShadow}" BlurRadius="0" ShadowDepth="1"/>

        <Style x:Key="A_Style_Text_Dialogue_Base"
               TargetType="{x:Type local:FZTextBlock}"
               BasedOn="{StaticResource A_Style_FZTextBlock_HorizonD}">
            <Setter Property="Color"
                    Value="#FFFFFF" />
            <Setter Property="Effect"
                    Value="{StaticResource A_DropShadowEffect_DefaultHud}" />
            <Setter Property="TextAlignment"
                    Value="Left" />
            <Setter Property="TextWrapping"
                    Value="Wrap" />
        </Style>

        <Style x:Key="A_Style_Text_Dialogue"
               TargetType="{x:Type local:FZTextBlock}"
               BasedOn="{StaticResource A_Style_Text_Dialogue_Base}">
            <Setter Property="LineStackingStrategy"
                    Value="BlockLineHeight" />
        </Style>

        <local:MappingConverter x:Key="A_MappingConverter_FZMaterial_Color_FromCharacterId" Default="#222222">
            <local:MappingConverterEntry Key="1" Value="{StaticResource A_Color_VO_Kiera}" />
            <local:MappingConverterEntry Key="2" Value="{StaticResource A_Color_VO_Anna}" />
            <local:MappingConverterEntry Key="3" Value="{StaticResource A_Color_VO_Alex}" />
            <local:MappingConverterEntry Key="4" Value="{StaticResource A_Color_VO_Jaimin}" />
            <local:MappingConverterEntry Key="5" Value="{StaticResource A_Color_VO_Joel}" />
            <local:MappingConverterEntry Key="6" Value="{StaticResource A_Color_VO_Mike}" />
            <local:MappingConverterEntry Key="7" Value="{StaticResource A_Color_VO_Rebecca}" />
            <local:MappingConverterEntry Key="8" Value="{StaticResource A_Color_VO_Billy}" />
            <local:MappingConverterEntry Key="9" Value="{StaticResource A_Color_VO_Hans}" />
            <local:MappingConverterEntry Key="10" Value="{StaticResource A_Color_VO_PulseDJ}" />
            <local:MappingConverterEntry Key="11" Value="{StaticResource A_Color_VO_BassArenaDJ}" />
            <local:MappingConverterEntry Key="12" Value="{StaticResource A_Color_VO_BlockPartyDJ}" />
            <local:MappingConverterEntry Key="13" Value="{StaticResource A_Color_VO_XSDJ}" />
            <local:MappingConverterEntry Key="14" Value="{StaticResource A_Color_VO_HospitalDJ}" />
            <local:MappingConverterEntry Key="15" Value="{StaticResource A_Color_VO_TimelessDJ}" />
            <local:MappingConverterEntry Key="16" Value="{StaticResource A_Color_VO_Isha}" />
            <local:MappingConverterEntry Key="17" Value="{StaticResource A_Color_VO_LaRacer}" />
            <local:MappingConverterEntry Key="18" Value="{StaticResource A_Color_VO_Robert}" />
            <local:MappingConverterEntry Key="19" Value="{StaticResource A_Color_VO_TaxiPassenger}" />
            <local:MappingConverterEntry Key="20" Value="{StaticResource A_Color_VO_TaxiPassenger}" />
            <local:MappingConverterEntry Key="21" Value="{StaticResource A_Color_VO_TaxiPassenger}" />
            <local:MappingConverterEntry Key="22" Value="{StaticResource A_Color_VO_TaxiPassenger}" />
            <local:MappingConverterEntry Key="23" Value="{StaticResource A_Color_VO_TaxiPassenger}" />
            <local:MappingConverterEntry Key="24" Value="{StaticResource A_Color_VO_TaxiPassenger}" />
            <local:MappingConverterEntry Key="25" Value="{StaticResource A_Color_VO_TaxiPassenger}" />
            <local:MappingConverterEntry Key="26" Value="{StaticResource A_Color_VO_TaxiPassenger}" />
            <local:MappingConverterEntry Key="27" Value="{StaticResource A_Color_VO_TaxiPassenger}" />
            <local:MappingConverterEntry Key="28" Value="{StaticResource A_Color_VO_TaxiPassenger}" />
            <local:MappingConverterEntry Key="29" Value="{StaticResource A_Color_VO_TaxiPassenger}" />
            <local:MappingConverterEntry Key="30" Value="{StaticResource A_Color_VO_TaxiPassenger}" />
            <local:MappingConverterEntry Key="31" Value="{StaticResource A_Color_VO_TaxiPassenger}" />
            <local:MappingConverterEntry Key="32" Value="{StaticResource A_Color_VO_TaxiPassenger}" />
            <local:MappingConverterEntry Key="33" Value="{StaticResource A_Color_VO_TaxiPassenger}" />
            <local:MappingConverterEntry Key="34" Value="{StaticResource A_Color_VO_Announcer}" />
            <local:MappingConverterEntry Key="35" Value="{StaticResource A_Color_VO_BikerRed}" />
            <local:MappingConverterEntry Key="36" Value="{StaticResource A_Color_VO_BikerBlue}" />
            <local:MappingConverterEntry Key="37" Value="{StaticResource A_Color_VO_BikerPurple}" />
            <local:MappingConverterEntry Key="38" Value="{StaticResource A_Color_VO_BikerYellow}" />
            <local:MappingConverterEntry Key="39" Value="{StaticResource A_Color_VO_Cortana}" />
            <local:MappingConverterEntry Key="40" Value="{StaticResource A_Color_VO_Marine}" />
            <local:MappingConverterEntry Key="41" Value="{StaticResource A_Color_VO_PelicanPilot}" />
            <local:MappingConverterEntry Key="42" Value="{StaticResource A_Color_VO_ScottT}" />
            <local:MappingConverterEntry Key="43" Value="{StaticResource A_Color_VO_Story11_Narrator}" />
        </local:MappingConverter>

        <Color x:Key="A_Color_VOIconBacking">#1A1A1A</Color>

        <ControlTemplate x:Key="A_ControlTemplate_VOIcon"
                         TargetType="{x:Type Control}">
            <ControlTemplate.Resources>
                <BitmapImage x:Key="A_BitmapImage_SoundBarLeft" UriSource="/ForzaUI;component/Textures/Anthem/Icons/VO/SoundBar_Left.png" />
                <BitmapImage x:Key="A_BitmapImage_SoundBarRight" UriSource="/ForzaUI;component/Textures/Anthem/Icons/VO/SoundBar_Right.png" />
                <BitmapImage x:Key="A_BitmapImage_SpeakerBackground" UriSource="/ForzaUI;component/Textures/Anthem/Icons/VO/Speaker_Background.png" />
                <BitmapImage x:Key="A_BitmapImage_SpeakerIcon" UriSource="/ForzaUI;component/Textures/Anthem/Icons/VO/Speaker_Icon.png" />

                <local:MappingConverter x:Key="A_MappingConverter_FZMaterial_Icon_FromCharacterId" Default="{x:Null}">
                    <local:MappingConverterEntry Key="10" Value="/ForzaUI;component/Textures/Anthem/Icons/VO/VO_Pulse.png" />
                    <local:MappingConverterEntry Key="11" Value="/ForzaUI;component/Textures/Anthem/Icons/VO/VO_BassArena.png" />
                    <local:MappingConverterEntry Key="12" Value="/ForzaUI;component/Textures/Anthem/Icons/VO/VO_BlockParty.png" />
                    <local:MappingConverterEntry Key="13" Value="/ForzaUI;component/Textures/Anthem/Icons/VO/VO_XS.png" />
                    <local:MappingConverterEntry Key="14" Value="/ForzaUI;component/Textures/Anthem/Icons/VO/VO_Hospital.png" />
                    <local:MappingConverterEntry Key="15" Value="/ForzaUI;component/Textures/Anthem/Icons/VO/VO_Timeless.png" />
                    <local:MappingConverterEntry Key="34" Value="/ForzaUI;component/Textures/Anthem/Icons/VO/VO_ForzathonLive.png" />
                </local:MappingConverter>

                <System:Double x:Key="A_Double_Soundbar_MinOpacity">0.3</System:Double>
                <System:Double x:Key="A_Double_Soundbar_MaxOpacity">1</System:Double>

                <Storyboard x:Key="A_Storyboard_Pulse" RepeatBehavior="Forever">
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="SoundBarRight">
                        <EasingDoubleKeyFrame KeyTime="0:0:0" Value="{StaticResource A_Double_Soundbar_MinOpacity}"/>
                        <EasingDoubleKeyFrame KeyTime="0:0:0.8" Value="{StaticResource A_Double_Soundbar_MinOpacity}"/>
                        <EasingDoubleKeyFrame KeyTime="0:0:1.06" Value="{StaticResource A_Double_Soundbar_MaxOpacity}"/>
                        <EasingDoubleKeyFrame KeyTime="0:0:1.32" Value="{StaticResource A_Double_Soundbar_MinOpacity}"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="SoundBarLeft">
                        <EasingDoubleKeyFrame KeyTime="0:0:0" Value="{StaticResource A_Double_Soundbar_MinOpacity}"/>
                        <EasingDoubleKeyFrame KeyTime="0:0:1.0" Value="{StaticResource A_Double_Soundbar_MinOpacity}"/>
                        <EasingDoubleKeyFrame KeyTime="0:0:1.26" Value="{StaticResource A_Double_Soundbar_MaxOpacity}"/>
                        <EasingDoubleKeyFrame KeyTime="0:0:1.52" Value="{StaticResource A_Double_Soundbar_MinOpacity}"/>
                        <EasingDoubleKeyFrame KeyTime="0:0:1.6" Value="{StaticResource A_Double_Soundbar_MinOpacity}"/>
                    </DoubleAnimationUsingKeyFrames>
                </Storyboard>
            </ControlTemplate.Resources>
            <local:FZMaterial x:Name="PillBacking" Height="68" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Style="{StaticResource A_Style_FZMaterial_FlatPanel_TileLeft}" Color="{StaticResource A_Color_VOIconBacking}">
                <Grid Margin="10,0,10,0">
                    <Grid x:Name="SpeakerTextures"  Margin="0,-16,0,0" Visibility="Hidden">
                        <local:FZMaterial x:Name="SpeakerBacking" Width="56" Height="50" ImageSource="{StaticResource A_BitmapImage_SpeakerBackground}" Color="{StaticResource A_Color_VOIconBacking}"  VerticalAlignment="Top"/>
                        <local:FZMaterial x:Name="SoundBarLeft" Width="56" Height="50" ImageSource="{StaticResource A_BitmapImage_SoundBarLeft}" VerticalAlignment="Top"
                                          Color="{Binding CharacterId, RelativeSource={RelativeSource AncestorType=local:DialogueControl}, Converter={StaticResource A_MappingConverter_FZMaterial_Color_FromCharacterId}}" />
                        <local:FZMaterial x:Name="SoundBarRight" Width="56" Height="50" ImageSource="{StaticResource A_BitmapImage_SoundBarRight}" VerticalAlignment="Top"
                                          Color="{Binding CharacterId, RelativeSource={RelativeSource AncestorType=local:DialogueControl}, Converter={StaticResource A_MappingConverter_FZMaterial_Color_FromCharacterId}}" />
                        <local:FZMaterial x:Name="SpeakerIcon" Width="56" Height="50" ImageSource="{StaticResource A_BitmapImage_SpeakerIcon}" VerticalAlignment="Top"
                                          Color="{Binding CharacterId, RelativeSource={RelativeSource AncestorType=local:DialogueControl}, Converter={StaticResource A_MappingConverter_FZMaterial_Color_FromCharacterId}}" />
                    </Grid>
                    <Decorator x:Name="CharacterName" Visibility="Collapsed" RenderTransformOrigin="0.5,0.5" RenderTransform="{StaticResource A_SkewTransform_HUD_Italics}" VerticalAlignment="Bottom" >
                        <local:FZTextBlock Text="{Binding CharacterDisplayName, RelativeSource={RelativeSource AncestorType=local:DialogueControl}}"
                                           Color="{Binding CharacterId, RelativeSource={RelativeSource AncestorType=local:DialogueControl}, Converter={StaticResource A_MappingConverter_FZMaterial_Color_FromCharacterId}}"
                                           CapHeight="20" HorizontalAlignment="Center" Margin="0,2,0,8"/>
                    </Decorator>
                    <local:FZMaterial x:Name="CharacterIcon" Width="78" Height="68" ImageSource="{Binding CharacterId, RelativeSource={RelativeSource AncestorType=local:DialogueControl}, Converter={StaticResource A_MappingConverter_FZMaterial_Icon_FromCharacterId}}"/>
                </Grid>
            </local:FZMaterial>
            <ControlTemplate.Triggers>
                <DataTrigger Binding="{Binding ImageSource, ElementName=CharacterIcon}" Value="{x:Null}">
                    <Setter TargetName="CharacterIcon" Property="Visibility" Value="Hidden"/>
                    <Setter TargetName="SpeakerTextures" Property="Visibility" Value="Visible"/>
                    <Setter TargetName="CharacterName" Property="Visibility" Value="Visible"/>
                </DataTrigger>
                <DataTrigger Binding="{Binding Show, RelativeSource={RelativeSource AncestorType=local:DialogueControl}}" Value="True">
                    <DataTrigger.EnterActions>
                        <BeginStoryboard Storyboard="{StaticResource A_Storyboard_Pulse}" />
                    </DataTrigger.EnterActions>
                </DataTrigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>

        <ControlTemplate x:Key="A_ControlTemplate_DialogueControl"
                         TargetType="{x:Type local:DialogueControl}">
            <ControlTemplate.Resources>
                <local:MappingConverter x:Key="A_MappingConverter_FZMaterialGlassCapture_SubtitlePositionToVisibility" Default="Visible">
                    <local:MappingConverterEntry Key="{x:Static local:DialogueSubtitlePosition.HudAnalogSpeedometer}" Value="Collapsed" />
                    <local:MappingConverterEntry Key="{x:Static local:DialogueSubtitlePosition.HudDigitalSpeedometer}" Value="Collapsed" />
                    <local:MappingConverterEntry Key="{x:Static local:DialogueSubtitlePosition.HudNoSpeedometer}" Value="Collapsed" />
                </local:MappingConverter>

                <Storyboard x:Key="A_Storyboard_Show">
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                   Storyboard.TargetName="control_root">
                        <EasingDoubleKeyFrame KeyTime="0:0:0.0"
                                              Value="0" />
                        <EasingDoubleKeyFrame KeyTime="0:0:0.3"
                                              Value="1" />
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"
                                                   Storyboard.TargetName="text_container">
                        <EasingDoubleKeyFrame KeyTime="0:0:0"
                                              Value="80" />
                        <EasingDoubleKeyFrame KeyTime="0:0:0.3"
                                              Value="0">
                            <EasingDoubleKeyFrame.EasingFunction>
                                <QuarticEase EasingMode="EaseOut" />
                            </EasingDoubleKeyFrame.EasingFunction>
                        </EasingDoubleKeyFrame>
                    </DoubleAnimationUsingKeyFrames>
                </Storyboard>
                <Storyboard x:Key="A_Storyboard_Hide">
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                   Storyboard.TargetName="control_root">
                        <EasingDoubleKeyFrame KeyTime="0:0:1.0"
                                              Value="1" />
                        <EasingDoubleKeyFrame KeyTime="0:0:1.3"
                                              Value="0" />
                    </DoubleAnimationUsingKeyFrames>
                </Storyboard>
                <local:UIStoryboard x:Key="A_Storyboard_BlendValueInputChanged">
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="{x:Null}"
                                                   FillBehavior="Stop"
                                                   Storyboard.TargetProperty="(local:BlendValue.Blend)">
                        <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                                Value="0" />
                        <EasingDoubleKeyFrame KeyTime="0:0:0.6"
                                              Value="1">
                            <EasingDoubleKeyFrame.EasingFunction>
                                <QuarticEase EasingMode="EaseOut" />
                            </EasingDoubleKeyFrame.EasingFunction>
                        </EasingDoubleKeyFrame>
                    </DoubleAnimationUsingKeyFrames>
                </local:UIStoryboard>

                <Storyboard x:Key="A_Storyboard_PleaseWait_HudAnalogSpeedometer">
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"
                                                   Storyboard.TargetName="PleaseWaitControl">
                        <EasingDoubleKeyFrame KeyTime="0:0:0.6"
                                              Value="0" >
                            <EasingDoubleKeyFrame.EasingFunction>
                                <QuarticEase EasingMode="EaseOut" />
                            </EasingDoubleKeyFrame.EasingFunction>
                        </EasingDoubleKeyFrame>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"
                                                   Storyboard.TargetName="PleaseWaitControl">
                        <EasingDoubleKeyFrame KeyTime="0:0:0.6"
                                              Value="-305" >
                            <EasingDoubleKeyFrame.EasingFunction>
                                <QuarticEase EasingMode="EaseOut" />
                            </EasingDoubleKeyFrame.EasingFunction>
                        </EasingDoubleKeyFrame>
                    </DoubleAnimationUsingKeyFrames>
                </Storyboard>
                <Storyboard x:Key="A_Storyboard_PleaseWait_HudDigitalSpeedometer">
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"
                                                   Storyboard.TargetName="PleaseWaitControl">
                        <EasingDoubleKeyFrame KeyTime="0:0:0.6"
                                              Value="0" >
                            <EasingDoubleKeyFrame.EasingFunction>
                                <QuarticEase EasingMode="EaseOut" />
                            </EasingDoubleKeyFrame.EasingFunction>
                        </EasingDoubleKeyFrame>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"
                                                   Storyboard.TargetName="PleaseWaitControl">
                        <EasingDoubleKeyFrame KeyTime="0:0:0.6"
                                              Value="-152" >
                            <EasingDoubleKeyFrame.EasingFunction>
                                <QuarticEase EasingMode="EaseOut" />
                            </EasingDoubleKeyFrame.EasingFunction>
                        </EasingDoubleKeyFrame>
                    </DoubleAnimationUsingKeyFrames>
                </Storyboard>
                <Storyboard x:Key="A_Storyboard_PleaseWait_HudNoSpeedometer">
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"
                                                   Storyboard.TargetName="PleaseWaitControl">
                        <EasingDoubleKeyFrame KeyTime="0:0:0.6"
                                              Value="0" >
                            <EasingDoubleKeyFrame.EasingFunction>
                                <QuarticEase EasingMode="EaseOut" />
                            </EasingDoubleKeyFrame.EasingFunction>
                        </EasingDoubleKeyFrame>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"
                                                   Storyboard.TargetName="PleaseWaitControl">
                        <EasingDoubleKeyFrame KeyTime="0:0:0.6"
                                              Value="-40">
                            <EasingDoubleKeyFrame.EasingFunction>
                                <QuarticEase EasingMode="EaseOut" />
                            </EasingDoubleKeyFrame.EasingFunction>
                        </EasingDoubleKeyFrame>
                    </DoubleAnimationUsingKeyFrames>
                </Storyboard>
                <Storyboard x:Key="A_Storyboard_PleaseWait_Normal">
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"
                                                   Storyboard.TargetName="PleaseWaitControl">
                        <EasingDoubleKeyFrame KeyTime="0:0:0.6"
                                              Value="0" >
                            <EasingDoubleKeyFrame.EasingFunction>
                                <QuarticEase EasingMode="EaseOut" />
                            </EasingDoubleKeyFrame.EasingFunction>
                        </EasingDoubleKeyFrame>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"
                                                   Storyboard.TargetName="PleaseWaitControl">
                        <EasingDoubleKeyFrame KeyTime="0:0:0.6"
                                              Value="0" >
                            <EasingDoubleKeyFrame.EasingFunction>
                                <QuarticEase EasingMode="EaseOut" />
                            </EasingDoubleKeyFrame.EasingFunction>
                        </EasingDoubleKeyFrame>
                    </DoubleAnimationUsingKeyFrames>
                </Storyboard>
                <Storyboard x:Key="A_Storyboard_PleaseWait_Loading">
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"
                                                   Storyboard.TargetName="PleaseWaitControl">
                        <EasingDoubleKeyFrame KeyTime="0:0:0.6"
                                              Value="0" >
                            <EasingDoubleKeyFrame.EasingFunction>
                                <QuarticEase EasingMode="EaseOut" />
                            </EasingDoubleKeyFrame.EasingFunction>
                        </EasingDoubleKeyFrame>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"
                                                   Storyboard.TargetName="PleaseWaitControl">
                        <EasingDoubleKeyFrame KeyTime="0:0:0.6"
                                              Value="5" >
                            <EasingDoubleKeyFrame.EasingFunction>
                                <QuarticEase EasingMode="EaseOut" />
                            </EasingDoubleKeyFrame.EasingFunction>
                        </EasingDoubleKeyFrame>
                    </DoubleAnimationUsingKeyFrames>
                </Storyboard>

                <!-- These converter values all work together to centre the text visually, tweak them together -->
                <local:LinearTransformConverter x:Key="A_Converter_SubtitleContainerSizeMultiLine" Scale="3.7" />
                <local:LinearTransformConverter x:Key="A_Converter_SubtitleContainerSizeSingleLine" Scale="1.6" />
                <local:LinearTransformConverter x:Key="A_Converter_SubtitleTopSpacing" Scale="0.3" />

                <Style x:Key="A_Style_FrameworkElement_SubtitlesContainerSizer"
                       TargetType="FrameworkElement">
                    <Setter Property="Height" Value="0" />
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding SubtitlesLineCount, RelativeSource={RelativeSource AncestorType={x:Type local:DialogueControl}}, Converter={StaticResource A_CompareConverter}, ConverterParameter=1}"
                                     Value="{x:Static local:CompareResult.Equal}">
                            <Setter Property="Height"
                                    Value="{Binding SubtitlesFontCapHeight, RelativeSource={RelativeSource AncestorType=local:DialogueControl}, Converter={StaticResource A_Converter_SubtitleContainerSizeSingleLine}}" />
                        </DataTrigger>
                        <DataTrigger Binding="{Binding SubtitlesLineCount, RelativeSource={RelativeSource AncestorType={x:Type local:DialogueControl}}, Converter={StaticResource A_CompareConverter}, ConverterParameter=1}"
                                     Value="{x:Static local:CompareResult.GreaterThan}">
                            <Setter Property="Height"
                                    Value="{Binding SubtitlesFontCapHeight, RelativeSource={RelativeSource AncestorType=local:DialogueControl}, Converter={StaticResource A_Converter_SubtitleContainerSizeMultiLine}}" />
                        </DataTrigger>
                    </Style.Triggers>
                </Style>

                <Style x:Key="A_Style_FrameworkElement_DialogueSubtitleRoot"
                       TargetType="FrameworkElement">
                    <Setter Property="local:BindingProxy.TunnelOut"
                            Value="{Binding A, Source={StaticResource A_GlobalStorageValue_SubtitlesHeight}, Mode=OneWayToSource}" />
                    <Setter Property="local:BindingProxy.TunnelIn"
                            Value="0" />
                    <Setter Property="MaxWidth"
                            Value="900" />
                    <Setter Property="Tag"
                            Value="{Binding SubtitlesFontCapHeight, RelativeSource={RelativeSource AncestorType=local:DialogueControl}, Converter={StaticResource A_Converter_SubtitlesFontSizeValue}}" />
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding Opacity, ElementName=control_root, Converter={StaticResource A_CompareConverter}, ConverterParameter=0}"
                                     Value="{x:Static local:CompareResult.GreaterThan}">
                            <Setter Property="local:BindingProxy.TunnelIn"
                                    Value="{Binding ActualHeight, RelativeSource={RelativeSource Self}}" />
                        </DataTrigger>
                        <DataTrigger Binding="{Binding Tag, RelativeSource={RelativeSource Self}, Converter={StaticResource A_CompareConverter}, ConverterParameter=6}"
                                     Value="{x:Static local:CompareResult.GreaterThan}">
                            <Setter Property="MaxWidth"
                                    Value="1180" />
                        </DataTrigger>
                    </Style.Triggers>
                </Style>

            </ControlTemplate.Resources>
            <Grid x:Name="control_root"
                  Opacity="0">
                <DockPanel VerticalAlignment="Bottom"
                           HorizontalAlignment="Center"
                           Style="{StaticResource A_Style_FrameworkElement_DialogueSubtitleRoot}">
                    <Grid DockPanel.Dock="Top">
                        <local:FZMaterial Color="#000000"
                                          Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterAll}"
                                          Opacity="{Binding SubtitlesBackgroundOpacity, RelativeSource={RelativeSource AncestorType=local:DialogueControl}}"
                                          Margin="-10,-5"
                                          Visibility="{Binding SubtitlesEnabled, RelativeSource={RelativeSource AncestorType=local:DialogueControl}, Converter={StaticResource A_FZBooleanToVisibilityConverter}}" />
                        <Grid>
                            <DockPanel Visibility="{Binding SubtitlesEnabled, RelativeSource={RelativeSource AncestorType=local:DialogueControl}, Converter={StaticResource A_FZBooleanToVisibilityConverter}}">
                                <StackPanel DockPanel.Dock="Left">
                                    <Decorator Height="{Binding SubtitlesFontCapHeight, RelativeSource={RelativeSource AncestorType=DialogueControl}, Converter={StaticResource A_Converter_SubtitleTopSpacing}}" />
                                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_HorizonC}"
                                                       local:MultiStringFormatter.Format="{local:Loc InGame.IDS_Subtitles_SpeakerCharacterName}"
                                                       local:MultiStringFormatter.Param0="{Binding CharacterDisplayName, RelativeSource={RelativeSource AncestorType=local:DialogueControl}}"
                                                       Text="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}}"
                                                       Color="{Binding CharacterId, RelativeSource={RelativeSource AncestorType=local:DialogueControl}, Converter={StaticResource A_MappingConverter_FZMaterial_Color_FromCharacterId}}"
                                                       CapHeight="{Binding SubtitlesFontCapHeight, RelativeSource={RelativeSource AncestorType=local:DialogueControl}}" />
                                </StackPanel>
                                <Decorator DockPanel.Dock="Left"
                                           Width="10" />
                                <Grid x:Name="text_container"
                                           ClipToBounds="True"
                                           VerticalAlignment="Center"
                                           DockPanel.Dock="Right"
                                           Style="{StaticResource A_Style_FrameworkElement_SubtitlesContainerSizer}">
                                    <Grid.RenderTransform>
                                        <TransformGroup>
                                            <ScaleTransform />
                                            <SkewTransform />
                                            <RotateTransform />
                                            <TranslateTransform />
                                        </TransformGroup>
                                    </Grid.RenderTransform>

                                    <StackPanel>
                                        <Decorator Height="{Binding SubtitlesFontCapHeight, RelativeSource={RelativeSource AncestorType=DialogueControl}, Converter={StaticResource A_Converter_SubtitleTopSpacing}}" />
                                        <Decorator>
                                            <local:FZTextBlock x:Name="text_element"
                                                               Style="{StaticResource A_Style_Text_Dialogue}"
                                                               local:TextBlockInlineMarkup.Markup="{Binding Text, RelativeSource={RelativeSource AncestorType=local:DialogueControl}}"
                                                               local:TextBlockInlineMarkup.ResourceBaseName="A_Style_FZRun_Dialog_Text_"
                                                               VerticalAlignment="Top"
                                                               Stretch="None"
                                                               CapHeight="{Binding SubtitlesFontCapHeight, RelativeSource={RelativeSource AncestorType=local:DialogueControl}}"
                                                               local:BlendValue.InputChangedStoryboard="{StaticResource A_Storyboard_BlendValueInputChanged}"
                                                               local:BlendValue.Input="{Binding TextOffset, RelativeSource={RelativeSource AncestorType=local:DialogueControl}}"
                                                               local:DialogueControl.TextHeight="{Binding ActualHeight, RelativeSource={RelativeSource Self}}"
                                                               LineHeight="{Binding SubtitlesLineHeight, RelativeSource={RelativeSource AncestorType=local:DialogueControl}}" />
                                            <Decorator.RenderTransform>
                                                <TranslateTransform Y="{Binding Path=(local:BlendValue.Output), ElementName=text_element}" />
                                            </Decorator.RenderTransform>
                                        </Decorator>
                                    </StackPanel>

                                </Grid>
                            </DockPanel>
                        </Grid>
                    </Grid>
                    <Decorator x:Name="BottomSpacing"
                               Height="70" />
                </DockPanel>
                <Grid Visibility="{Binding Blocking, RelativeSource={RelativeSource AncestorType=local:DialogueControl}, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"
                      x:Name="PleaseWaitControl">
                    <Grid.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform />
                            <SkewTransform />
                            <RotateTransform />
                            <TranslateTransform />
                        </TransformGroup>
                    </Grid.RenderTransform>
                    <Viewbox Height="60"
                             Stretch="Uniform"
                             HorizontalAlignment="Right"
                             VerticalAlignment="Bottom"
                             Margin="0,0,50,70">
                        <Grid>
                            <local:FZMaterialGlassCapture x:Name="GlassCapture" Visibility="{Binding DialoguePosition, Converter={StaticResource A_MappingConverter_FZMaterialGlassCapture_SubtitlePositionToVisibility}}"/> 
                            <StackPanel Orientation="Horizontal">
                                <Control Template="{StaticResource A_ControlTemplate_VOIcon}" />
                                <local:FZMaterial x:Name="TextBacking" Style="{StaticResource A_Style_FZMaterial_GlassPanel_Right}">
                                    <Grid Margin="12,0">
                                        <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_HorizonA}"
                                                           Color="#FFFFFF"
                                                           Text="{local:Loc Main.IDS_BlockingVO_Please_Wait_Title}"
                                                           TextAlignment="Center"
                                                           VerticalAlignment="Center"
                                                           Stretch="None"
                                                           FontSize="25"
                                                           Effect="{StaticResource A_DropShadowEffect_DefaultHud}" />
                                    </Grid>
                                </local:FZMaterial>
                            </StackPanel>
                        </Grid>
                    </Viewbox>
                </Grid>
            </Grid>
            <ControlTemplate.Triggers>
                <DataTrigger Binding="{Binding Show, RelativeSource={RelativeSource Self}}"
                             Value="True">
                    <DataTrigger.EnterActions>
                        <BeginStoryboard Storyboard="{StaticResource A_Storyboard_Show}" />
                    </DataTrigger.EnterActions>
                    <DataTrigger.ExitActions>
                        <BeginStoryboard Storyboard="{StaticResource A_Storyboard_Hide}" />
                    </DataTrigger.ExitActions>
                </DataTrigger>
                <DataTrigger Binding="{Binding DialoguePosition}" Value="{x:Static local:DialogueSubtitlePosition.HudAnalogSpeedometer}">
                    <DataTrigger.EnterActions>
                        <BeginStoryboard Storyboard="{StaticResource A_Storyboard_PleaseWait_HudAnalogSpeedometer}" />
                    </DataTrigger.EnterActions>
                </DataTrigger>
                <DataTrigger Binding="{Binding DialoguePosition}" Value="{x:Static local:DialogueSubtitlePosition.HudDigitalSpeedometer}">
                    <DataTrigger.EnterActions>
                        <BeginStoryboard Storyboard="{StaticResource A_Storyboard_PleaseWait_HudDigitalSpeedometer}" />
                    </DataTrigger.EnterActions>
                </DataTrigger>
                <DataTrigger Binding="{Binding DialoguePosition}" Value="{x:Static local:DialogueSubtitlePosition.HudNoSpeedometer}">
                    <DataTrigger.EnterActions>
                        <BeginStoryboard Storyboard="{StaticResource A_Storyboard_PleaseWait_HudNoSpeedometer}" />
                    </DataTrigger.EnterActions>
                </DataTrigger>
                <DataTrigger Binding="{Binding DialoguePosition}" Value="{x:Static local:DialogueSubtitlePosition.Normal}">
                    <DataTrigger.EnterActions>
                        <BeginStoryboard Storyboard="{StaticResource A_Storyboard_PleaseWait_Normal}" />
                    </DataTrigger.EnterActions>
                </DataTrigger>
                <DataTrigger Binding="{Binding DialoguePosition}" Value="{x:Static local:DialogueSubtitlePosition.LoadingScreens}">
                    <DataTrigger.EnterActions>
                        <BeginStoryboard Storyboard="{StaticResource A_Storyboard_PleaseWait_Loading}" />
                    </DataTrigger.EnterActions>
                </DataTrigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>

        <!--Used inside A_ControlTemplate_AuctionNotification as inline markup resource-->
        <Style TargetType="Control" x:Key="A_Style_AuctionAction_Button">
            <Setter Property="Margin"
                    Value="0,0,0,0" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Control">
                        <Viewbox Height="30"
                                 Stretch="Uniform"
                                 StretchDirection="Both">
                            <local:ControllerButtonControl Button="RTrigger"
                                                           Style="{StaticResource A_Style_ControllerButtonControl_Default_ShowAlways}"
                                                           Margin="0" />
                        </Viewbox>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <ControlTemplate x:Key="A_ControlTemplate_AuctionNotification"
                         TargetType="{x:Type Control}">
            <ControlTemplate.Resources>
                <System:Double x:Key="A_Double_Height">66</System:Double>

                <Style x:Key="A_Style_FZTextBlock_Base"
                       TargetType="{x:Type local:FZTextBlock}">
                    <Setter Property="FontFamily"
                            Value="Horizon_A" />
                    <Setter Property="FontSize"
                            Value="21" />
                    <Setter Property="Color"
                            Value="{StaticResource A_Color_Tile_Text}" />
                </Style>

            </ControlTemplate.Resources>
            <StackPanel x:Name="grid"
                        Orientation="Horizontal"
                        Opacity="1">
                <local:FZMaterial HorizontalAlignment="Left"
                                  Width="66" Height="66"
                                  Panel.ZIndex="1"
                                  Style="{StaticResource A_Style_FZMaterial_FlatPanel_LeftHeaderPanel}">
                    <local:FZMaterial ImageSource="/ForzaUI;component/Textures/Anthem/Icons/Titles/AuctionHouse.png" />
                </local:FZMaterial>
                <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_FlatPanel_TileRight}">
                    <Grid Margin="12">
                        <local:FZTextBlock Text="{Binding Title}"
                                           Style="{StaticResource A_Style_FZTextBlock_Base}"
                                           Color="{StaticResource A_Color_AuctionNotificationText}"
                                           VerticalAlignment="Top" />
                        <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_Base}"
                                           VerticalAlignment="Bottom"
                                           local:TextBlockInlineMarkup.Markup="{Binding Text}"
                                           local:TextBlockInlineMarkup.ResourceBaseName="A_Style_AuctionAction_" />
                    </Grid>
                </local:FZMaterial>
            </StackPanel>
        </ControlTemplate>

        <CubicEase x:Key="A_Easingfunction_AuctionNotification_Slide" />

        <Storyboard x:Key="A_Storyboard_ShowHUDStatusAuctionNotification">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                           Storyboard.TargetName="{x:Null}">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                        Value="0" />
                <EasingDoubleKeyFrame KeyTime="0:0:0.3"
                                      Value="1"
                                      EasingFunction="{StaticResource A_Easingfunction_AuctionNotification_Slide}" />
                <DiscreteDoubleKeyFrame KeyTime="0:0:4.3"
                                        Value="1" />
                <EasingDoubleKeyFrame KeyTime="0:0:4.6"
                                      Value="0"
                                      EasingFunction="{StaticResource A_Easingfunction_AuctionNotification_Slide}" />
            </DoubleAnimationUsingKeyFrames>
            <BooleanAnimationUsingKeyFrames Storyboard.TargetProperty="DataContext.Complete"
                                            Storyboard.TargetName="{x:Null}">
                <DiscreteBooleanKeyFrame KeyTime="0:0:0"
                                         Value="False" />
                <DiscreteBooleanKeyFrame KeyTime="0:0:4.6"
                                         Value="True" />
            </BooleanAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="A_Storyboard_HideHUDStatusAuctionNotification">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                           Storyboard.TargetName="{x:Null}">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.3"
                                        Value="0" />
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>

        <local:LinearTransformConverter x:Key="A_Converter_OneMinusX"
                                        Scale="-1.0"
                                        Add="1" />

        <Style x:Key="A_Style_FZTextBlock_WatermarkGamertag"
               TargetType="{x:Type local:FZTextBlock}"
               BasedOn="{StaticResource A_Style_FZTextBlock_HorizonB}">
            <Setter Property="Text"
                    Value="{Binding WatermarkGamertag}" />
            <Setter Property="Color"
                    Value="#FFFFFF" />
            <Setter Property="CapHeight"
                    Value="120" />
            <Setter Property="Margin"
                    Value="-100,0,-100,0" />
            <Setter Property="VerticalAlignment"
                    Value="Center" />
            <Setter Property="HorizontalAlignment"
                    Value="Center" />
            <Setter Property="TextAlignment"
                    Value="Center" />
        </Style>

        <Style x:Key="A_Style_FrameworkElement_GamertagContainer"
               TargetType="FrameworkElement">
            <Setter Property="LayoutTransform">
                <Setter.Value>
                    <TransformGroup>
                        <ScaleTransform ScaleX="{Binding Path=AutoScaleValue, Source={StaticResource PART_UIResolutionScaler}}"
                                        ScaleY="{Binding Path=AutoScaleValue, Source={StaticResource PART_UIResolutionScaler}}" />
                        <RotateTransform Angle="-30" />
                    </TransformGroup>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="A_Style_FZTextBlock_WatermarkBuildInfo"
               TargetType="{x:Type local:FZTextBlock}"
               BasedOn="{StaticResource A_Style_FZTextBlock_HorizonC}">
            <Setter Property="Text"
                    Value="{Binding WatermarkBuildInfo}" />
            <Setter Property="Color"
                    Value="#FFFFFF" />
            <Setter Property="CapHeight"
                    Value="40" />
            <Setter Property="VerticalAlignment"
                    Value="Bottom" />
            <Setter Property="HorizontalAlignment"
                    Value="Right" />
            <Setter Property="Margin"
                    Value="50,20,50,50" />
            <Setter Property="LayoutTransform">
                <Setter.Value>
                    <ScaleTransform ScaleX="{Binding Path=AutoScaleValue, Source={StaticResource PART_UIResolutionScaler}}"
                                    ScaleY="{Binding Path=AutoScaleValue, Source={StaticResource PART_UIResolutionScaler}}" />
                </Setter.Value>
            </Setter>
        </Style>

    </Page.Resources>
    <Grid Visibility="{Binding IsEnabled, Converter={StaticResource A_FZBooleanToVisibilityConverter}}">
        <Grid Style="{StaticResource A_Style_FrameworkElement_LayoutRoot}"
              HorizontalAlignment="Stretch"
              VerticalAlignment="Stretch"
              Height="Auto"
              Width="Auto">

            <local:NotificationPopupControl x:Name="HUDStatusNotificationPopup"
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Top"
                                            Margin="0,43,0,0" />
            <local:HUD321Control x:Name="HUDStatus321"
                                 Margin="0,300,0,0"
                                 VerticalAlignment="Top"
                                 HorizontalAlignment="Center" />
            <StackPanel Margin="0,0,0,128"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Bottom">
                <local:HUDRaceFinishCountdownControl x:Name="HUDStatusRaceCountdown" />
                <Decorator Height="64"
                           Visibility="{Binding IsE3, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"/>
            </StackPanel>
            <Decorator>
                <local:DialogueControl 
                        Template="{StaticResource A_ControlTemplate_DialogueControl}"
                        TextLineHeight="{Binding SubtitlesLineHeight, RelativeSource={RelativeSource Self}}">
                    <!-- The dialogue control has animations to position it for each screen. -->
                    <local:DialogueControl.Resources>
                        <Storyboard x:Key="Move_Normal">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
                                <EasingDoubleKeyFrame KeyTime="0:0:0.6"
                                                      Value="0" >
                                    <EasingDoubleKeyFrame.EasingFunction>
                                        <QuarticEase EasingMode="EaseOut" />
                                    </EasingDoubleKeyFrame.EasingFunction>
                                </EasingDoubleKeyFrame>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
                                <EasingDoubleKeyFrame KeyTime="0:0:0.6"
                                                      Value="0" >
                                    <EasingDoubleKeyFrame.EasingFunction>
                                        <QuarticEase EasingMode="EaseOut" />
                                    </EasingDoubleKeyFrame.EasingFunction>
                                </EasingDoubleKeyFrame>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="Move_LoadingScreens">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
                                <EasingDoubleKeyFrame KeyTime="0:0:0.6"
                                                      Value="0" >
                                    <EasingDoubleKeyFrame.EasingFunction>
                                        <QuarticEase EasingMode="EaseOut" />
                                    </EasingDoubleKeyFrame.EasingFunction>
                                </EasingDoubleKeyFrame>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
                                <EasingDoubleKeyFrame KeyTime="0:0:0.6"
                                                      Value="-155" >
                                    <EasingDoubleKeyFrame.EasingFunction>
                                        <QuarticEase EasingMode="EaseOut" />
                                    </EasingDoubleKeyFrame.EasingFunction>
                                </EasingDoubleKeyFrame>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </local:DialogueControl.Resources>
                    <local:DialogueControl.Style>
                        <Style TargetType="{x:Type local:DialogueControl}">
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding DialoguePosition}" Value="{x:Static local:DialogueSubtitlePosition.Normal}">
                                    <DataTrigger.EnterActions>
                                        <BeginStoryboard Storyboard="{StaticResource Move_Normal}" />
                                    </DataTrigger.EnterActions>
                                </DataTrigger>
                                <DataTrigger Binding="{Binding DialoguePosition}" Value="{x:Static local:DialogueSubtitlePosition.LoadingScreens}">
                                    <DataTrigger.EnterActions>
                                        <BeginStoryboard Storyboard="{StaticResource Move_LoadingScreens}" />
                                    </DataTrigger.EnterActions>
                                </DataTrigger>
                            </Style.Triggers>
                        </Style>
                    </local:DialogueControl.Style>
                    <local:DialogueControl.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform />
                            <SkewTransform />
                            <RotateTransform />
                            <TranslateTransform />
                        </TransformGroup>
                    </local:DialogueControl.RenderTransform>
                </local:DialogueControl>

            </Decorator>

            <local:FZTextBlock x:Name="Subtitles"
                               Style="{StaticResource A_Style_Text_Subtitles}"
                               Width="1000"
                               HorizontalAlignment="Center"
                               Margin="0,0,0,50"
                               TextWrapping="Wrap"
                               VerticalAlignment="Bottom"
                               Text="{Binding Subtitles.Subtitle}" />

            <ContentControl Style="{StaticResource A_Style_ContentControl_AnimatedTagSlideFromRight}"
                            x:Name="HUDStatusAuctionNotification"
                            Opacity="0"
                            Tag="{Binding Opacity, RelativeSource={RelativeSource Self}, Converter={StaticResource A_Converter_OneMinusX}}">
                <local:EventFire.FzTriggers>
                    <local:EventFireTrigger Event="ShowHUDStatusAuctionNotification"
                                            Storyboard="{StaticResource A_Storyboard_ShowHUDStatusAuctionNotification}" />
                    <local:EventFireTrigger Event="HideHUDStatusAuctionNotification"
                                            Storyboard="{StaticResource A_Storyboard_HideHUDStatusAuctionNotification}" />
                </local:EventFire.FzTriggers>
                <Control HorizontalAlignment="Right"
                         VerticalAlignment="Bottom"
                         Margin="0,0,78,60"
                         Effect="{StaticResource A_MotionBlurEffect}"
                         Template="{StaticResource A_ControlTemplate_AuctionNotification}" />
            </ContentControl>

            <local:FZTextBlock 
                Visibility="{Binding VideoStats.Visible, Converter={StaticResource A_FZBooleanToVisibilityConverter}, FallbackValue=Collapsed}"
                Text="{Binding VideoStats.FPS}" 
                Style="{StaticResource A_Style_Text_Dialogue}"
                Margin="5"
                VerticalAlignment="Top" 
                HorizontalAlignment="Right" />
        </Grid>
          <DockPanel x:Name="FlightingWatermark" Opacity="0.2" Visibility="{Binding ShowWatermark, Converter={StaticResource A_FZBooleanToVisibilityConverter}}">
              <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_WatermarkBuildInfo}" DockPanel.Dock="Bottom" />
        
              <UniformGrid Rows="3" Columns="5">
                  <Decorator Style="{StaticResource A_Style_FrameworkElement_GamertagContainer}">
                      <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_WatermarkGamertag}" />
                  </Decorator>
                  <Decorator Style="{StaticResource A_Style_FrameworkElement_GamertagContainer}">
                      <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_WatermarkGamertag}" />
                  </Decorator>
                  <Decorator Style="{StaticResource A_Style_FrameworkElement_GamertagContainer}">
                      <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_WatermarkGamertag}" />
                  </Decorator>
                  <Decorator Style="{StaticResource A_Style_FrameworkElement_GamertagContainer}">
                      <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_WatermarkGamertag}" />
                  </Decorator>
                  <Decorator Style="{StaticResource A_Style_FrameworkElement_GamertagContainer}">
                      <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_WatermarkGamertag}" />
                  </Decorator>
                  <Decorator Style="{StaticResource A_Style_FrameworkElement_GamertagContainer}">
                      <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_WatermarkGamertag}" />
                  </Decorator>
                  <Decorator Style="{StaticResource A_Style_FrameworkElement_GamertagContainer}">
                      <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_WatermarkGamertag}" />
                  </Decorator>
                  <Decorator Style="{StaticResource A_Style_FrameworkElement_GamertagContainer}">
                      <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_WatermarkGamertag}" />
                  </Decorator>
                  <Decorator Style="{StaticResource A_Style_FrameworkElement_GamertagContainer}">
                      <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_WatermarkGamertag}" />
                  </Decorator>
                  <Decorator Style="{StaticResource A_Style_FrameworkElement_GamertagContainer}">
                      <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_WatermarkGamertag}" />
                  </Decorator>
                  <Decorator Style="{StaticResource A_Style_FrameworkElement_GamertagContainer}">
                      <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_WatermarkGamertag}" />
                  </Decorator>
                  <Decorator Style="{StaticResource A_Style_FrameworkElement_GamertagContainer}">
                      <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_WatermarkGamertag}" />
                  </Decorator>
                  <Decorator Style="{StaticResource A_Style_FrameworkElement_GamertagContainer}">
                      <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_WatermarkGamertag}" />
                  </Decorator>
                  <Decorator Style="{StaticResource A_Style_FrameworkElement_GamertagContainer}">
                      <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_WatermarkGamertag}" />
                  </Decorator>
                  <Decorator Style="{StaticResource A_Style_FrameworkElement_GamertagContainer}">
                      <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_WatermarkGamertag}" />
                  </Decorator>
              </UniformGrid>
          </DockPanel>
    </Grid>
</Page>
