<UserControl 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:System="clr-namespace:System;assembly=mscorlib"
             xmlns:local="clr-namespace:ForzaUI"
             mc:Ignorable="d"
             x:Class="ForzaUI.HUDRaceVersusControl"
             Margin="0,0,0,0"
             HorizontalAlignment="Center"
             VerticalAlignment="Center">

    <UserControl.Resources>
        <ResourceDictionary>
            <KeyTime x:Key="A_KeyTime_Shown_To_Hidden_Time">0:0:0.24</KeyTime>
            <CircleEase x:Key="A_EasingFunction_EaseInCirc" EasingMode="EaseIn"/>
            <SineEase x:Key="A_EasingFunction_EaseInSine" EasingMode="EaseIn"/>
            <SineEase x:Key="A_EasingFunction_EaseOutSine" EasingMode="EaseOut"/>
            <SineEase x:Key="A_EasingFunction_EaseInOutSine" EasingMode="EaseInOut"/>

            <TransformGroup x:Key="A_TransformGroup_SkewRotateTextCarname">
                <SkewTransform AngleX="-8"/>
                <RotateTransform Angle="-6.5"/>
                <TranslateTransform Y="-6"/>
            </TransformGroup>

            <TransformGroup x:Key="A_TransformGroup_SkewRotateTextPlayername">
                <SkewTransform AngleX="-15"/>
                <RotateTransform Angle="-6.5"/>
                <TranslateTransform Y="-6"/>
            </TransformGroup>

            <!-- VS SLASH Sheen Resources-->
            <ImageSource x:Key="A_BitmapImage_VS_Silhouette">/ForzaUI;component/Textures/Data_Bound/Eliminator/VS_Hud/VSMask.png</ImageSource>
            <ImageSource x:Key="A_BitmapImage_VS_Gradient">/ForzaUI;component/Textures/Anthem/TextureMaskGradients/Diagonal_Gradient.png</ImageSource>
            
            <System:Double x:Key="A_Double_VSSheen_Start">-0.75</System:Double>
            <System:Double x:Key="A_Double_VSSheen_End">1.75</System:Double>
            <System:Double x:Key="A_Double_VSSheen_InnerRadius">0.035</System:Double>
            <System:Double x:Key="A_Double_VSSheen_OuterRadius">0.150</System:Double>

            <System:TimeSpan x:Key="A_Duration_VSSheen">0:0:1.2</System:TimeSpan>
            <KeyTime x:Key="A_KeyTime_VSSheen_Start">0:0:0.24</KeyTime>
            <local:OffsetKeyTime x:Key="A_KeyTime_VSSheen_End"
                KeyTime="{StaticResource A_KeyTime_VSSheen_Start}"
                Offset="{StaticResource A_Duration_VSSheen}"/>

            <local:LinearTransformConverter x:Key="A_Converter_VSSheen_FadeInStart"
                Sub="{StaticResource A_Double_VSSheen_OuterRadius}"/>
            <local:LinearTransformConverter x:Key="A_Converter_VSSheen_FadeInEnd"
                Sub="{StaticResource A_Double_VSSheen_InnerRadius}"/>
            <local:LinearTransformConverter x:Key="A_Converter_VSSheen_FadeOutStart"
                Add="{StaticResource A_Double_VSSheen_InnerRadius}"/>
            <local:LinearTransformConverter x:Key="A_Converter_VSSheen_FadeOutEnd"
                Add="{StaticResource A_Double_VSSheen_OuterRadius}"/>


            <!-- VSSlash sheen resources -->
            <System:Double x:Key="A_Double_SlashSheen_Start">1.75</System:Double>
            <System:Double x:Key="A_Double_SlashSheen_End">-0.75</System:Double>
            <System:Double x:Key="A_Double_SlashSheen_InnerRadius">0.035</System:Double>
            <System:Double x:Key="A_Double_SlashSheen_OuterRadius">0.150</System:Double>

            <System:TimeSpan x:Key="A_Duration_SlashSheen">0:0:0.92</System:TimeSpan>
            <KeyTime x:Key="A_KeyTime_SlashSheen_Start">0:0:0.28</KeyTime>
            <local:OffsetKeyTime x:Key="A_KeyTime_SlashSheen_End"
                KeyTime="{StaticResource A_KeyTime_SlashSheen_Start}"
                Offset="{StaticResource A_Duration_SlashSheen}"/>

            <local:LinearTransformConverter x:Key="A_Converter_SlashSheen_FadeInStart"
                Sub="{StaticResource A_Double_SlashSheen_OuterRadius}"/>
            <local:LinearTransformConverter x:Key="A_Converter_SlashSheen_FadeInEnd"
                Sub="{StaticResource A_Double_SlashSheen_InnerRadius}"/>
            <local:LinearTransformConverter x:Key="A_Converter_SlashSheen_FadeOutStart"
                Add="{StaticResource A_Double_SlashSheen_InnerRadius}"/>
            <local:LinearTransformConverter x:Key="A_Converter_SlashSheen_FadeOutEnd"
                Add="{StaticResource A_Double_SlashSheen_OuterRadius}"/>

            <Style x:Key="A_Style_FZMaterial_Effect_SlashSheen" TargetType="local:FZMaterial">
                <Setter Property="Opacity" Value="0"/>
                <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetAdditive}" />
                <Setter Property="local:BindingProxy.A" Value="{StaticResource A_Double_SlashSheen_Start}"/>
                <Setter Property="Width" Value="167"/> 
                <Setter Property="Height" Value="195"/>

                <Setter Property="Effect">
                    <Setter.Value>
                        <local:TextureMaskEffect FadeInStart="{Binding (local:BindingProxy.A), RelativeSource={RelativeSource AncestorType={x:Type local:FZMaterial}}, Converter={StaticResource A_Converter_SlashSheen_FadeInStart}}"
                                                     FadeInEnd="{Binding (local:BindingProxy.A), RelativeSource={RelativeSource AncestorType={x:Type local:FZMaterial}}, Converter={StaticResource A_Converter_SlashSheen_FadeInEnd}}"
                                                     FadeOutStart="{Binding (local:BindingProxy.A), RelativeSource={RelativeSource AncestorType={x:Type local:FZMaterial}}, Converter={StaticResource A_Converter_SlashSheen_FadeOutStart}}"
                                                     FadeOutEnd="{Binding (local:BindingProxy.A), RelativeSource={RelativeSource AncestorType={x:Type local:FZMaterial}}, Converter={StaticResource A_Converter_SlashSheen_FadeOutEnd}}">
                            <local:TextureMaskEffect.Texture>
                                <ImageBrush ImageSource="/ForzaUI;component/Textures/Data_Bound/Eliminator/VS_Hud/SlashMask_Bottom.png"/>
                            </local:TextureMaskEffect.Texture>
                            <local:TextureMaskEffect.Mask>
                                <ImageBrush ImageSource="/ForzaUI;component/Textures/Anthem/TextureMaskGradients/Vertical_Gradient.png"/>
                            </local:TextureMaskEffect.Mask>
                        </local:TextureMaskEffect>
                    </Setter.Value>
                </Setter>
            </Style>

            <Style x:Key="A_Style_FZMaterial_CarRibbon" TargetType="local:FZMaterial">
                <Setter Property="Width" Value="450"/>
                <Setter Property="Height" Value="150"/>
                <Setter Property="ImageSource" Value="/ForzaUI;component/Textures/Data_Bound/Eliminator/VS_Hud/CarNameRibbon.png"/>
                <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
                <Setter Property="Preset" Value="{Binding CarGrade, Converter={StaticResource A_Converter_Grade_To_Preset}}"/>
            </Style>

            <Style x:Key="A_Style_OpponentTag"
               TargetType="local:FZTextBlock"
               BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}">
                <Setter Property="Color"
                    Value="{StaticResource A_Color_White}" />
                <Setter Property="FontSize"
                    Value="74" />
                <Setter Property="VerticalAlignment"
                    Value="Center" />
            </Style>

            <Style x:Key="A_Style_CarTag"
               TargetType="local:FZTextBlock"
               BasedOn="{StaticResource A_Style_FZTextBlock_HorizonB}">
                <Setter Property="Color"
                    Value="{StaticResource A_Color_White}" />
                <Setter Property="FontSize"
                    Value="40" />
                <Setter Property="VerticalAlignment"
                    Value="Center" />
            </Style>

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

            <MappingConverter x:Key="A_MappingConverter_CarTag">
                <MappingConverterEntry Key="{NoCase BOLD}" Value="{StaticResource A_Style_FZRun_CarTag_BOLD}" />
            </MappingConverter>

            <ControlTemplate x:Key="A_Control_Template_PlayerSide" TargetType="Control">
                <Grid HorizontalAlignment="Center" VerticalAlignment="Center">

                    <Grid x:Name="PlayerCarInfo" DataContext="{Binding CarInfo}"  Margin="0,0,0,-50"
                          HorizontalAlignment="Center" VerticalAlignment="Bottom">
                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_CarRibbon}" 
                                          RenderTransform="{DynamicResource A_TransformGroup_HorizontalFlip}"
                                          Margin="{DynamicResource A_Dynamic_Thickness_Ribbon}"/>
                        <DockPanel HorizontalAlignment="{DynamicResource A_Dynamic_HorizontalAlignment}"
                                   RenderTransform="{StaticResource A_TransformGroup_SkewRotateTextCarname}"
                                   VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5" 
                                   Margin="{DynamicResource A_Dynamic_Thickness_CarNameDockPanel}">
                            <Decorator Width="20" DockPanel.Dock="{DynamicResource A_Dynamic_DockPanel_Dock}"/>
                            <local:FZMaterial ImageSourceNoPreload="{Binding CarGrade, Converter={StaticResource A_Converter_HUD_CarGradeLevelTexture}}" 
                                              DockPanel.Dock="{DynamicResource A_Dynamic_DockPanel_Dock}"
                                              HorizontalAlignment="Center" VerticalAlignment="Center"
                                              Width="80" Height="80" Margin="4,-30" />

                            <Decorator HorizontalAlignment="Center" VerticalAlignment="Center" 
                                       Margin="{DynamicResource A_Dynamic_Thickness_CarName}"
                                       DockPanel.Dock="{DynamicResource A_Dynamic_DockPanel_Dock}">
                                <local:FZTextBlock Style="{StaticResource A_Style_CarTag}" 
                                                   TextAlignment="{DynamicResource A_Dynamic_HorizontalAlignment}"
                                                   Effect="{StaticResource A_DropShadowEffect_DefaultHud}"
                                                   MarkupConverter="{StaticResource A_MappingConverter_CarTag}"
                                                   Text="{Binding CarDisplayName, Converter={StaticResource A_StringToUpper}}"
                                                   Width="600"/>
                            </Decorator>
                        </DockPanel>
                    </Grid>

                    <Decorator x:Name="PlayerName" RenderTransform="{StaticResource A_TransformGroup_SkewRotateTextPlayername}" 
                               VerticalAlignment="Top" Margin="{DynamicResource A_Dynamic_Thickness_GamertagSpace}"
                               RenderTransformOrigin="0.5,0.5">
                            <local:FZTextBlock Style="{StaticResource A_Style_OpponentTag}" 
                                               HorizontalAlignment="{DynamicResource A_Dynamic_HorizontalAlignment}" VerticalAlignment="Bottom"
                                           MaxWidth="550" Height="50" 
                                           TextAlignment="Right"
                                           Effect="{StaticResource A_DropShadowEffect_DefaultHud}"
                                           local:MultiStringFormatter.Format="{StaticResource A_String_01FormatString}"
                                           local:MultiStringFormatter.Param0=""
                                           local:MultiStringFormatter.Param1="{Binding UserProfile.FormattedGamertag, Converter={StaticResource A_StringToUpper}}"
                                           Text="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}}" />
                    </Decorator>
                </Grid>
            </ControlTemplate>

            <Style x:Key="A_Style_PlayerSide_Left" TargetType="Control">
                <Style.Resources>
                    <HorizontalAlignment x:Key="A_Dynamic_HorizontalAlignment">Right</HorizontalAlignment>
                    <Dock x:Key="A_Dynamic_DockPanel_Dock">Right</Dock>
                    <Thickness x:Key="A_Dynamic_Thickness_GamertagSpace">-100,10,40,0</Thickness>
                    <Thickness x:Key="A_Dynamic_Thickness_CarName">0,-4,0,0</Thickness>
                    <Thickness x:Key="A_Dynamic_Thickness_CarNameDockPanel">0,0,0,-15</Thickness>
                    <Thickness x:Key="A_Dynamic_Thickness_Ribbon">260,0,0,30</Thickness>
                    <TransformGroup x:Key="A_TransformGroup_HorizontalFlip">
                        <ScaleTransform ScaleY="1" ScaleX="1" />
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Style.Resources>
                <Setter Property="Template" Value="{StaticResource A_Control_Template_PlayerSide}"/>
            </Style>

            <Style x:Key="A_Style_PlayerSide_Right" TargetType="Control">
                <Style.Resources>
                    <HorizontalAlignment x:Key="A_Dynamic_HorizontalAlignment">Left</HorizontalAlignment>
                    <Dock x:Key="A_Dynamic_DockPanel_Dock">Left</Dock>
                    <Thickness x:Key="A_Dynamic_Thickness_GamertagSpace">44,-10,-100,0</Thickness>
                    <Thickness x:Key="A_Dynamic_Thickness_CarName">0,0,0,-4</Thickness>
                    <Thickness x:Key="A_Dynamic_Thickness_CarNameDockPanel">0,0,0,-5</Thickness>
                    <Thickness x:Key="A_Dynamic_Thickness_Ribbon">0,30,260,0</Thickness>
                    <TransformGroup x:Key="A_TransformGroup_HorizontalFlip">
                        <ScaleTransform ScaleY="-1" ScaleX="-1" />
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Style.Resources>
                <Setter Property="Template" Value="{StaticResource A_Control_Template_PlayerSide}"/>
            </Style>
        </ResourceDictionary>
    </UserControl.Resources>

    <Grid x:Name="PART_LayoutRoot"
          Opacity="0">
        <VisualStateManager.VisualStateGroups>
            <local:UIVisualStateGroup x:Name="VisualStateGroup">
                <VisualState x:Name="PART_Hidden">
                    <local:UIStoryboard>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="PART_LayoutRoot">
                            <LinearDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_Shown_To_Hidden_Time}" Value="0"/>
                        </DoubleAnimationUsingKeyFrames>

                        <local:UIStoryboard.TriggerAnimation>
                            <local:RaiseFzEvent EventName="HideComplete" local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_Shown_To_Hidden_Time}"/>
                        </local:UIStoryboard.TriggerAnimation>
                    </local:UIStoryboard>
                </VisualState>
                <VisualState Name="PART_Shown">
                    <local:UIStoryboard>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="PART_LayoutRoot">
                            <DiscreteDoubleKeyFrame KeyTime="0" Value="1"/>
                        </DoubleAnimationUsingKeyFrames>

                        <local:UIStoryboard.TriggerAnimation>
                            <local:RaiseFzEvent EventName="ShowAnimation"/>
                        </local:UIStoryboard.TriggerAnimation>
                    </local:UIStoryboard>
                </VisualState>
            </local:UIVisualStateGroup>
        </VisualStateManager.VisualStateGroups>
        <Grid>
            <Grid VerticalAlignment="Center" HorizontalAlignment="Center" Margin="20,0,0,110" Opacity="1">
                <!-- LEFT SIDE PLAYER -->
                <Control x:Name="LeftSide"
                         Style="{StaticResource A_Style_PlayerSide_Left}" DataContext="{Binding LeftPlayer}" Margin="0,0,475,270">
                    <Control.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform ScaleY="1" ScaleX="1" />
                            <SkewTransform/>
                            <RotateTransform/>
                            <TranslateTransform/>
                        </TransformGroup>
                    </Control.RenderTransform>
                </Control>

                <!-- RIGHT SIDE PLAYER -->
                <Control x:Name="RightSide"
                         Style="{StaticResource A_Style_PlayerSide_Right}" DataContext="{Binding RightPlayer}" Margin="475,0,0,156">
                    <Control.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform ScaleY="1" ScaleX="1" />
                            <SkewTransform/>
                            <RotateTransform/>
                            <TranslateTransform/>
                        </TransformGroup>
                    </Control.RenderTransform>
                </Control>

                <!-- MIDDLE -->
                <local:FZMaterial x:Name="VSSlash" RenderTransformOrigin="0.5,0.5" Opacity="0" ImageSource="/ForzaUI;component/Textures/Data_Bound/Eliminator/VS_Hud/VSSlash.png" Width="215" Height="270"
                                  local:AttachedTextureContextLoader.TextureContext="Eliminator" 
                                  local:AttachedTextureContextLoader.ContextFilterSource="{Binding TextureContextFilter}">
                    <local:FZMaterial.RenderTransform>
                        <ScaleTransform/>
                    </local:FZMaterial.RenderTransform>
                    <Grid>
                        <local:FZMaterial x:Name="VSSlashSheen_Down" Style="{StaticResource A_Style_FZMaterial_Effect_SlashSheen}" VerticalAlignment="Bottom" HorizontalAlignment="Left"/>
                        <local:FZMaterial x:Name="VSSlashSheen_Up" Style="{StaticResource A_Style_FZMaterial_Effect_SlashSheen}" VerticalAlignment="Top" HorizontalAlignment="Right"
                                      RenderTransformOrigin="0.5,0.5">
                            <local:FZMaterial.RenderTransform>
                                <ScaleTransform ScaleX="-1" ScaleY="-1"/>
                            </local:FZMaterial.RenderTransform>
                        </local:FZMaterial>
                    </Grid>
                </local:FZMaterial>

                <Grid Opacity="1">
                    <local:FZMaterial x:Name="VSDropShadow"
                                      Style="{StaticResource A_Style_FZMaterial_TextMenuItemShadow}"
                                      Width="250" Height="235"/>

                    <local:FZMaterial x:Name="VS" Opacity="0" 
                                      ImageSource="/ForzaUI;component/Textures/Data_Bound/Eliminator/VS_Hud/VS.png" 
                                      Width="262" Height="235" RenderTransformOrigin="0.5,0.5"
                                      local:AttachedTextureContextLoader.TextureContext="Eliminator" 
                                      local:AttachedTextureContextLoader.ContextFilterSource="{Binding TextureContextFilter}">
                        <local:FZMaterial.RenderTransform>
                                <ScaleTransform/>
                        </local:FZMaterial.RenderTransform>
                    </local:FZMaterial>
                    
                    <local:FZMaterial x:Name="VSSheen" Opacity="0" Preset="{StaticResource A_FZMaterialPresetAdditive}" 
                                      local:BindingProxy.A="{StaticResource A_Double_VSSheen_Start}"
                                      Width="227" Height="200" VerticalAlignment="Center" HorizontalAlignment="Center">
                        <local:FZMaterial.Effect>
                            <local:TextureMaskEffect FadeInStart="{Binding (local:BindingProxy.A), RelativeSource={RelativeSource AncestorType={x:Type local:FZMaterial}}, Converter={StaticResource A_Converter_VSSheen_FadeInStart}}"
                                                     FadeInEnd="{Binding (local:BindingProxy.A), RelativeSource={RelativeSource AncestorType={x:Type local:FZMaterial}}, Converter={StaticResource A_Converter_VSSheen_FadeInEnd}}"
                                                     FadeOutStart="{Binding (local:BindingProxy.A), RelativeSource={RelativeSource AncestorType={x:Type local:FZMaterial}}, Converter={StaticResource A_Converter_VSSheen_FadeOutStart}}"
                                                     FadeOutEnd="{Binding (local:BindingProxy.A), RelativeSource={RelativeSource AncestorType={x:Type local:FZMaterial}}, Converter={StaticResource A_Converter_VSSheen_FadeOutEnd}}">
                                <local:TextureMaskEffect.Texture>
                                    <ImageBrush ImageSource="{StaticResource A_BitmapImage_VS_Silhouette}"/>
                                </local:TextureMaskEffect.Texture>
                                <local:TextureMaskEffect.Mask>
                                    <ImageBrush ImageSource="{StaticResource A_BitmapImage_VS_Gradient}"/>
                                </local:TextureMaskEffect.Mask>
                            </local:TextureMaskEffect>
                        </local:FZMaterial.Effect>
                    </local:FZMaterial>
                    
                    <local:FZMaterial x:Name="VSGlow" ImageSource="/ForzaUI;component/Textures/Data_Bound/Eliminator/VS_Hud/VSGlow.png" Opacity="0" Width="350" Height="300" Margin="0,0,0,-10" 
                                      local:AttachedTextureContextLoader.TextureContext="Eliminator" 
                                      local:AttachedTextureContextLoader.ContextFilterSource="{Binding TextureContextFilter}"/>
                </Grid>

            </Grid>
        </Grid>
    </Grid>

    <local:EventFire.FzTriggers>
        <local:StartAudioTrigger EventName="AudioUITrigger_ELM_Versus_Appear" 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.0" FillBehavior="HoldEnd">
                    <!-- Ribbon Animations -->
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="RightSide">
                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0" Value="148"/>
                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.4" Value="148"/>
                        <EasingDoubleKeyFrame KeyTime="0:0:0.56" Value="214" EasingFunction="{StaticResource A_EasingFunction_EaseInCirc}"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="RightSide">
                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0" Value="50"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="RightSide">
                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0" Value="0.0"/>
                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.4" Value="0.0"/>
                        <EasingDoubleKeyFrame KeyTime="0:0:0.56" Value="1.0" EasingFunction="{StaticResource A_EasingFunction_EaseInCirc}"/>
                    </DoubleAnimationUsingKeyFrames>

                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="LeftSide">
                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0" Value="-148"/>
                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.4" Value="-148"/>
                        <EasingDoubleKeyFrame KeyTime="0:0:0.56" Value="-214" EasingFunction="{StaticResource A_EasingFunction_EaseInCirc}"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="LeftSide">
                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0" Value="120"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="LeftSide">
                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0" Value="0.0"/>
                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.4" Value="0.0"/>
                        <EasingDoubleKeyFrame KeyTime="0:0:0.56" Value="1.0" EasingFunction="{StaticResource A_EasingFunction_EaseInCirc}"/>
                    </DoubleAnimationUsingKeyFrames>
                    
                    <!-- VS Animations -->
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)" Storyboard.TargetName="VS">
                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0" Value="0"/>
                        <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="1.0" EasingFunction="{StaticResource A_EasingFunction_EaseInCirc}"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" Storyboard.TargetName="VS">
                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0" Value="0"/>
                        <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="1.0" EasingFunction="{StaticResource A_EasingFunction_EaseInCirc}"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="VS">
                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0" Value="0"/>
                        <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="1.0" EasingFunction="{StaticResource A_EasingFunction_EaseInCirc}"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="VSGlow">
                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0" Value="0"/>
                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.36" Value="0"/>
                        <LinearDoubleKeyFrame KeyTime="0:0:0.56" Value="1.0"/>
                        <LinearDoubleKeyFrame KeyTime="0:0:0.92" Value="0.0"/>
                    </DoubleAnimationUsingKeyFrames>
                    
                    <!-- slashes -->
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)" Storyboard.TargetName="VSSlash">
                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0" Value="0"/>
                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.16" Value="0.1"/>
                        <EasingDoubleKeyFrame KeyTime="0:0:0.77" Value="1.33" EasingFunction="{StaticResource A_EasingFunction_EaseInSine}"/>
                        <EasingDoubleKeyFrame KeyTime="0:0:1.16" Value="1.0" EasingFunction="{StaticResource A_EasingFunction_EaseOutSine}"/>
                        <EasingDoubleKeyFrame KeyTime="0:0:3.2" Value="0.85" EasingFunction="{StaticResource A_EasingFunction_EaseInSine}"/>
                        <EasingDoubleKeyFrame KeyTime="0:0:3.44" Value="1.5" EasingFunction="{StaticResource A_EasingFunction_EaseOutSine}"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" Storyboard.TargetName="VSSlash">
                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0" Value="0"/>
                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.16" Value="0.1"/>
                        <EasingDoubleKeyFrame KeyTime="0:0:0.77" Value="1.33" EasingFunction="{StaticResource A_EasingFunction_EaseInSine}"/>
                        <EasingDoubleKeyFrame KeyTime="0:0:1.16" Value="1.0" EasingFunction="{StaticResource A_EasingFunction_EaseOutSine}"/>
                        <EasingDoubleKeyFrame KeyTime="0:0:3.2" Value="0.85" EasingFunction="{StaticResource A_EasingFunction_EaseInSine}"/>
                        <EasingDoubleKeyFrame KeyTime="0:0:3.44" Value="1.5" EasingFunction="{StaticResource A_EasingFunction_EaseOutSine}"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="VSSlash">
                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0" Value="0"/>
                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.16" Value="0"/>
                        <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="1.0" EasingFunction="{StaticResource A_EasingFunction_EaseInSine}"/>
                    </DoubleAnimationUsingKeyFrames>
                    <!-- Slash sheen -->
                    <SingleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="VSSlashSheen_Down">
                        <DiscreteSingleKeyFrame KeyTime="0:0:0.0" Value="1.0"/>
                    </SingleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames
                        Storyboard.TargetName="VSSlashSheen_Down"
                        Storyboard.TargetProperty="(local:BindingProxy.A)"
                        FillBehavior="Stop">
                        <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_SlashSheen_Start}"
                        Value="{StaticResource A_Double_SlashSheen_Start}"/>
                        <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_SlashSheen_End}"
                        Value="{StaticResource A_Double_SlashSheen_End}"
                        EasingFunction="{StaticResource A_EasingFunction_EaseInOutSine}" />
                    </DoubleAnimationUsingKeyFrames>
                    <SingleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="VSSlashSheen_Up">
                        <DiscreteSingleKeyFrame KeyTime="0:0:0.0" Value="1.0"/>
                    </SingleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames
                        Storyboard.TargetName="VSSlashSheen_Up"
                        Storyboard.TargetProperty="(local:BindingProxy.A)"
                        FillBehavior="Stop">
                        <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_SlashSheen_Start}"
                        Value="{StaticResource A_Double_SlashSheen_Start}"/>
                        <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_SlashSheen_End}"
                        Value="{StaticResource A_Double_SlashSheen_End}"
                        EasingFunction="{StaticResource A_EasingFunction_EaseInOutSine}" />
                    </DoubleAnimationUsingKeyFrames>

                    <!-- vs sheen -->
                    <DoubleAnimationUsingKeyFrames
                    Storyboard.TargetName="VSSheen"
                    Storyboard.TargetProperty="(local:BindingProxy.A)"
                    FillBehavior="Stop">
                        <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_VSSheen_Start}"
                        Value="{StaticResource A_Double_VSSheen_Start}"/>
                        <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_VSSheen_End}"
                        Value="{StaticResource A_Double_VSSheen_End}"
                        EasingFunction="{StaticResource A_EasingFunction_EaseInOutSine}" />
                    </DoubleAnimationUsingKeyFrames>

                    <SingleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="VSSheen">
                        <DiscreteSingleKeyFrame KeyTime="0:0:0.0" Value="1.0"/>
                    </SingleAnimationUsingKeyFrames>
                </local:UIStoryboard>
            </local:BeginUIStoryboard.Storyboard>
        </local:BeginUIStoryboard>

        <local:BeginUIStoryboard local:EventFireTrigger.Event="ShowAnimation">
            <local:BeginUIStoryboard.Storyboard>
                <local:UIStoryboard>
                    <local:UIStoryboard.TriggerAnimation>
                        <local:RaiseEntityModelEvent local:EventFireTrigger.Event="ShowAnimation" local:TriggerAnimation.KeyTime="0:0:3.3"
                                     EventName="RaceVersusAnimationFinishing" />
                    </local:UIStoryboard.TriggerAnimation>
                </local:UIStoryboard>
            </local:BeginUIStoryboard.Storyboard>
        </local:BeginUIStoryboard>
    </local:EventFire.FzTriggers>
</UserControl>
