<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    xmlns:local="clr-namespace:ForzaUI" 
    xmlns:System="clr-namespace:System;assembly=mscorlib"
    x:Class="ForzaUI.HUDEliminatorUpgradeChoiceControl"
    HorizontalAlignment="Center"
    VerticalAlignment="Bottom"
    x:Name="UserControl">

    <UserControl.Resources>
        <ResourceDictionary>

            <!-- ANIMATION RESOURCES & STORY BOARD REFERENCED BY EVENTS -->
            <!--                                                        -->

            <CircleEase x:Key="A_EasingFunction_EaseInCirc" EasingMode="EaseIn"/>
            <CircleEase x:Key="A_EasingFunction_EaseOutCirc" EasingMode="EaseOut"/>
            <SineEase x:Key="A_EasingFunction_EaseOutSine" EasingMode="EaseOut"/>
            <SineEase x:Key="A_EasingFunction_EaseInSine" EasingMode="EaseIn"/>
            <SineEase x:Key="A_EasingFunction_EaseInOutSine" EasingMode="EaseInOut"/>
            <QuadraticEase x:Key="A_EasingFunction_EaseInOutQuat" EasingMode="EaseInOut"/>
            <QuinticEase x:Key="A_EasingFunction_EaseInOutQuint" EasingMode="EaseInOut"/>
            
            <String x:Key="A_String_Upgrade_Narrated_Format">{0} {1} . {2} {3} . {4} {5}</String>

            <!-- DIAL SHOW -->
            <DoubleAnimationUsingKeyFrames x:Key="A_AnimationUsingKeyFrames_Dial_Opacity_On"
                                            Storyboard.TargetProperty="Opacity" Storyboard.TargetName="{x:Null}">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"  Value="0" />
                <EasingDoubleKeyFrame   KeyTime="0:0:0.28" Value="1.0" EasingFunction="{StaticResource A_EasingFunction_EaseInCirc}"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames x:Key="A_AnimationUsingKeyFrames_Dial_Scale_X"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)" Storyboard.TargetName="{x:Null}">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"  Value="1.89" />
                <EasingDoubleKeyFrame   KeyTime="0:0:0.28" Value="1.0" EasingFunction="{StaticResource A_EasingFunction_EaseInCirc}"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames x:Key="A_AnimationUsingKeyFrames_Dial_Scale_Y"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" Storyboard.TargetName="{x:Null}">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"  Value="1.89" />
                <EasingDoubleKeyFrame   KeyTime="0:0:0.28" Value="1.0" EasingFunction="{StaticResource A_EasingFunction_EaseInCirc}"/>
            </DoubleAnimationUsingKeyFrames>

            <local:UIStoryboard x:Key="A_Storyboard_UpgradeChoiceShow_Dial" BeginTime="0:0:0.00">
                <StaticResourceExtension ResourceKey="A_AnimationUsingKeyFrames_Dial_Opacity_On"/>
                <StaticResourceExtension ResourceKey="A_AnimationUsingKeyFrames_Dial_Scale_X"/>
                <StaticResourceExtension ResourceKey="A_AnimationUsingKeyFrames_Dial_Scale_Y"/>
            </local:UIStoryboard>

            <!-- SLAM GLOW -->
            <DoubleAnimationUsingKeyFrames x:Key="A_AnimationUsingKeyFrames_SlamGlow_On"
                                            Storyboard.TargetProperty="Opacity" Storyboard.TargetName="{x:Null}">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"  Value="0" />
                <EasingDoubleKeyFrame   KeyTime="0:0:0.04" Value="0.80" EasingFunction="{StaticResource A_EasingFunction_EaseOutSine}"/>
                <EasingDoubleKeyFrame   KeyTime="0:0:0.28" Value="0.32" EasingFunction="{StaticResource A_EasingFunction_EaseOutSine}"/>
                <EasingDoubleKeyFrame   KeyTime="0:0:0.56" Value="0"    EasingFunction="{StaticResource A_EasingFunction_EaseOutSine}"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames x:Key="A_AnimationUsingKeyFrames_SlamGlow_Scale_X"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)" Storyboard.TargetName="{x:Null}">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"  Value="0" />
                <EasingDoubleKeyFrame   KeyTime="0:0:0.04" Value="0.38" EasingFunction="{StaticResource A_EasingFunction_EaseOutSine}"/>
                <EasingDoubleKeyFrame   KeyTime="0:0:0.28" Value="1.23" EasingFunction="{StaticResource A_EasingFunction_EaseOutSine}"/>
                <EasingDoubleKeyFrame   KeyTime="0:0:0.56" Value="1.75"    EasingFunction="{StaticResource A_EasingFunction_EaseOutSine}"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames x:Key="A_AnimationUsingKeyFrames_SlamGlow_Scale_Y"
                                            Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" Storyboard.TargetName="{x:Null}">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"  Value="0" />
                <EasingDoubleKeyFrame   KeyTime="0:0:0.04" Value="0.38" EasingFunction="{StaticResource A_EasingFunction_EaseOutSine}"/>
                <EasingDoubleKeyFrame   KeyTime="0:0:0.28" Value="1.23" EasingFunction="{StaticResource A_EasingFunction_EaseOutSine}"/>
                <EasingDoubleKeyFrame   KeyTime="0:0:0.56" Value="1.75"    EasingFunction="{StaticResource A_EasingFunction_EaseOutSine}"/>
            </DoubleAnimationUsingKeyFrames>

            <local:UIStoryboard x:Key="A_Storyboard_SlamGlow" BeginTime="0:0:0.28">
                <StaticResourceExtension ResourceKey="A_AnimationUsingKeyFrames_SlamGlow_On"/>
                <StaticResourceExtension ResourceKey="A_AnimationUsingKeyFrames_SlamGlow_Scale_X"/>
                <StaticResourceExtension ResourceKey="A_AnimationUsingKeyFrames_SlamGlow_Scale_Y"/>
            </local:UIStoryboard>


            <!-- SLAM SHEEN -->
            <ImageSource x:Key="A_BitmapImage_Dial_Silhouette">/ForzaUI;component/Textures/Data_Bound/Eliminator/TextureMasks/SlamSheenMask.png</ImageSource>
            <ImageSource x:Key="A_BitmapImage_Gradient">/ForzaUI;component/Textures/Anthem/TextureMaskGradients/Diagonal_Gradient.png</ImageSource>
            
            <local:UIStoryboard x:Key="A_Storyboard_Dial_SlamSheen" BeginTime="0:0:0.32">
                <SingleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="SlamSheen">
                    <DiscreteSingleKeyFrame KeyTime="0:0:0.0" Value="1.0"/>
                </SingleAnimationUsingKeyFrames>
                <SingleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Effect).(FadeInStart)" Storyboard.TargetName="SlamSheen">
                    <EasingSingleKeyFrame KeyTime="0:0:0.0" Value="-0.75"/>
                    <EasingSingleKeyFrame KeyTime="0:0:0.68" Value="1.4" EasingFunction="{StaticResource A_EasingFunction_EaseInOutQuat}"/>
                </SingleAnimationUsingKeyFrames>
                <SingleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Effect).(FadeInEnd)" Storyboard.TargetName="SlamSheen">
                    <EasingSingleKeyFrame KeyTime="0:0:0.0" Value="-0.25"/>
                    <EasingSingleKeyFrame KeyTime="0:0:0.68" Value="1.5" EasingFunction="{StaticResource A_EasingFunction_EaseInOutQuat}"/>
                </SingleAnimationUsingKeyFrames>
                <SingleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Effect).(FadeOutStart)" Storyboard.TargetName="SlamSheen">
                    <EasingSingleKeyFrame KeyTime="0:0:0.0" Value="-0.5"/>
                    <EasingSingleKeyFrame KeyTime="0:0:0.68" Value="2.5" EasingFunction="{StaticResource A_EasingFunction_EaseInOutQuat}"/>
                </SingleAnimationUsingKeyFrames>
                <SingleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Effect).(FadeOutEnd)" Storyboard.TargetName="SlamSheen">
                    <EasingSingleKeyFrame KeyTime="0:0:0.0" Value="0"/>
                    <EasingSingleKeyFrame KeyTime="0:0:0.68" Value="3" EasingFunction="{StaticResource A_EasingFunction_EaseInOutQuat}"/>
                </SingleAnimationUsingKeyFrames>
            </local:UIStoryboard>

            <DoubleAnimationUsingKeyFrames x:Key="A_AnimationUsingKeyFrames_DPad_On"
                                            Storyboard.TargetProperty="Opacity" Storyboard.TargetName="{x:Null}">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"  Value="0" />
                <EasingDoubleKeyFrame   KeyTime="0:0:0.24" Value="1.0" EasingFunction="{StaticResource A_EasingFunction_EaseInOutQuat}"/>
            </DoubleAnimationUsingKeyFrames>

            <local:UIStoryboard x:Key="A_Storyboard_DPad_On">
                <StaticResourceExtension ResourceKey="A_AnimationUsingKeyFrames_DPad_On"/>
            </local:UIStoryboard>

            <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPresetRoundtangle_FlatPanel_ButtonSeperator" BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}" CornerRadius="2"/>


            <Style x:Key="A_Style_FZTextBlock_Eliminator_CarName" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_HudMediumLarge_Tight}">
                <Style.Triggers>
                    <DataTrigger Binding="{Binding Source={StaticResource A_Visibility_ShowForHighContrastOnly}}" Value="{x:Static Visibility.Visible}">
                        <Setter Property="Effect" Value="{StaticResource A_Effect_HighContrastModeDropShadow_Large}"/>
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <System:Double x:Key="A_Double_RibbonLength">320</System:Double>

            <ControlTemplate x:Key="A_ControlTemplate_UpgradeChoice_EliminatorCarPresenter">
                <Grid Width="{StaticResource A_Double_RibbonLength}" x:Name="ItemRoot">
                    <Grid VerticalAlignment="Center" HorizontalAlignment="{DynamicResource A_Dynamic_HorizontalAlignment}"
                          RenderTransform="{DynamicResource A_TransformGroup_HorizontalFlip}" RenderTransformOrigin="0.5, 0.5">
                        
                        <local:FZMaterial x:Name="SpikeCircle" Opacity="0" ImageSourceNoPreload="/ForzaUI;component/Textures/Data_Bound/Series14/Eliminator/UpgradeWidget/SpikeCircleBack.png" 
                                  Color="{Binding CarGrade,Converter={StaticResource A_Converter_Grade_To_BaseColor_Dark}}" RenderTransformOrigin="1.0,0.5"
                                  Height="108" Width="83" HorizontalAlignment="Right" Margin="0,0,-44,0">
                            <local:FZMaterial.RenderTransform>
                                <ScaleTransform ScaleX="0" ScaleY="0"/>
                            </local:FZMaterial.RenderTransform>
                        </local:FZMaterial>

                        <local:FZMaterial x:Name="SelectGlow" ImageSourceNoPreload="/ForzaUI;component/Textures/Data_Bound/Series14/Eliminator/UpgradeWidget/SelectGlow.png" 
                                  Color="{Binding CarGrade,Converter={StaticResource A_Converter_Grade_To_BaseColor}}" Opacity="0"
                                  Preset="{StaticResource A_FZMaterialPresetAdditive}"
                                  Width="184" Height="100" HorizontalAlignment="Right" Margin="0,0,-44,0" RenderTransformOrigin="0.5,0.5">
                            <local:FZMaterial.RenderTransform>
                                <ScaleTransform ScaleX="-1" ScaleY="1"/>
                            </local:FZMaterial.RenderTransform>
                        </local:FZMaterial>

                        <StackPanel ClipToBounds="True" Orientation="Horizontal" Width="{StaticResource A_Double_RibbonLength}">
                            <Decorator x:Name="RibbonOffset" Width="{StaticResource A_Double_RibbonLength}"/>
                            <Grid x:Name="CarRibbon">
                                <local:FZMaterial ImageSourceNoPreload="/ForzaUI;component/Textures/Data_Bound/Series14/Eliminator/UpgradeWidget/CarNameRibbon.png" 
                                  Preset="{Binding CarGrade,Converter={StaticResource A_Converter_Grade_To_Preset}}" 
                                  Height="42" Width="{StaticResource A_Double_RibbonLength}" HorizontalAlignment="Right" />
                                <local:FZMaterial ImageSourceNoPreload="/ForzaUI;component/Textures/Data_Bound/Series14/Eliminator/UpgradeWidget/LVLNumberBack.png"
                                  Height="42" Width="80"  HorizontalAlignment="Right"/>
                            </Grid>
                        </StackPanel>

                        <Decorator Width="{StaticResource A_Double_RibbonLength}" Height="42" ClipToBounds="True" HorizontalAlignment="Right">
                            <!-- Confirm sheen -->
                            <local:FZMaterial x:Name="ConfirmSheen"
                                      Opacity="0" Margin="0,0,-130,0"
                                      Width="175"
                                      Height="42"
                                      VerticalAlignment="Center" HorizontalAlignment="Right"
                                      RenderTransformOrigin="0.5,0.5"
                                      Preset="{StaticResource A_FZMaterialPresetAdditive}"
                                      ImageSource="/ForzaUI;component/Textures/Data_Bound/Series14/Eliminator/UpgradeWidget/SelectSheen.png">
                                <local:FZMaterial.RenderTransform>
                                    <TransformGroup>
                                        <RotateTransform/>
                                        <ScaleTransform ScaleX="1" ScaleY="-1"/>
                                        <TranslateTransform X="0"/>
                                    </TransformGroup>
                                </local:FZMaterial.RenderTransform>
                            </local:FZMaterial>
                        </Decorator>
                    </Grid>
                    
                    <!-- Level icon needs to escape bounds so it is seperate from top content-->
                    <Decorator Margin="6,-16,6,-16" HorizontalAlignment="{DynamicResource A_Dynamic_HorizontalAlignment}" VerticalAlignment="Center">
                        <local:FZMaterial x:Name="PART_Level"
                                  Width="62" Height="68" Opacity="0" RenderTransformOrigin="0.5,0.5"
                                  ImageSourceNoPreload="{Binding CarGrade, Converter={StaticResource A_Converter_HUD_CarGradeLevelTexture}}">
                            <local:FZMaterial.RenderTransform>
                                <ScaleTransform ScaleY="1" ScaleX="1"/>
                            </local:FZMaterial.RenderTransform>
                        </local:FZMaterial>
                    </Decorator>

                    <!-- Confirm pulse -->
                    <Decorator HorizontalAlignment="{DynamicResource A_Dynamic_HorizontalAlignment}"
                          RenderTransform="{DynamicResource A_TransformGroup_HorizontalFlip}" RenderTransformOrigin="0.5, 0.5">
                        <StackPanel ClipToBounds="True" HorizontalAlignment="Right" Orientation="Horizontal" Margin="0,0,-44,0" Width="360">
                            <Decorator x:Name="ConfirmPulseOffset" Width="0" HorizontalAlignment="Left"/>
                            <local:FZMaterial x:Name="ConfirmPulse" HorizontalAlignment="Right" Preset="{StaticResource A_FZMaterialPresetAdditive}"
                                       ImageSourceNoPreload="/ForzaUI;component/Textures/Data_Bound/Series14/Eliminator/UpgradeWidget/SelectPulse.png"
                                       Height="173" Width="118" RenderTransformOrigin="0.5,0.5">
                                <local:FZMaterial.RenderTransform>
                                    <ScaleTransform ScaleY="0" ScaleX="0"/>
                                </local:FZMaterial.RenderTransform>
                            </local:FZMaterial>
                        </StackPanel>
                    </Decorator>

                    <!-- Top level text -->
                    <DockPanel VerticalAlignment="Center" Opacity="0" x:Name="CarNameContainer" HorizontalAlignment="{DynamicResource A_Dynamic_HorizontalAlignment}" MaxWidth="260" Margin="10,0">
                        <Decorator DockPanel.Dock="{DynamicResource A_Dynamic_DockPanel_Dock}" Width="{Binding ActualWidth, ElementName=PART_Level}" Margin="7, 0"/>
                        <Grid LayoutTransform="{StaticResource A_SkewTransform_HUD_Italics}" VerticalAlignment="Center">
                            <local:FZTextBlock Text="{Binding CarDisplayName}" VerticalAlignment="Center" HorizontalAlignment="Center" 
                                               Style="{StaticResource A_Style_FZTextBlock_Eliminator_CarName}" FontSize="30"/>
                        </Grid>
                    </DockPanel>

                    <local:EventFire.FzTriggers>
                        <local:EventFireTrigger Event="ShowRibbon">
                            <local:EventFireTrigger.Storyboard>
                                <local:UIStoryboard>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="CarRibbon">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"  Value="0" />
                                        <EasingDoubleKeyFrame   KeyTime="0:0:0.36" Value="1.0" EasingFunction="{StaticResource A_EasingFunction_EaseInSine}"/>
                                    </DoubleAnimationUsingKeyFrames>

                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_Level">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"  Value="0" />
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.40" Value="0"/>
                                        <EasingDoubleKeyFrame   KeyTime="0:0:0.60" Value="1.0" EasingFunction="{StaticResource A_EasingFunction_EaseInSine}"/>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="CarNameContainer">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"  Value="0" />
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.40" Value="0"/>
                                        <EasingDoubleKeyFrame   KeyTime="0:0:0.60" Value="1.0" EasingFunction="{StaticResource A_EasingFunction_EaseInSine}"/>
                                    </DoubleAnimationUsingKeyFrames>

                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Width" Storyboard.TargetName="RibbonOffset">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"  Value="{StaticResource A_Double_RibbonLength}" />
                                        <EasingDoubleKeyFrame   KeyTime="0:0:0.36" Value="0" EasingFunction="{StaticResource A_EasingFunction_EaseInSine}"/>
                                    </DoubleAnimationUsingKeyFrames>

                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)" Storyboard.TargetName="SpikeCircle">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"  Value="0" />
                                        <EasingDoubleKeyFrame   KeyTime="0:0:0.32" Value="1.0" EasingFunction="{StaticResource A_EasingFunction_EaseInOutSine}"/>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SpikeCircle">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"  Value="0" />
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.16"  Value="0" />
                                        <EasingDoubleKeyFrame   KeyTime="0:0:0.32" Value="1.0" EasingFunction="{StaticResource A_EasingFunction_EaseInOutSine}"/>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" Storyboard.TargetName="SpikeCircle">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"  Value="0" />
                                        <EasingDoubleKeyFrame   KeyTime="0:0:0.32" Value="1.0" EasingFunction="{StaticResource A_EasingFunction_EaseInOutSine}"/>
                                    </DoubleAnimationUsingKeyFrames>
                                </local:UIStoryboard>
                            </local:EventFireTrigger.Storyboard>
                        </local:EventFireTrigger>

                        <local:EventFireTrigger Event="ShowSelectionAnimationOn">
                            <local:EventFireTrigger.Storyboard>
                                <local:UIStoryboard>
                                    <!-- Confirm pulse Animation -->
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ConfirmPulse">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"  Value="0" />
                                        <EasingDoubleKeyFrame   KeyTime="0:0:0.08" Value="1.0" EasingFunction="{StaticResource A_EasingFunction_EaseOutCirc}"/>
                                        <EasingDoubleKeyFrame   KeyTime="0:0:0.6" Value="0.0" EasingFunction="{StaticResource A_EasingFunction_EaseOutCirc}"/>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Width" Storyboard.TargetName="ConfirmPulseOffset">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"  Value="360" />
                                        <EasingDoubleKeyFrame   KeyTime="0:0:0.6" Value="0" EasingFunction="{StaticResource A_EasingFunction_EaseOutCirc}"/>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)" Storyboard.TargetName="ConfirmPulse">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"  Value="0" />
                                        <EasingDoubleKeyFrame   KeyTime="0:0:0.08" Value="-1.0" EasingFunction="{StaticResource A_EasingFunction_EaseOutCirc}"/>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" Storyboard.TargetName="ConfirmPulse">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"  Value="0" />
                                        <EasingDoubleKeyFrame   KeyTime="0:0:0.08" Value="1.0" EasingFunction="{StaticResource A_EasingFunction_EaseOutCirc}"/>
                                    </DoubleAnimationUsingKeyFrames>

                                    <!-- Confirm glow Animation -->
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectGlow">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"  Value="0" />
                                        <LinearDoubleKeyFrame   KeyTime="0:0:0.24" Value="0.5"/>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Level">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"  Value="1.0" />
                                        <EasingDoubleKeyFrame   KeyTime="0:0:0.24" Value="1.1" EasingFunction="{StaticResource A_EasingFunction_EaseOutCirc}"/>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Level">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"  Value="1.0" />
                                        <EasingDoubleKeyFrame   KeyTime="0:0:0.24" Value="1.1" EasingFunction="{StaticResource A_EasingFunction_EaseOutCirc}"/>
                                    </DoubleAnimationUsingKeyFrames>

                                    <!-- Confirm Sheen Animation -->
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ConfirmSheen">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"  Value="1.0"/>
                                        <EasingDoubleKeyFrame   KeyTime="0:0:0.9"  Value="0" EasingFunction="{StaticResource A_EasingFunction_EaseInOutQuint}"/>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(TranslateTransform.X)" Storyboard.TargetName="ConfirmSheen">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0" Value="0"/>
                                        <EasingDoubleKeyFrame KeyTime="0:0:0.9" Value="-325" EasingFunction="{StaticResource A_EasingFunction_EaseInOutQuint}"/>
                                    </DoubleAnimationUsingKeyFrames>
                                </local:UIStoryboard>
                            </local:EventFireTrigger.Storyboard>
                        </local:EventFireTrigger>

                        <local:EventFireTrigger Event="SelectionDisabled">
                            <local:EventFireTrigger.Storyboard>
                                <local:UIStoryboard>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SpikeCircle">
                                        <LinearDoubleKeyFrame   KeyTime="0:0:0.24" Value="0.35"/>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="CarRibbon">
                                        <LinearDoubleKeyFrame   KeyTime="0:0:0.24" Value="0.2"/>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_Level">
                                        <LinearDoubleKeyFrame   KeyTime="0:0:0.24" Value="0.2"/>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="CarNameContainer">
                                        <LinearDoubleKeyFrame   KeyTime="0:0:0.24" Value="0.2"/>
                                    </DoubleAnimationUsingKeyFrames>
                                </local:UIStoryboard>
                            </local:EventFireTrigger.Storyboard>
                        </local:EventFireTrigger>

                        <local:EventFireTrigger Event="ResetRibbon">
                            <local:UIStoryboard>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Width" Storyboard.TargetName="RibbonOffset">
                                    <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"  Value="{StaticResource A_Double_RibbonLength}" />
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectGlow">
                                    <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"  Value="0" />
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="CarRibbon">
                                    <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"  Value="0" />
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_Level">
                                    <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"  Value="0" />
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="CarNameContainer">
                                    <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"  Value="0" />
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SpikeCircle">
                                    <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"  Value="0" />
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)" Storyboard.TargetName="PART_Level">
                                    <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"  Value="1.0" />
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" Storyboard.TargetName="PART_Level">
                                    <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"  Value="1.0" />
                                </DoubleAnimationUsingKeyFrames>
                            </local:UIStoryboard>
                        </local:EventFireTrigger>
                        
                    </local:EventFire.FzTriggers>
                </Grid>
            </ControlTemplate>

            <Style TargetType="Control" x:Key="A_Style_Control_EliminatorCar_Upgrade_GradeAlignedLeft">
                <Style.Resources>
                    <HorizontalAlignment x:Key="A_Dynamic_HorizontalAlignment">Left</HorizontalAlignment>
                    <Dock x:Key="A_Dynamic_DockPanel_Dock">Left</Dock>

                    <TransformGroup x:Key="A_TransformGroup_HorizontalFlip">
                        <ScaleTransform ScaleY="1" ScaleX="-1" />
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Style.Resources>
                <Setter Property="Template" Value="{StaticResource A_ControlTemplate_UpgradeChoice_EliminatorCarPresenter}"/>
            </Style>

            <Style TargetType="Control" x:Key="A_Style_Control_EliminatorCar_Upgrade_GradeAlignedRight">
                <Style.Resources>
                    <HorizontalAlignment x:Key="A_Dynamic_HorizontalAlignment">Right</HorizontalAlignment>
                    <Dock x:Key="A_Dynamic_DockPanel_Dock">Right</Dock>

                    <TransformGroup x:Key="A_TransformGroup_HorizontalFlip">
                        <ScaleTransform ScaleY="1" ScaleX="1" />
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Style.Resources>
                <Setter Property="Template" Value="{StaticResource A_ControlTemplate_UpgradeChoice_EliminatorCarPresenter}"/>
            </Style>

            <Style x:Key="A_Style_ControllerButtonControl_Status_Default"
                TargetType="{x:Type local:ControllerButtonControl}"
                BasedOn="{StaticResource A_Style_ControllerButtonControl_Default_ShowAlways}">
                <Setter Property="HideBackground" Value="True"/>
                <Setter Property="InputOverride" Value="{Binding Input}"/>
            </Style>

            <Style x:Key="A_Style_FZMaterial_DPAD_Pip" TargetType="local:FZMaterial">
                <Setter Property="ImageSourceNoPreload" Value="Game:\Media\UI\Textures\Data_Bound\Series14\Eliminator\UpgradeWidget\DPad_Highlight.png"/>
                <Setter Property="Width" Value="40"/>
                <Setter Property="Height" Value="30"/>
                <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetAdditive}"/>
                <Setter Property="Visibility" Value="{Binding , Converter={StaticResource A_FZBooleanToVisibilityConverter}}" />
                <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
            </Style>

            <Style x:Key="A_Style_FZMaterial_DPAD_Pip_Left" TargetType="local:FZMaterial" BasedOn="{StaticResource A_Style_FZMaterial_DPAD_Pip}">
                <Setter Property="RenderTransform">
                    <Setter.Value>
                        <TransformGroup>
                            <RotateTransform Angle="180"/>
                        </TransformGroup>
                    </Setter.Value>
                </Setter>
            </Style>
            
            <Style x:Key="A_Style_FZMaterial_DPAD_Pip_Right" TargetType="local:FZMaterial" BasedOn="{StaticResource A_Style_FZMaterial_DPAD_Pip}">
                <Setter Property="RenderTransform">
                    <Setter.Value>
                        <TransformGroup>
                            <RotateTransform Angle="0"/>
                        </TransformGroup>
                    </Setter.Value>
                </Setter>
            </Style>

            <Style x:Key="A_Style_FZMaterial_DPAD_Pip_Down" TargetType="local:FZMaterial" BasedOn="{StaticResource A_Style_FZMaterial_DPAD_Pip}">
                <Setter Property="LayoutTransform">
                    <Setter.Value>
                        <TransformGroup>
                            <RotateTransform Angle="90"/>
                        </TransformGroup>
                    </Setter.Value>
                </Setter>
            </Style>

            <Style x:Key="A_Style_FZMaterial_Visible_If_Dpad_Only" TargetType="local:FZMaterial">
                <Setter Property="Visibility" Value="Collapsed"/>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding ShouldShowAsDpad}" Value="True">
                        <Setter Property="Visibility" Value="Visible"/>
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_FZMaterial_CircleFront" TargetType="local:FZMaterial">
                <Setter Property="ImageSourceNoPreload" Value="/ForzaUI;component/Textures/Data_Bound/Series14/Eliminator/UpgradeWidget/SpikeCircleFront.png" />
                <Setter Property="Height" Value="100"/>
                <Setter Property="Width" Value="50"/>
                <Setter Property="Visibility" Value="{Binding CarInfo, Converter={StaticResource A_FZBooleanToVisibilityConverter}, FallbackValue=Collapsed}"/>
                <Style.Triggers>
                    <Trigger Property="Visibility" Value="Visible">
                        <Setter Property="Color" Value="{Binding CarInfo.CarGrade, Converter={StaticResource A_Converter_Grade_To_BaseColor}}"/>
                    </Trigger>
                </Style.Triggers>
            </Style>

            <local:MappingConverter x:Key="A_Converter_NullCollapsed"
                                Default="{x:Static Visibility.Visible}">
                <local:MappingConverterEntry Key="{x:Null}"
                                         Value="{x:Static Visibility.Collapsed}" />
            </local:MappingConverter>

            <ControlTemplate x:Key="A_ControlTemplate_ContentControl_Radial_Eliminator"
                         TargetType="{x:Type Control}">
                <Grid Margin="0,0,0,-0.5">

                    <local:FZMaterial
                                  Stretch="Uniform"
                                  Width="90"
                                  Height="90"
                                  ImageSourceNoPreload="Game:\Media\UI\Textures\Data_Bound\Series14\Eliminator\UpgradeWidget\Timer_Back.png">
                        <Grid x:Name="RadialImageContent">
                            <local:FZMaterial x:Name="RadialImage"
                                  Stretch="Uniform"
                                  Width="48"
                                  Height="48"
                                  Style="{StaticResource A_Style_FZMaterial_Visible_If_Dpad_Only}"
                                  ImageSourceNoPreload="Game:\Media\UI\Textures\Data_Bound\Series14\Eliminator\UpgradeWidget\DPad.png">
                                <Grid x:Name="DPad_Pips"
                                      Opacity="0"
                                      Visibility="{Binding ShouldShowAsDpad, Converter={StaticResource A_FZBooleanToVisibilityConverter}}">
                                    <local:FZMaterial x:Name="LeftPip" Style="{StaticResource A_Style_FZMaterial_DPAD_Pip_Left}" DataContext="{Binding LeftChoice.Input}" Margin="-26,0,0,0"/>
                                    <local:FZMaterial x:Name="RightPip" Style="{StaticResource A_Style_FZMaterial_DPAD_Pip_Right}" DataContext="{Binding RightChoice.Input}"  Margin="0,0,-26,0"/>
                                    <local:FZMaterial x:Name="DownPip" Style="{StaticResource A_Style_FZMaterial_DPAD_Pip_Down}" DataContext="{Binding DownChoice.Input}"  Margin="0,0,0,-26"/>
                                </Grid>
                            </local:FZMaterial>

                            <Grid Margin="3,0,3,0" x:Name="DPad_Pips_Alternative" Opacity="0" Visibility="{Binding ShouldShowAsDpad, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}, FallbackValue=Collapsed}">
                                <local:ControllerButtonControl x:Name="LeftButtonChoice"
                                        Style="{StaticResource A_Style_ControllerButtonControl_Status_Default}"
                                        DataContext="{Binding LeftChoice}"
                                        Margin="8,0,0,0" HorizontalAlignment="Left"
                                        UseLargeIcon="True" />
                                <local:FZMaterial Color="#FFFFFFFF" Width="1.5" Height="52" Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_ButtonSeperator}" Visibility="{Binding Visibility, ElementName=LeftButtonChoice}"/>
                                <local:ControllerButtonControl x:Name="RightButtonChoice"
                                        Style="{StaticResource A_Style_ControllerButtonControl_Status_Default}"
                                        DataContext="{Binding RightChoice}"
                                        Margin="0,0,8,0" HorizontalAlignment="Right"
                                        UseLargeIcon="True" />
                            </Grid>
                        </Grid>
                    </local:FZMaterial>

                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_CircleFront}"
                                      x:Name="LeftBackCircle"
                                      DataContext="{Binding RightChoice}"
                                      Opacity="0"
                                      HorizontalAlignment="Left" Margin="10,0,0,0"/>
                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_CircleFront}" 
                                      x:Name="LeftFrontCircle"
                                      DataContext="{Binding LeftChoice}"
                                      HorizontalAlignment="Left" Margin="10,0,0,0"/>

                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_CircleFront}" 
                                      x:Name="RightBackCircle"
                                      DataContext="{Binding LeftChoice}"
                                      Opacity="0"
                                      HorizontalAlignment="Right" Margin="0,0,10,0" 
                                      RenderTransformOrigin="0.5, 0.5">
                        <local:FZMaterial.RenderTransform>
                            <ScaleTransform ScaleY="1" ScaleX="-1"/>
                        </local:FZMaterial.RenderTransform>
                    </local:FZMaterial>
                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_CircleFront}" 
                                      x:Name="RightFrontCircle"
                                      DataContext="{Binding RightChoice}"
                                      HorizontalAlignment="Right" Margin="0,0,10,0" 
                                      RenderTransformOrigin="0.5, 0.5">
                        <local:FZMaterial.RenderTransform>
                            <ScaleTransform ScaleY="1" ScaleX="-1"/>
                        </local:FZMaterial.RenderTransform>
                    </local:FZMaterial>


                    <local:FZMaterial x:Name="RadialBar"
                                      Width="120"
                                      Height="120"
                                      Visibility="{Binding RemainingTimeRatio, Converter={StaticResource A_Converter_NullCollapsed}}"
                                      HorizontalAlignment="Center"
                                      VerticalAlignment="Center">
                        <local:FZMaterial.Preset>
                            <local:FZMaterialPresetRadialBar TargetRatio="1.0"
                                                         ShadowIntensity="0"
                                                         TipGlowFade="0.0"
                                                         AngleAmount="0"
                                                         BarWidth="0.10"
                                                         BackgroundColor="#66FFFFFF"
                                                         Ratio="{Binding RemainingTimeRatio}" />
                        </local:FZMaterial.Preset>
                    </local:FZMaterial>

                    <local:EventFire.FzTriggers>
                        <local:EventFireTrigger Event="ShowAnimationDPad">
                            <local:EventFireTrigger.Storyboard>
                                <local:UIStoryboard>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DPad_Pips">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"  Value="0" />
                                        <EasingDoubleKeyFrame   KeyTime="0:0:0.24" Value="1.0" EasingFunction="{StaticResource A_EasingFunction_EaseInOutQuat}"/>
                                    </DoubleAnimationUsingKeyFrames>

                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DPad_Pips_Alternative">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"  Value="0" />
                                        <EasingDoubleKeyFrame   KeyTime="0:0:0.24" Value="1.0" EasingFunction="{StaticResource A_EasingFunction_EaseInOutQuat}"/>
                                    </DoubleAnimationUsingKeyFrames>
                                </local:UIStoryboard>
                            </local:EventFireTrigger.Storyboard>
                        </local:EventFireTrigger>

                        <local:EventFireTrigger Event="LeftSideOn">
                            <local:EventFireTrigger.Storyboard>
                                <local:UIStoryboard>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="RightFrontCircle">
                                        <EasingDoubleKeyFrame   KeyTime="0:0:0.24" Value="0.0" EasingFunction="{StaticResource A_EasingFunction_EaseInOutQuat}"/>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="RightBackCircle">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0" Value="1.0"/>
                                    </DoubleAnimationUsingKeyFrames>

                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="RadialBar">
                                        <LinearDoubleKeyFrame   KeyTime="0:0:0.24" Value="0.5"/>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="RightPip">
                                        <LinearDoubleKeyFrame   KeyTime="0:0:0.24" Value="0.0"/>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DownPip">
                                        <LinearDoubleKeyFrame   KeyTime="0:0:0.24" Value="0.0"/>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="RightButtonChoice">
                                        <LinearDoubleKeyFrame   KeyTime="0:0:0.24" Value="0.0"/>
                                    </DoubleAnimationUsingKeyFrames>
                                </local:UIStoryboard>
                            </local:EventFireTrigger.Storyboard>
                        </local:EventFireTrigger>
                        <local:EventFireTrigger Event="RightSideOn">
                            <local:EventFireTrigger.Storyboard>
                                <local:UIStoryboard>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="LeftFrontCircle">
                                        <EasingDoubleKeyFrame   KeyTime="0:0:0.24" Value="0.0" EasingFunction="{StaticResource A_EasingFunction_EaseInOutQuat}"/>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="LeftBackCircle">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0" Value="1.0"/>
                                    </DoubleAnimationUsingKeyFrames>

                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="RadialBar">
                                        <LinearDoubleKeyFrame   KeyTime="0:0:0.24" Value="0.5"/>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="LeftPip">
                                        <LinearDoubleKeyFrame   KeyTime="0:0:0.24" Value="0.0"/>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DownPip">
                                        <LinearDoubleKeyFrame   KeyTime="0:0:0.24" Value="0.0"/>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="LeftButtonChoice">
                                        <LinearDoubleKeyFrame   KeyTime="0:0:0.24" Value="0.0"/>
                                    </DoubleAnimationUsingKeyFrames>
                                </local:UIStoryboard>
                            </local:EventFireTrigger.Storyboard>
                        </local:EventFireTrigger>
                        
                        <local:EventFireTrigger Event="ResetDPad">
                            <local:EventFireTrigger.Storyboard>
                                <local:UIStoryboard>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="LeftFrontCircle">
                                        <DiscreteDoubleKeyFrame   KeyTime="0:0:0.0" Value="1.0"/>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="RightFrontCircle">
                                        <DiscreteDoubleKeyFrame   KeyTime="0:0:0.0" Value="1.0"/>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="LeftBackCircle">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0" Value="0.0"/>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="RightBackCircle">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0" Value="0.0"/>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="RadialBar">
                                        <LinearDoubleKeyFrame   KeyTime="0:0:0.24" Value="1.0"/>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DPad_Pips">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"  Value="0" />
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DPad_Pips_Alternative">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"  Value="0" />
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="RightPip">
                                        <LinearDoubleKeyFrame   KeyTime="0:0:0.0" Value="1.0"/>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="LeftPip">
                                        <LinearDoubleKeyFrame   KeyTime="0:0:0.0" Value="1.0"/>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DownPip">
                                        <LinearDoubleKeyFrame   KeyTime="0:0:0.0" Value="1.0"/>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="LeftButtonChoice">
                                        <LinearDoubleKeyFrame   KeyTime="0:0:0.0" Value="1.0"/>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="RightButtonChoice">
                                        <LinearDoubleKeyFrame   KeyTime="0:0:0.0" Value="1.0"/>
                                    </DoubleAnimationUsingKeyFrames>
                                </local:UIStoryboard>
                            </local:EventFireTrigger.Storyboard>
                        </local:EventFireTrigger>

                    </local:EventFire.FzTriggers>
                </Grid>

                <ControlTemplate.Triggers>
                    <DataTrigger Binding="{Binding LeftChoice}" Value="{x:Null}">
                        <Setter Property="DataContext" TargetName="LeftFrontCircle" Value="{Binding RightChoice}"/>
                        <Setter Property="DataContext" TargetName="RightBackCircle" Value="{Binding RightChoice}"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding RightChoice}" Value="{x:Null}">
                        <Setter Property="DataContext" TargetName="RightFrontCircle" Value="{Binding LeftChoice}"/>
                        <Setter Property="DataContext" TargetName="LeftBackCircle" Value="{Binding LeftChoice}"/>
                    </DataTrigger>
                </ControlTemplate.Triggers>
            </ControlTemplate>

            <Style x:Key="A_Style_Control_Dial_Eliminator" TargetType="Control">
                <Setter Property="Template" Value="{StaticResource A_ControlTemplate_ContentControl_Radial_Eliminator}"/>
                <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
            </Style>
                       
        </ResourceDictionary>
    </UserControl.Resources>

    <Decorator x:Name="LayoutRoot">
        <VisualStateManager.VisualStateGroups>
            <local:UIVisualStateGroup x:Name="VisualStateGroup">
                <VisualState x:Name="Hidden">
                    <local:UIStoryboard>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="LayoutRoot">
                            <LinearDoubleKeyFrame KeyTime="0:0:0.24" Value="0"/>
                        </DoubleAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="LayoutRoot">
                            <DiscreteObjectKeyFrame KeyTime="0:0:0.24" Value="{x:Static Visibility.Collapsed}"/>
                        </ObjectAnimationUsingKeyFrames>

                        <local:UIStoryboard.TriggerAnimation>
                            <local:RaiseFzEvent EventName="ResetAnimation"/>
                            <local:RaiseFzEvent EventName="HiddenComplete" local:TriggerAnimation.KeyTime="0:0:0.24"/>
                        </local:UIStoryboard.TriggerAnimation>
                    </local:UIStoryboard>
                </VisualState>
                <VisualState x:Name="Shown">
                    <local:UIStoryboard>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="LayoutRoot">
                            <DiscreteDoubleKeyFrame KeyTime="0" Value="1"/>
                        </DoubleAnimationUsingKeyFrames>

                        <local:UIStoryboard.TriggerAnimation>
                            <local:RaiseFzEvent EventName="ShowAnimation"/>
                        </local:UIStoryboard.TriggerAnimation>
                    </local:UIStoryboard>
                </VisualState>
                
                <local:UIVisualStateGroup.Transitions>
                    <VisualTransition From="Shown" To="Hidden">
                    </VisualTransition>
                    <VisualTransition From="Hidden" To="Shown">
                    </VisualTransition>
                </local:UIVisualStateGroup.Transitions>
            </local:UIVisualStateGroup>
        </VisualStateManager.VisualStateGroups>
        
        <Grid x:Name="Container"
            local:ScreenReader.LineType="ItemDescription"
            local:MultiStringFormatter.Param0="{local:Loc InputUINames.IDS_Left}"
            local:MultiStringFormatter.Param1="{Binding LeftChoice.CarInfo.CarDisplayName}"
            local:MultiStringFormatter.Param2="{local:Loc InputUINames.IDS_Right}"
            local:MultiStringFormatter.Param3="{Binding RightChoice.CarInfo.CarDisplayName}"
            local:MultiStringFormatter.Param4="{local:Loc InputUINames.IDS_Down}"
            local:MultiStringFormatter.Param5="{local:Loc HelpButtons.IDS_Cancel}"
            local:MultiStringFormatter.Format="{StaticResource A_String_Upgrade_Narrated_Format}"            
            local:ScreenReader.Event="OnChange"
            local:ScreenReader.Line="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}}">

            <Grid VerticalAlignment="Bottom" HorizontalAlignment="Center" Width="728" Margin="0,1,0,20" x:Name="ChoiceCollection">
                <local:FZMaterial x:Name="SlamGlow" Preset="{StaticResource A_FZMaterialPresetAdditive}"
                                  Width="348" Height="348" Margin="-174"
                                  Opacity="0" RenderTransformOrigin="0.5,0.5" ImageSourceNoPreload="Game:\Media\UI\Textures\Data_Bound\Series14\Eliminator\UpgradeWidget\SlamGlow.png">
                    <local:FZMaterial.RenderTransform>
                        <ScaleTransform/>
                    </local:FZMaterial.RenderTransform>
                </local:FZMaterial>

                <Decorator x:Name="LeftChoiceContainer" Visibility="{Binding LeftChoice, Converter={StaticResource A_FZBooleanToVisibilityConverter}}" HorizontalAlignment="Left">
                    <Control x:Name="LeftChoice" Style="{StaticResource A_Style_Control_EliminatorCar_Upgrade_GradeAlignedRight}" DataContext="{Binding LeftChoice.CarInfo}"/>
                </Decorator>

                <Decorator x:Name="RightChoiceContainer" Visibility="{Binding RightChoice, Converter={StaticResource A_FZBooleanToVisibilityConverter}}" HorizontalAlignment="Right" >
                    <Control x:Name="RightChoice" Style="{StaticResource A_Style_Control_EliminatorCar_Upgrade_GradeAlignedLeft}" DataContext="{Binding RightChoice.CarInfo}"/>
                </Decorator>

                <Control x:Name="InputDial" Margin="0" Opacity="0" Style="{StaticResource A_Style_Control_Dial_Eliminator}" 
                     HorizontalAlignment="Center" VerticalAlignment="Center">
                    <Control.RenderTransform>
                        <ScaleTransform/>
                    </Control.RenderTransform>
                </Control>
                <local:FZMaterial x:Name="SlamSheen" Opacity="0" Preset="{StaticResource A_FZMaterialPresetAdditive}" Width="100" Height="100" VerticalAlignment="Center" HorizontalAlignment="Center">
                    <local:FZMaterial.Effect>
                        <local:TextureMaskEffect>
                            <local:TextureMaskEffect.Texture>
                                <ImageBrush ImageSource="{StaticResource A_BitmapImage_Dial_Silhouette}"/>
                            </local:TextureMaskEffect.Texture>
                            <local:TextureMaskEffect.Mask>
                                <ImageBrush ImageSource="{StaticResource A_BitmapImage_Gradient}"/>
                            </local:TextureMaskEffect.Mask>
                        </local:TextureMaskEffect>
                    </local:FZMaterial.Effect>
                </local:FZMaterial>
            </Grid>

            <StackPanel x:Name="DownChoice" Orientation="Horizontal" Opacity="0" Visibility="{Binding DownChoice, Converter={StaticResource A_FZBooleanToVisibilityConverter}}" 
                    VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="12,0,12,18" Height="34">
                <Decorator Visibility="{Binding ShouldShowAsDpad, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}">
                    <local:ControllerButtonControl DataContext="{Binding DownChoice}"
                                                   Margin="0,0,2,0" VerticalAlignment="Center" HorizontalAlignment="Left"
                                                   UseLargeIcon="True"
                                                   Style="{StaticResource A_Style_ControllerButtonControl_Status_Default}" />
                </Decorator>
                <Decorator LayoutTransform="{StaticResource A_SkewTransform_HUD_Italics}" VerticalAlignment="Center">
                    <local:FZTextBlock Text="{Binding Source={local:Loc HelpButtons.IDS_Cancel}, Converter={StaticResource A_StringToUpper}}" Style="{StaticResource A_Style_FZTextBlock_HudMedium}"
                                       VerticalAlignment="Center" />
                </Decorator>
            </StackPanel>
        </Grid>
    </Decorator>

    <local:EventFire.FzTriggers>
        <!-- Animations for resetting visibility properites (events invoked in hidden visual state) -->
        <local:BeginUIStoryboard local:EventFireTrigger.Event="ResetAnimation">
            <local:BeginUIStoryboard.Storyboard>
                <local:UIStoryboard BeginTime="0:0:0.5">
                    <local:UIStoryboard.TriggerAnimation>
                        <local:RaiseFzEvent Storyboard.TargetName="InputDial"
                                                EventName="ResetDPad"/>
                        <local:RaiseFzEvent Storyboard.TargetName="LeftChoice"
                                                EventName="ResetRibbon"/>
                        <local:RaiseFzEvent Storyboard.TargetName="RightChoice"
                                                EventName="ResetRibbon"/>
                    </local:UIStoryboard.TriggerAnimation>

                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="DownChoice">
                        <DiscreteDoubleKeyFrame KeyTime="0" Value="0"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="LeftChoice">
                        <DiscreteDoubleKeyFrame KeyTime="0" Value="1"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="RightChoice">
                        <DiscreteDoubleKeyFrame KeyTime="0" Value="1"/>
                    </DoubleAnimationUsingKeyFrames>
                </local:UIStoryboard>
            </local:BeginUIStoryboard.Storyboard>
        </local:BeginUIStoryboard>

        <!--Animations for showing (events invoked in shown visual state)-->
        <local:StartAudioTrigger EventName="AudioUITrigger_E3_Forzathon_WinFlash" local:EventFireTrigger.Event="ShowAnimation" local:TriggerAnimation.KeyTime="0:0:0.0"/>
        <local:BeginUIStoryboard local:EventFireTrigger.Event="ShowAnimation">
            <local:BeginUIStoryboard.Storyboard>
                <local:UIStoryboard BeginTime="0:0:0.32">
                    <local:UIStoryboard.TriggerAnimation>
                        <local:RaiseFzEvent Storyboard.TargetName="InputDial"
                                            EventName="ShowAnimationDPad"/>
                        <local:RaiseFzEvent Storyboard.TargetName="LeftChoice"
                                            EventName="ShowRibbon"/>
                        <local:RaiseFzEvent Storyboard.TargetName="RightChoice"
                                            EventName="ShowRibbon"/>
                    </local:UIStoryboard.TriggerAnimation>

                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DownChoice">
                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"  Value="0" />
                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.40" Value="0"/>
                        <EasingDoubleKeyFrame   KeyTime="0:0:0.60" Value="1.0" EasingFunction="{StaticResource A_EasingFunction_EaseInSine}"/>
                    </DoubleAnimationUsingKeyFrames>
                </local:UIStoryboard>
            </local:BeginUIStoryboard.Storyboard>
        </local:BeginUIStoryboard>
        <local:BeginUIStoryboard local:EventFireTrigger.Event="ShowAnimation"
                         local:EventFireTrigger.TargetName="InputDial"
                         Storyboard="{StaticResource A_Storyboard_UpgradeChoiceShow_Dial}"/>
        <local:BeginUIStoryboard local:EventFireTrigger.Event="ShowAnimation"
                         local:EventFireTrigger.TargetName="SlamGlow"
                         Storyboard="{StaticResource A_Storyboard_SlamGlow}"/>
        <local:BeginUIStoryboard local:EventFireTrigger.Event="ShowAnimation"
                         local:EventFireTrigger.TargetName="SlamSheen"
                         Storyboard="{StaticResource A_Storyboard_Dial_SlamSheen}"/>

        <!--Animations for selecting (event raised from in control)-->
        <local:StartAudioTrigger EventName="/Master/UI/PlaygroundGames/HZ2_SFX_HUD_PlaygroundGames_InfectionGivenPlayer_01" local:EventFireTrigger.Event="LeftActivated"/>
        <local:BeginUIStoryboard local:EventFireTrigger.Event="LeftActivated">
            <local:BeginUIStoryboard.Storyboard>
                <local:UIStoryboard>
                    <local:UIStoryboard.TriggerAnimation>
                        <local:RaiseFzEvent Storyboard.TargetName="LeftChoice"
                                            EventName="ShowSelectionAnimationOn"/>
                        <local:RaiseFzEvent Storyboard.TargetName="RightChoice"
                                            EventName="SelectionDisabled"/>
                        <local:RaiseFzEvent Storyboard.TargetName="InputDial"
                                            EventName="LeftSideOn"/>
                        <local:RaiseFzEvent EventName="SelectionComplete" local:TriggerAnimation.KeyTime="0:0:0.9"/>
                    </local:UIStoryboard.TriggerAnimation>
                </local:UIStoryboard>
            </local:BeginUIStoryboard.Storyboard>
        </local:BeginUIStoryboard>

        <!--Animations for selecting (event raised from in control)-->
        <local:StartAudioTrigger EventName="/Master/UI/PlaygroundGames/HZ2_SFX_HUD_PlaygroundGames_InfectionGivenPlayer_01" local:EventFireTrigger.Event="RightActivated"/>
        <local:BeginUIStoryboard local:EventFireTrigger.Event="RightActivated">
            <local:BeginUIStoryboard.Storyboard>
                <local:UIStoryboard>
                    <local:UIStoryboard.TriggerAnimation>
                        <local:RaiseFzEvent Storyboard.TargetName="RightChoice"
                                            EventName="ShowSelectionAnimationOn"/>
                        <local:RaiseFzEvent Storyboard.TargetName="LeftChoice"
                                            EventName="SelectionDisabled"/>
                        <local:RaiseFzEvent Storyboard.TargetName="InputDial"
                                            EventName="RightSideOn"/>
                        <local:RaiseFzEvent EventName="SelectionComplete" local:TriggerAnimation.KeyTime="0:0:0.9"/>
                    </local:UIStoryboard.TriggerAnimation>
                </local:UIStoryboard>
            </local:BeginUIStoryboard.Storyboard>
        </local:BeginUIStoryboard>

        <local:BeginUIStoryboard local:EventFireTrigger.Event="DownActivated">
            <local:BeginUIStoryboard.Storyboard>
                <local:UIStoryboard>
                    <local:UIStoryboard.TriggerAnimation>
                        <local:RaiseFzEvent EventName="SelectionComplete" local:TriggerAnimation.KeyTime="0:0:0"/>
                    </local:UIStoryboard.TriggerAnimation>
                </local:UIStoryboard>
            </local:BeginUIStoryboard.Storyboard>
        </local:BeginUIStoryboard>
    </local:EventFire.FzTriggers>

</UserControl>