<UserControl x:Class="ForzaUI.HUDActivationControl"
             DataContext="{Binding (HUDData.Data), RelativeSource={RelativeSource Self}}" 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:local="clr-namespace:ForzaUI;assembly="
             xmlns:System="clr-namespace:System;assembly=mscorlib"
             mc:Ignorable="d"
             HorizontalAlignment="Left"
             VerticalAlignment="Bottom"
             Margin="0,0,0,507">
    <UserControl.Resources>

        <Color x:Key="A_Color_ActivationPreNameText">#FF00FFEF</Color>
        <Color x:Key="A_Color_ActivationNameText">#FFFFFFFF</Color>
        <Style TargetType="{x:Type local:FZTextBlock}"
               x:Key="A_Style_ActivationNameTextTop" 
               BasedOn="{StaticResource A_Style_FZTextBlock_HorizonE}">
            <Setter Property="Color"
                    Value="{StaticResource H_Color_Primary_White}"/>
            <Setter Property="Effect"
                    Value="{StaticResource A_DropShadowEffect_DefaultHud}" />
            <Setter Property="CapHeight"
                    Value="25" />
        </Style>
        <Style TargetType="{x:Type local:FZTextBlock}"
               x:Key="A_Style_ActivationNameTextBottom" 
               BasedOn="{StaticResource A_Style_FZTextBlock_HorizonC}">
            <Setter Property="Color"
                    Value="{StaticResource A_Color_ActivationNameText}"/>
            <Setter Property="Effect"
                    Value="{StaticResource A_DropShadowEffect_DefaultHud}" />
            <Setter Property="CapHeight"
                    Value="46" />
            <Setter Property="MaxWidth"
                    Value="800"/>
            <Setter Property="TextWrapping"
                    Value="Wrap"/>
            <Setter Property="MaxHeight"
                    Value="120"/>
            <Setter Property="LineAdjust"
                    Value="-0.66"/>
        </Style>

        <Style BasedOn="{StaticResource A_Style_FZTextBlock_HorizonB}"
               TargetType="{x:Type local:FZTextBlock}"
               x:Key="A_Style_ActivationPreNameText">
            <Setter Property="FontSize"
                    Value="36" />
            <Setter Property="Effect"
                    Value="{StaticResource A_DropShadowEffect_DefaultHud}" />
            <Setter Property="Color"
                    Value="{StaticResource A_Color_ActivationPreNameText}" />
        </Style>

        <Style BasedOn="{StaticResource A_Style_FZTextBlock_HorizonB}"
               TargetType="{x:Type local:FZTextBlock}"
               x:Key="A_Style_ActivationInstructionText">
            <Setter Property="CapHeight"
                    Value="25" />
            <Setter Property="Effect"
                    Value="{StaticResource A_DropShadowEffect_DefaultHud}" />
            <Setter Property="Color"
                    Value="{StaticResource A_Color_ActivationNameText}" />
        </Style>

        <local:UIStoryboard x:Key="Shown">
            <UIStoryboard.TriggerAnimation>
                <StartAudioTrigger EventName="AudioUITrigger_SpatialActivationSlide" TriggerAnimation.KeyTime="0:0:0"/>
            </UIStoryboard.TriggerAnimation>
            
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="TopValue"
                                           Storyboard.TargetProperty="Tag">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                        Value="1" />
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.1"
                                        Value="1" />
                <EasingDoubleKeyFrame KeyTime="0:0:0.8"
                                      Value="0">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <QuarticEase EasingMode="EaseInOut" />
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Divider"
                                           Storyboard.TargetProperty="Tag">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                        Value="1" />
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.1"
                                        Value="1" />
                <EasingDoubleKeyFrame KeyTime="0:0:0.8"
                                      Value="0">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <QuarticEase EasingMode="EaseInOut" />
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="TopValue2"
                                           Storyboard.TargetProperty="Tag">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                        Value="1" />
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.2"
                                        Value="1" />
                <EasingDoubleKeyFrame KeyTime="0:0:0.9"
                                      Value="0">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <QuarticEase EasingMode="EaseInOut" />
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="TopValue3"
                                           Storyboard.TargetProperty="Tag">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                        Value="1" />
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.2"
                                        Value="1" />
                <EasingDoubleKeyFrame KeyTime="0:0:0.9"
                                      Value="0">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <QuarticEase EasingMode="EaseInOut" />
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_TopIcon"
                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                <EasingDoubleKeyFrame KeyTime="0:0:0.6"
                                      Value="1">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <QuarticEase EasingMode="EaseOut" />
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_TopIcon"
                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                <EasingDoubleKeyFrame KeyTime="0:0:0.6"
                                      Value="1">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <QuarticEase EasingMode="EaseOut" />
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_TopIcon"
                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(TranslateTransform.X)">
                <EasingDoubleKeyFrame KeyTime="0:0:0.6"
                                      Value="0">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <QuarticEase EasingMode="EaseOut" />
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_TopIcon"
                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(TranslateTransform.Y)">
                <EasingDoubleKeyFrame KeyTime="0:0:0.6"
                                      Value="0">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <QuarticEase EasingMode="EaseOut" />
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="OuterPanel"
                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                <EasingDoubleKeyFrame KeyTime="0:0:0"
                                      Value="1" />
            </DoubleAnimationUsingKeyFrames>

            <StringAnimationUsingKeyFrames Storyboard.TargetName="ShowAudioEvent"
                                           Storyboard.TargetProperty="(local:AudioEvent.SoundName)">
                <DiscreteStringKeyFrame KeyTime="0"
                                        Value="/Master/UI/Race/HZ2_SFX_HUD_Race_SignUp_01" />
                <DiscreteStringKeyFrame KeyTime="0:0:1"
                                        Value="" />
            </StringAnimationUsingKeyFrames>
        </local:UIStoryboard>
        <local:UIStoryboard x:Key="Hidden"
                            DurationOverride="0:0:0.3">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="OuterPanel"
                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                <EasingDoubleKeyFrame KeyTime="0:0:1"
                                      Value="0" />
            </DoubleAnimationUsingKeyFrames>
            <!--BooleanAnimationUsingKeyFrames Storyboard.TargetName="OuterPanel"
                                            Storyboard.TargetProperty="DataContext.Complete">
                <DiscreteBooleanKeyFrame KeyTime="0:0:1"
                                         Value="True" />
            </BooleanAnimationUsingKeyFrames-->
        </local:UIStoryboard>

        <!-- Any position overrides for the spatial icons need to live in here. -->
        <local:MappingConverter x:Key="A_MappingConverter_ScaleTransform_Scale_FromDataType" Default="1">
            <local:MappingConverterEntry Key="{x:Type local:DeprecatedAugmentedRealityDataSource}" Value="1" />
        </local:MappingConverter>

        <MappingConverter x:Key="A_LangStrToThicknessConverter_Hud_TopValue_Space" Default="0,0,0,0">
            <MappingConverterEntry Key="CHS" Value="0,0,0,4"/>
            <MappingConverterEntry Key="CHT" Value="0,0,0,4"/>
            <MappingConverterEntry Key="CZ" Value="0,0,0,12"/>
            <MappingConverterEntry Key="DE" Value="0,0,0,10"/>
            <MappingConverterEntry Key="TR" Value="0,0,0,10"/>
        </MappingConverter>

        <MappingConverter x:Key="A_LangStrToThicknessConverter_Hud_TopValue2_Space" Default="0,0,0,0">
            <MappingConverterEntry Key="CHS" Value="0,0,0,8"/>
            <MappingConverterEntry Key="CHT" Value="0,0,0,8"/>
            <MappingConverterEntry Key="CZ" Value="0,0,0,4"/>
            <MappingConverterEntry Key="DE" Value="0,0,0,2"/>
            <MappingConverterEntry Key="TR" Value="0,0,0,2"/>
        </MappingConverter>

        <Style TargetType="{x:Type FrameworkElement}"
               x:Key="A_Style_FrameworkElement_ActivationMessageFormat">
            <Setter Property="local:MultiStringFormatter.Param0" Value="{Binding NameLine1Text, Converter={StaticResource A_Converter_TrimInlineMarkup}}"/>
            <Setter Property="local:MultiStringFormatter.Param1" Value="{Binding NameLine2Text, Converter={StaticResource A_Converter_TrimInlineMarkup}}"/>
            <Setter Property="local:MultiStringFormatter.Format" Value=""/>
            <Setter Property="local:ScreenReader.LineType" Value="NotificationTitle"/>
            <Setter Property="local:ScreenReader.Event" Value="OnChange"/>
            <Setter Property="local:ManualPassthroughProperty.Input" Value="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}}"/>
            <Setter Property="local:ManualPassthroughProperty.Allowed" Value="True"/>
            <Setter Property="local:ScreenReader.Line" Value="{Binding (local:ManualPassthroughProperty.Output), RelativeSource={RelativeSource Self}}"/>
            <Style.Triggers>
                <DataTrigger Binding="{Binding Opacity, ElementName=OuterPanel}" Value="0">
                    <Setter Property="local:ManualPassthroughProperty.Allowed" Value="False"/>
                </DataTrigger>
                <DataTrigger Binding="{Binding NameLine1Text, Converter={StaticResource A_StringVisConverter}}" Value="{x:Static Visibility.Visible}">
                    <Setter Property="local:MultiStringFormatter.Format" Value="{local:Loc Main.IDS_ScreenReader_Format_Tile_HeadingOnly}"/>
                </DataTrigger>
                <DataTrigger Binding="{Binding NameLine2Text, Converter={StaticResource A_StringVisConverter}}" Value="{x:Static Visibility.Visible}">
                    <Setter Property="local:MultiStringFormatter.Format" Value="{local:Loc Main.IDS_ScreenReader_Format_Tile_DescriptionOnly}"/>
                </DataTrigger>
                <MultiDataTrigger>
                    <MultiDataTrigger.Conditions>
                        <Condition Binding="{Binding NameLine1Text, Converter={StaticResource A_StringVisConverter}}" Value="{x:Static Visibility.Visible}" />
                        <Condition Binding="{Binding NameLine2Text, Converter={StaticResource A_StringVisConverter}}" Value="{x:Static Visibility.Visible}" />
                    </MultiDataTrigger.Conditions>
                    <Setter Property="local:MultiStringFormatter.Format" Value="{local:Loc Main.IDS_ScreenReader_Format_Tile_HeadingAndDescription}"/>
                </MultiDataTrigger>
            </Style.Triggers>
        </Style>

        <Style TargetType="{x:Type FrameworkElement}"
               x:Key="A_Style_FrameworkElement_ActivationButtonPromptFormat">
            <Setter Property="local:MultiStringFormatter.Param0" Value="{Binding ScreenReaderName, ElementName=PART_ActivationButtonControl}"/>
            <Setter Property="local:MultiStringFormatter.Param1" Value="{Binding InstructionText, Converter={StaticResource A_Converter_TrimInlineMarkup}}"/>
            <Setter Property="local:MultiStringFormatter.Format" Value="{local:Loc Main.IDS_ScreenReader_Format_Tile_HeadingAndDescription}"/>
            <Setter Property="local:ScreenReader.LineType" Value="NotificationPrompt"/>
            <Setter Property="local:ScreenReader.Event" Value="OnChange"/>
            <Setter Property="local:ManualPassthroughProperty.Input" Value="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}}"/>
            <Setter Property="local:ManualPassthroughProperty.Allowed" Value="True"/>
            <Setter Property="local:ScreenReader.Line" Value="{Binding (local:ManualPassthroughProperty.Output), RelativeSource={RelativeSource Self}}"/>
            <Style.Triggers>
                <DataTrigger Binding="{Binding Opacity, ElementName=OuterPanel}" Value="0">
                    <Setter Property="local:ManualPassthroughProperty.Allowed" Value="False"/>
                </DataTrigger>
                <DataTrigger Binding="{Binding ActivateCommand.Enabled}" Value="False">
                    <Setter Property="local:MultiStringFormatter.Param0" Value="{local:Loc GameOptions2.IDS_QuickChat_ScreenReader_ItemState_Locked}"/>
                </DataTrigger>
            </Style.Triggers>
        </Style>

    </UserControl.Resources>
    <local:EventFire.FzTriggers>
        <local:EventFireTrigger Event="PART_Shown"
                                Storyboard="{StaticResource Shown}" />
        <local:EventFireTrigger Event="PART_Hidden"
                                Storyboard="{StaticResource Hidden}" />
    </local:EventFire.FzTriggers>
    <Grid x:Name="OuterPanel"
          Opacity="0">
        <Decorator Margin="-60,-20,-250,-20"
                   Visibility="{StaticResource A_Visibility_ShowForHighContrastOnly}">
            <Decorator.OpacityMask>
                <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
                    <GradientStop Color="White" Offset="0.8"/>
                    <GradientStop Color="Transparent" Offset="1"/>
                </LinearGradientBrush>
            </Decorator.OpacityMask>
            <local:FZMaterial Color="{StaticResource A_Color_ActivationSpatial2DBackground}"
                              Preset="{StaticResource H_Roundtangle_Outer_3px}"
                              Opacity="0.7"/>
        </Decorator>

        <StackPanel Orientation="Vertical"
                    VerticalAlignment="Bottom"
                    HorizontalAlignment="Left">
            <StackPanel.Resources>
                <Style TargetType="{x:Type local:FZRun}"
                       x:Key="A_Style_Run_ActivationPreName_0">
                    <Setter Property="Color"
                            Value="{StaticResource A_Color_ActivationNameText}" />
                </Style>
                <MappingConverter x:Key="A_MappingConverter_ActivationPreName" >
                    <MappingConverterEntry Key="{NoCase 0}" Value="{StaticResource A_Style_Run_ActivationPreName_0}" />
                </MappingConverter>
                <Style TargetType="{x:Type local:FZRun}"
                       x:Key="A_Style_Run_ActivationName_0">
                    <Setter Property="FontFamily"
                            Value="Horizon_B"/>
                </Style>
                <MappingConverter x:Key="A_MappingConverter_ActivationName" >
                    <MappingConverterEntry Key="{NoCase 0}" Value="{StaticResource A_Style_Run_ActivationName_0}" />
                </MappingConverter>
                <Style TargetType="{x:Type Run}"
                       x:Key="A_Style_Run_ActivationInstructionName_0">
                    <Setter Property="Foreground">
                        <Setter.Value>
                            <SolidColorBrush Color="{StaticResource A_Color_ActivationPreNameText}" />
                        </Setter.Value>
                    </Setter>
                </Style>
                <MappingConverter x:Key="A_MappingConverter_ActivationInstructionName" >
                    <MappingConverterEntry Key="{NoCase 0}" Value="{StaticResource A_Style_Run_ActivationInstructionName_0}" />
                </MappingConverter>
            </StackPanel.Resources>
            <Decorator HorizontalAlignment="Left" 
                       VerticalAlignment="Bottom"
                       x:Name="TopIconContainer">
                <Decorator.LayoutTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="{Binding AugmentedRealityData.ObjectType, Converter={StaticResource A_MappingConverter_ScaleTransform_Scale_FromDataType}}" 
                                        ScaleY="{Binding AugmentedRealityData.ObjectType, Converter={StaticResource A_MappingConverter_ScaleTransform_Scale_FromDataType}}"/>
                        <SkewTransform/>
                        <TranslateTransform/>
                        <RotateTransform/>
                    </TransformGroup>
                </Decorator.LayoutTransform>
                <Viewbox StretchDirection="DownOnly" Height="100">
                    <ContentControl x:Name="PART_TopIcon"
                                Content="{Binding AugmentedRealityData}"
                                Effect="{StaticResource A_MotionBlurEffect}"
                                Style="{StaticResource A_Style_ContentControl_SpatialIcon_ForHUD}">
                        <ContentControl.RenderTransform>
                            <TransformGroup>
                                <ScaleTransform/>
                                <SkewTransform/>
                                <TranslateTransform/>
                                <RotateTransform/>
                            </TransformGroup>
                        </ContentControl.RenderTransform>
                    </ContentControl>
                </Viewbox>
            </Decorator>

            <FrameworkElement x:Name="IconToLine1Div2d" Height="26"/>

            <Viewbox HorizontalAlignment="Left"
                     VerticalAlignment="Top"
                     MaxWidth="912"
                     StretchDirection="DownOnly"
                     Style="{StaticResource A_Style_FrameworkElement_ActivationMessageFormat}">
                <StackPanel Orientation="Vertical">
                    <ContentControl Style="{StaticResource A_Style_ContentControl_AnimatedTagSlideFromLeft_HUD}"
                                    x:Name="TopValue" Margin="{Binding LangStr, Source={StaticResource PART_UISceneContext}, Converter={StaticResource A_LangStrToThicknessConverter_Hud_TopValue_Space}}">
                        <Decorator x:Name="TopValueContainer" LayoutTransform="{StaticResource A_SkewTransform_HUD_Italics}">
                            <local:FZTextBlock Style="{StaticResource A_Style_ActivationNameTextTop}"
                                               Text="{Binding NameLine1Text, Converter={StaticResource A_StringToUpper}}"
                                               Margin="0,0,3,0"
                                               Visibility="{Binding NameLine1Text, Converter={StaticResource A_StringVisConverter}}"/>
                        </Decorator>
                    </ContentControl>

                    <ContentControl x:Name="Divider"
                                    HorizontalAlignment="Left"
                                    Margin="0,17,0,0"
                                    VerticalAlignment="Top"
                                    Visibility="{Binding NameLine1Text, Converter={StaticResource A_StringVisConverter}}"
                                    Style="{StaticResource A_Style_ContentControl_AnimatedTagSlideFromLeft_HUD}">
                        <Grid>
                            <!-- These framework elements help choose the proper width for the divider. They allow to select the max width of the two texts -->
                            <FrameworkElement Width="{Binding ActualWidth, ElementName=TopValue2TextContainer}" MaxWidth="800"/>
                            <FrameworkElement Width="{Binding ActualWidth, ElementName=TopValueContainer}" MaxWidth="800"/>
                            
                            <ContentControl Template="{StaticResource A_ControlTemplate_SpatialDividerTemplate}" Content="{Binding AugmentedRealityData}" MinWidth="200" Height="6"/>
                        </Grid>
                    </ContentControl>

                    <FrameworkElement x:Name="Line1ToLine2Div2d"
                                      Height="19"
                                      Visibility="{Binding NameLine2Text, Converter={StaticResource A_StringVisConverter}}"/>

                    <ContentControl Style="{StaticResource A_Style_ContentControl_AnimatedTagSlideFromLeft_HUD}"
                                    x:Name="TopValue2" Margin="{Binding LangStr, Source={StaticResource PART_UISceneContext}, Converter={StaticResource A_LangStrToThicknessConverter_Hud_TopValue2_Space}}">
                        <Decorator x:Name="TopValue2TextContainer"
                                   LayoutTransform="{StaticResource A_SkewTransform_HUD_Italics}">
                            <local:FZTextBlock Style="{StaticResource A_Style_ActivationNameTextBottom}"
                                               Text="{Binding NameLine2Text}"
                                               MarkupConverter="{StaticResource A_MappingConverter_ActivationName}"
                                               Margin="0,0,3,0"
                                               Visibility="{Binding NameLine2Text, Converter={StaticResource A_StringVisConverter}}"/>
                        </Decorator>
                    </ContentControl>
                </StackPanel>
            </Viewbox>

            <FrameworkElement x:Name="Line2ToHeader2Div2d"
                              Visibility="{Binding HeaderText, Converter={StaticResource A_StringVisConverter}}"
                              Height="17"/>

            <ContentControl Style="{StaticResource A_Style_ContentControl_AnimatedTagSlideFromLeft_HUD}"
                            x:Name="TopValue3"> 
                <StackPanel Orientation="Vertical">
                    <Decorator LayoutTransform="{StaticResource A_SkewTransform_HUD_Italics}">
                        <local:FZTextBlock Margin="3,0,3,0"
                                           Style="{StaticResource A_Style_ActivationPreNameText}"
                                           Text="{Binding HeaderText}"
                                           MarkupConverter="{StaticResource A_MappingConverter_ActivationPreName}"
                                           Visibility="{Binding HeaderText, Converter={StaticResource A_StringVisConverter}}"/>
                    </Decorator>

                    <FrameworkElement x:Name="ToButtonPromptDiv2d" Height="44"/>

                    <StackPanel Orientation="Horizontal">
                        <FrameworkElement x:Name="PadButtonPromptDiv2d" Width="0"/>

                        <Grid Style="{StaticResource A_Style_FrameworkElement_ActivationButtonPromptFormat}">
                            <Viewbox x:Name="ActivationButtonControlViewBox" 
                                MinHeight="32"
                                MinWidth="32"
                                Visibility="{Binding ActivateCommand.Enabled, Converter={StaticResource A_FZBooleanToVisibilityConverter}, FallbackValue=Collapsed}">
                                <local:ControllerButtonControl Style="{StaticResource A_Style_ControllerButtonControl_ActivationButton}"
                                    Margin="0"
                                    UseLargeIcon="True"
                                    Command="{Binding ActivateCommand}"
                                    x:Name="PART_ActivationButtonControl"/>
                            </Viewbox>

                            <local:FZMaterial x:Name="ControllerButtonLockMaterial"
                                              ImageSource="/ForzaUI;component/Textures/Data_Bound/UI_Symbols/Lock_Light.png"
                                              Stretch="Uniform"
                                              Width="32"
                                              Height="32"
                                              Effect="{StaticResource A_DropShadowEffect_DefaultHud}">
                                <local:FZMaterial.Style>
                                    <Style TargetType="{x:Type local:FZMaterial}">
                                        <Setter Property="Visibility"
                                                Value="Collapsed" />
                                        <Style.Triggers>
                                            <MultiDataTrigger>
                                                <MultiDataTrigger.Conditions>
                                                    <Condition Binding="{Binding ActivateCommand.Enabled, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}" Value="{x:Static Visibility.Visible}" />
                                                    <Condition Binding="{Binding CanUseLockIcon}" Value="True" />
                                                </MultiDataTrigger.Conditions>
                                                <Setter Property="Visibility" Value="{x:Static Visibility.Visible}"/>
                                            </MultiDataTrigger>
                                        </Style.Triggers>
                                    </Style>
                                </local:FZMaterial.Style>    
                            </local:FZMaterial>
                        </Grid>

                        <FrameworkElement x:Name="ButtonToIntstructionDiv2d"
                                          Width="8">
                                <FrameworkElement.Style>
                                    <Style>
                                        <Setter Property="Visibility"
                                                Value="Collapsed" />
                                        <Style.Triggers>
                                            <DataTrigger Binding="{Binding Visibility, ElementName=ControllerButtonLockMaterial}" Value="{x:Static Visibility.Visible}">
                                                <Setter Property="Visibility" Value="{x:Static Visibility.Visible}"/>
                                            </DataTrigger>
                                            <DataTrigger Binding="{Binding Visibility, ElementName=ActivationButtonControlViewBox}" Value="{x:Static Visibility.Visible}">
                                                <Setter Property="Visibility" Value="{x:Static Visibility.Visible}"/>
                                            </DataTrigger>
                                        </Style.Triggers>
                                    </Style>
                                </FrameworkElement.Style>    
                        </FrameworkElement>

                        <Decorator LayoutTransform="{StaticResource A_SkewTransform_HUD_Italics}"
                                   VerticalAlignment="Center"
                                   MinHeight="32">
                            <local:FZTextBlock Style="{StaticResource A_Style_ActivationInstructionText}"
                                               Text="{Binding InstructionText}"
                                               MarkupConverter="{StaticResource A_MappingConverter_ActivationInstructionName}"
                                               Margin="0,0,3,0"
                                               VerticalAlignment="Center">
                                <TextBlock.Foreground>
                                    <SolidColorBrush Color="{Binding Color, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:FZTextBlock}}}" />
                                </TextBlock.Foreground>
                            </local:FZTextBlock>
                        </Decorator>
                    </StackPanel>
                </StackPanel>
            </ContentControl>
        </StackPanel>

        <local:AudioEvent x:Name="ShowAudioEvent" />
    </Grid>

</UserControl>
