<Page xmlns:local="clr-namespace:ForzaUI"
      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"
      x:Class="ForzaUI.A_PostRaceLeagueProgress"
      mc:Ignorable="d"
      x:Name="Page"
      Style="{StaticResource A_Style_Page_Generic}"
      DataContext="{Binding RelativeSource={RelativeSource Self}}">

    <local:UIPageTransitionManager.TransitionManager>
        <local:UIPageTransitionManager Preset="{StaticResource A_UIPageTransitionManagerPreset_NoAudio}"/>
    </local:UIPageTransitionManager.TransitionManager>

    <Page.Resources>
        <ResourceDictionary>
            <System:TimeSpan x:Key="A_TimeSpan_ProgressBar_BlendValueDelay">0:0:1.3</System:TimeSpan>
            <System:TimeSpan x:Key="A_TimeSpan_LeagueProgress_FinishedDelay">0:0:1.5</System:TimeSpan>
            <System:TimeSpan x:Key="A_TimeSpan_LeagueChangedText_ShowDelay">0:0:0.433</System:TimeSpan>
            <System:TimeSpan x:Key="A_TimeSpan_ProgressBar_NewLeagueShowDelay">0:0:1.6</System:TimeSpan>

            <System:TimeSpan x:Key="A_TimeSpan_ProgressCard_SwapDuration">0:0:0.267</System:TimeSpan>
            <System:TimeSpan x:Key="A_TimeSpan_ProgressCard_GlowDuration">0:0:0.6</System:TimeSpan>
            <System:TimeSpan x:Key="A_TimeSpan_ProgressCard_SheenMaxOpacityDuration">0:0:0.6</System:TimeSpan>
            <System:TimeSpan x:Key="A_TimeSpan_ProgressCard_SheenDuration">0:0:0.833</System:TimeSpan>

            <KeyTime x:Key="A_KeyTime_ProgressCard_SwapStart">0:0:0.0</KeyTime>

            <local:OffsetKeyTime x:Key="A_KeyTime_ProgressCard_SwapEnd"
                KeyTime="{StaticResource A_KeyTime_ProgressCard_SwapStart}"
                Offset="{StaticResource A_TimeSpan_ProgressCard_SwapDuration}"/>

            <local:OffsetKeyTime x:Key="A_KeyTime_ProgressCard_GlowStart"
                KeyTime="{StaticResource A_KeyTime_ProgressCard_SwapEnd}"
                Offset="0:0:0.0"/>

            <local:OffsetKeyTime x:Key="A_KeyTime_ProgressCard_GlowEnd"
                KeyTime="{StaticResource A_KeyTime_ProgressCard_GlowStart}"
                Offset="{StaticResource A_TimeSpan_ProgressCard_GlowDuration}"/>

            <local:OffsetKeyTime x:Key="A_KeyTime_ProgressCard_SheenStart"
                KeyTime="{StaticResource A_KeyTime_ProgressCard_SwapEnd}"
                Offset="0:0:0.0"/>

            <local:OffsetKeyTime x:Key="A_KeyTime_ProgressCard_SheenFadeOutStart"
                KeyTime="{StaticResource A_KeyTime_ProgressCard_SheenStart}"
                Offset="{StaticResource A_TimeSpan_ProgressCard_SheenMaxOpacityDuration}"/>

            <local:OffsetKeyTime x:Key="A_KeyTime_ProgressCard_SheenEnd"
                KeyTime="{StaticResource A_KeyTime_ProgressCard_SheenStart}"
                Offset="{StaticResource A_TimeSpan_ProgressCard_SheenDuration}"/>

            <KeyTime x:Key="A_KeyTime_TitleText_Show">0:0:0.167</KeyTime>
            <KeyTime x:Key="A_KeyTime_ProgressBar_Show">0:0:0.067</KeyTime>
            <KeyTime x:Key="A_KeyTime_ProgressCard_Show">0:0:0.0</KeyTime>

            <local:OffsetKeyTime x:Key="A_KeyTime_ProgressBar_BlendValueStart_OriginalLeagueAbsolute"
                KeyTime="0:0:0.0"
                Offset="{StaticResource A_TimeSpan_ProgressBar_BlendValueDelay}"/>

            <local:OffsetKeyTime x:Key="A_KeyTime_ProgressBar_BlendValueEnd_OriginalLeagueAbsolute"
                KeyTime="{StaticResource A_KeyTime_ProgressBar_BlendValueStart_OriginalLeagueAbsolute}"
                Offset="{StaticResource A_TimeSpan_LeagueProgress_ProgressBar_BlendValueDuration}"/>

            <local:OffsetKeyTime x:Key="A_KeyTime_LeagueChangedText_Show"
                KeyTime="{StaticResource A_KeyTime_ProgressBar_BlendValueEnd_OriginalLeagueAbsolute}"
                Offset="{StaticResource A_TimeSpan_LeagueChangedText_ShowDelay}"/>

            <local:OffsetKeyTime x:Key="A_KeyTime_ProgressBar_NewLeague_Show"
                KeyTime="{StaticResource A_KeyTime_LeagueChangedText_Show}"
                Offset="{StaticResource A_TimeSpan_ProgressBar_NewLeagueShowDelay}"/>

            <local:OffsetKeyTime x:Key="A_KeyTime_ProgressBar_BlendValueStart_NewLeagueAbsolute"
                KeyTime="{StaticResource A_KeyTime_ProgressBar_NewLeague_Show}"
                Offset="{StaticResource A_TimeSpan_ProgressBar_BlendValueDelay}"/>

            <local:OffsetKeyTime x:Key="A_KeyTime_ProgressBar_BlendValueEnd_NewLeagueAbsolute"
                KeyTime="{StaticResource A_KeyTime_ProgressBar_BlendValueStart_NewLeagueAbsolute}"
                Offset="{StaticResource A_TimeSpan_LeagueProgress_ProgressBar_BlendValueDuration}"/>

            <local:OffsetKeyTime x:Key="A_KeyTime_LeagueProgress_UnchangedFinished"
                KeyTime="{StaticResource A_KeyTime_ProgressBar_BlendValueEnd_OriginalLeagueAbsolute}"
                Offset="{StaticResource A_TimeSpan_LeagueProgress_FinishedDelay}"/>

            <local:OffsetKeyTime x:Key="A_KeyTime_LeagueProgress_ChangedFinished"
                KeyTime="{StaticResource A_KeyTime_ProgressBar_BlendValueEnd_NewLeagueAbsolute}"
                Offset="{StaticResource A_TimeSpan_LeagueProgress_FinishedDelay}"/>

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

            <local:FZMaterialPresetRoundtangle x:Key="A_Preset_FZMaterial_Gradient_Tier1_OuterTop" BasedOn="{StaticResource A_Preset_FZMaterial_Gradient_Tier_1}" CornerRadius="{StaticResource A_CornerRadius_Outer_Top}"/>
            <local:FZMaterialPresetRoundtangle x:Key="A_Preset_FZMaterial_Gradient_Tier2_OuterTop" BasedOn="{StaticResource A_Preset_FZMaterial_Gradient_Tier_2}" CornerRadius="{StaticResource A_CornerRadius_Outer_Top}"/>
            <local:FZMaterialPresetRoundtangle x:Key="A_Preset_FZMaterial_Gradient_Tier3_OuterTop" BasedOn="{StaticResource A_Preset_FZMaterial_Gradient_Tier_3}" CornerRadius="{StaticResource A_CornerRadius_Outer_Top}"/>
            <local:FZMaterialPresetRoundtangle x:Key="A_Preset_FZMaterial_Gradient_Tier4_OuterTop" BasedOn="{StaticResource A_Preset_FZMaterial_Gradient_Tier_4}" CornerRadius="{StaticResource A_CornerRadius_Outer_Top}"/>
            <local:FZMaterialPresetRoundtangle x:Key="A_Preset_FZMaterial_Gradient_Tier_Grandmaster_OuterTop" BasedOn="{StaticResource A_Preset_FZMaterial_Gradient_Tier_Grandmaster}" CornerRadius="{StaticResource A_CornerRadius_Outer_Top}"/>
            <local:FZMaterialPresetRoundtangle x:Key="A_Preset_FZMaterial_Gradient_Tier_Unranked_OuterTop" BasedOn="{StaticResource A_Preset_FZMaterial_Gradient_Tier_Unranked}" CornerRadius="{StaticResource A_CornerRadius_Outer_Top}"/>

            <local:MappingConverter x:Key="A_Converter_League_ID_To_GradientPreset_OuterTop" Default="{StaticResource A_Preset_FZMaterial_Gradient_Tier_Unranked_OuterTop}">
                <local:MappingConverterEntry Key="20" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier1_OuterTop}"/>
                <local:MappingConverterEntry Key="19" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier1_OuterTop}"/>
                <local:MappingConverterEntry Key="18" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier1_OuterTop}"/>
                <local:MappingConverterEntry Key="17" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier1_OuterTop}"/>
                <local:MappingConverterEntry Key="16" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier1_OuterTop}"/>
                <local:MappingConverterEntry Key="15" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier2_OuterTop}"/>
                <local:MappingConverterEntry Key="14" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier2_OuterTop}"/>
                <local:MappingConverterEntry Key="13" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier2_OuterTop}"/>
                <local:MappingConverterEntry Key="12" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier2_OuterTop}"/>
                <local:MappingConverterEntry Key="11" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier2_OuterTop}"/>
                <local:MappingConverterEntry Key="10" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier3_OuterTop}"/>
                <local:MappingConverterEntry Key="9" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier3_OuterTop}"/>
                <local:MappingConverterEntry Key="8" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier3_OuterTop}"/>
                <local:MappingConverterEntry Key="7" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier3_OuterTop}"/>
                <local:MappingConverterEntry Key="6" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier3_OuterTop}"/>
                <local:MappingConverterEntry Key="5" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier4_OuterTop}"/>
                <local:MappingConverterEntry Key="4" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier4_OuterTop}"/>
                <local:MappingConverterEntry Key="3" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier4_OuterTop}"/>
                <local:MappingConverterEntry Key="2" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier4_OuterTop}"/>
                <local:MappingConverterEntry Key="1" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier4_OuterTop}"/>
                <local:MappingConverterEntry Key="0" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_Grandmaster_OuterTop}"/>
            </local:MappingConverter>

            <local:FZMaterialPresetRoundtangle x:Key="A_Preset_FZMaterial_Gradient_Tier1_Horiz_InnerAll"
                BasedOn="{StaticResource A_Preset_FZMaterial_Gradient_Tier_1_Horiz}"
                CornerRadius="{StaticResource A_CornerRadius_Inner_All}"/>
            <local:FZMaterialPresetRoundtangle x:Key="A_Preset_FZMaterial_Gradient_Tier2_Horiz_InnerAll"
                BasedOn="{StaticResource A_Preset_FZMaterial_Gradient_Tier_2_Horiz}"
                CornerRadius="{StaticResource A_CornerRadius_Inner_All}"/>
            <local:FZMaterialPresetRoundtangle x:Key="A_Preset_FZMaterial_Gradient_Tier3_Horiz_InnerAll"
                BasedOn="{StaticResource A_Preset_FZMaterial_Gradient_Tier_3_Horiz}"
                CornerRadius="{StaticResource A_CornerRadius_Inner_All}"/>
            <local:FZMaterialPresetRoundtangle x:Key="A_Preset_FZMaterial_Gradient_Tier4_Horiz_InnerAll"
                BasedOn="{StaticResource A_Preset_FZMaterial_Gradient_Tier_4_Horiz}"
                CornerRadius="{StaticResource A_CornerRadius_Inner_All}"/>
            <local:FZMaterialPresetRoundtangle x:Key="A_Preset_FZMaterial_Gradient_Tier_Grandmaster_Horiz_InnerAll"
                BasedOn="{StaticResource A_Preset_FZMaterial_Gradient_Tier_Grandmaster_Horiz}"
                CornerRadius="{StaticResource A_CornerRadius_Inner_All}"/>
            <local:FZMaterialPresetRoundtangle x:Key="A_Preset_FZMaterial_Gradient_Tier_Unranked_Horiz_InnerAll"
                BasedOn="{StaticResource A_Preset_FZMaterial_Gradient_Tier_Unranked_Horiz}"
                CornerRadius="{StaticResource A_CornerRadius_Inner_All}"/>

            <local:MappingConverter x:Key="A_Converter_League_ID_To_GradientPreset_Horiz_InnerAll" Default="{StaticResource A_Preset_FZMaterial_Gradient_Tier_Unranked_Horiz_InnerAll}">
                <local:MappingConverterEntry Key="20" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier1_Horiz_InnerAll}"/>
                <local:MappingConverterEntry Key="19" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier1_Horiz_InnerAll}"/>
                <local:MappingConverterEntry Key="18" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier1_Horiz_InnerAll}"/>
                <local:MappingConverterEntry Key="17" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier1_Horiz_InnerAll}"/>
                <local:MappingConverterEntry Key="16" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier1_Horiz_InnerAll}"/>
                <local:MappingConverterEntry Key="15" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier2_Horiz_InnerAll}"/>
                <local:MappingConverterEntry Key="14" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier2_Horiz_InnerAll}"/>
                <local:MappingConverterEntry Key="13" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier2_Horiz_InnerAll}"/>
                <local:MappingConverterEntry Key="12" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier2_Horiz_InnerAll}"/>
                <local:MappingConverterEntry Key="11" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier2_Horiz_InnerAll}"/>
                <local:MappingConverterEntry Key="10" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier3_Horiz_InnerAll}"/>
                <local:MappingConverterEntry Key="9" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier3_Horiz_InnerAll}"/>
                <local:MappingConverterEntry Key="8" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier3_Horiz_InnerAll}"/>
                <local:MappingConverterEntry Key="7" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier3_Horiz_InnerAll}"/>
                <local:MappingConverterEntry Key="6" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier3_Horiz_InnerAll}"/>
                <local:MappingConverterEntry Key="5" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier4_Horiz_InnerAll}"/>
                <local:MappingConverterEntry Key="4" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier4_Horiz_InnerAll}"/>
                <local:MappingConverterEntry Key="3" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier4_Horiz_InnerAll}"/>
                <local:MappingConverterEntry Key="2" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier4_Horiz_InnerAll}"/>
                <local:MappingConverterEntry Key="1" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier4_Horiz_InnerAll}"/>
                <local:MappingConverterEntry Key="0" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_Unranked_Horiz_InnerAll}"/>
            </local:MappingConverter>

            <Style x:Key="A_Style_FrameworkElement_Flippable" TargetType="{x:Type FrameworkElement}">
                <Setter Property="local:ZPanel.TransformOrigin" Value="0.5,0.5"/>
                <Setter Property="local:ZPanel.Transform">
                    <Setter.Value>
                        <local:XRotation Angle="0"/>
                    </Setter.Value>
                </Setter>
            </Style>

            <Style x:Key="A_Style_FZTextBlock_LeagueProgressCard_RankedValue"
                TargetType="{x:Type local:FZTextBlock}"
                BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}">
                <Setter Property="CapHeight" Value="36"/>
                <Setter Property="Color" Value="{StaticResource A_Color_Tile_Text}"/>
                <Setter Property="HorizontalAlignment" Value="Center"/>
                <Setter Property="Visibility" Value="{Binding IsUnranked, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}"/>
            </Style>

            <Style x:Key="A_Style_FZTextBlock_LeagueProgressCard_UnrankedValue"
                TargetType="{x:Type local:FZTextBlock}"
                BasedOn="{StaticResource A_Style_FZTextBlock_LeagueProgressCard_RankedValue}">
                <Setter Property="Visibility" Value="{Binding IsUnranked, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"/>
                <Setter Property="Color" Value="{StaticResource A_Color_Tile_Text_Highlight}"/>
            </Style>

            <Style x:Key="A_Style_FZMaterial_LeagueProgressShadow"
                TargetType="{x:Type local:FZMaterial}"
                BasedOn="{StaticResource A_Style_FZMaterial_ShadowBase_ForSubgraph}">
                <Setter Property="Color" Value="{StaticResource A_Color_UISelfShadow}"/>
                <Setter Property="Preset">
                    <Setter.Value>
                        <local:FZMaterialPresetRoundtangle Softness="30" CornerRadius="20" />
                    </Setter.Value>
                </Setter>
            </Style>

            <ControlTemplate x:Key="A_ControlTemplate_LeagueProgress_Card"
                TargetType="{x:Type Control}">
                <Grid x:Name="CardContainer"
                    Style="{StaticResource A_Style_Grid_MotionBlur}"
                    RenderTransformOrigin="0.5,0.5"
                    Opacity="0">
                    <Grid.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform/>
                            <SkewTransform/>
                            <RotateTransform/>
                            <TranslateTransform/>
                        </TransformGroup>
                    </Grid.RenderTransform>
                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_MotionBlurExpander}" />
                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_LeagueProgressShadow}"/>
                    <DockPanel>
                        <local:FZMaterial DockPanel.Dock="Bottom"
                            Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterBottomOnly}"
                            Color="#FFFFFFFF"
                            Height="112">
                            <StackPanel Orientation="Vertical"
                                Margin="12,16,12,12"
                                VerticalAlignment="Top"
                                HorizontalAlignment="Center">
                                <local:FZTextBlock local:TextBlockInlineMarkup.Markup="{Binding LeagueNumber, Converter={StaticResource A_Converter_League_ID_To_LeagueName}}"
                                    local:TextBlockInlineMarkup.ResourceBaseName="A_Style_FZRun_"
                                    Style="{StaticResource A_Style_FZTextBlock_HorizonB}"
                                    CapHeight="26"
                                    Color="{StaticResource A_Color_Tile_Text}"
                                    HorizontalAlignment="Center"/>
                                    <Decorator Height="11"/>
                                <StackPanel x:Name="InitialValueAndDeltaContainer"
                                    Orientation="Horizontal"
                                    HorizontalAlignment="Center"
                                    Visibility="{Binding ShowCardInitialValueAndDelta, Converter={StaticResource A_FZBooleanToVisibilityConverter}}">
                                    <local:FZTextBlock Text="{Binding ProgressInitialValue, Converter={StaticResource A_NumUnitConverter_ShowUnit_0dp}}"
                                        Style="{StaticResource A_Style_FZTextBlock_LeagueProgressCard_RankedValue}"/>
                                    <local:FZTextBlock Text="{Binding ProgressInitialDelta, Converter={StaticResource A_NumUnitConverter_ShowUnit_0dp_Positive}}"
                                        Style="{StaticResource A_Style_FZTextBlock_LeagueProgressCard_RankedValue}"
                                        Color="{StaticResource A_Color_Tile_Text_Highlight}"/>
                                    <local:FZTextBlock Text="{Binding ProgressUnrankedInitialString}"
                                        Style="{StaticResource A_Style_FZTextBlock_LeagueProgressCard_UnrankedValue}"/>
                                </StackPanel>
                                <Grid x:Name="FinalValueContainer"
                                    Visibility="{Binding ShowCardFinalValue, Converter={StaticResource A_FZBooleanToVisibilityConverter}}">
                                    <local:FZTextBlock Text="{Binding ProgressFinalValue, Converter={StaticResource A_NumUnitConverter_ShowUnit_0dp}}"
                                        Style="{StaticResource A_Style_FZTextBlock_LeagueProgressCard_RankedValue}"
                                        Color="{StaticResource A_Color_Tile_Text_Highlight}"/>
                                    <local:FZTextBlock Text="{Binding ProgressUnrankedFinalString}"
                                        Style="{StaticResource A_Style_FZTextBlock_LeagueProgressCard_UnrankedValue}"/>
                                </Grid>
                            </StackPanel>
                        </local:FZMaterial>
                        <local:FZMaterial
                            Preset="{Binding LeagueNumber, Converter={StaticResource A_Converter_League_ID_To_GradientPreset_OuterTop}}"
                            Color="#FFFFFFFF">
                            <local:FZMaterial ImageSource="{Binding LeagueNumber, Converter={StaticResource A_MappingConverter_League_To_Emblem_Large}}"
                                Height="260"
                                Width="260"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"/>
                        </local:FZMaterial>
                    </DockPanel>
                    <local:FZMaterial x:Name="CardGlow"
                        ImageSource="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Card_Glow.png"
                        Color="#FFFFFFFF"
                        RenderTransformOrigin="0.5,0.5"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Opacity="0"
                        Width="354"
                        Height="460"
                        Preset="{StaticResource A_FZMaterialPresetAdditive}">
                        <local:FZMaterial.RenderTransform>
                            <TransformGroup>
                                <ScaleTransform/>
                                <SkewTransform/>
                                <RotateTransform/>
                                <TranslateTransform/>
                            </TransformGroup>
                        </local:FZMaterial.RenderTransform>
                    </local:FZMaterial>
                    <local:FZMaterial x:Name="CardSheen"
                        Color="#FFFFFFFF"
                        RenderTransformOrigin="0.5,0.5"
                        Opacity="0"
                        CaptureSubgraph="True">
                        <local:FZMaterial.Preset>
                            <local:FZMaterialPresetRoundtangle AlphaMode="Additive"
                                BasedOn="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterAll}"/>
                        </local:FZMaterial.Preset>
                        <Grid ClipToBounds="True">
                            <local:FZMaterial Color="#FFFFFFFF"/>
                            <local:FZMaterial x:Name="CardSheenCutout"
                                Color="#FF000000"
                                RenderTransformOrigin="0.5,0.5"
                                VerticalAlignment="Center"
                                HorizontalAlignment="Center"
                                Width="250"
                                Height="800">
                                <local:FZMaterial.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform/>
                                        <SkewTransform/>
                                        <RotateTransform Angle="45"/>
                                        <TranslateTransform Y="-525"/>
                                    </TransformGroup>
                                </local:FZMaterial.RenderTransform>
                                <local:FZMaterial.Preset>
                                    <local:FZMaterialPresetRoundtangle Softness="50"/>
                                </local:FZMaterial.Preset>
                            </local:FZMaterial>
                        </Grid>
                    </local:FZMaterial>
                    <local:EventFire.FzTriggers>
                        <local:EventFireTrigger Event="TransitionIn">
                            <local:EventFireTrigger.Storyboard>
                                <local:UIStoryboard>
                                    <DoubleAnimationUsingKeyFrames
                                        Storyboard.TargetName="{x:Null}"
                                        Storyboard.TargetProperty="(UIElement.Opacity)">
                                        <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_ProgressCard_SwapStart}"
                                            Value="0.0"/>
                                        <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_ProgressCard_SwapEnd}"
                                            Value="1.0"
                                            EasingFunction="{local:LinearEasing}" />
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames
                                        Storyboard.TargetName="{x:Null}"
                                        Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
                                        <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_ProgressCard_SwapStart}"
                                            Value="-500"/>
                                        <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_ProgressCard_SwapEnd}"
                                            Value="0"
                                            EasingFunction="{local:ExponentialEasing EasingMode=EaseInOut}" />
                                    </DoubleAnimationUsingKeyFrames>

                                    <DoubleAnimationUsingKeyFrames
                                        Storyboard.TargetName="CardGlow"
                                        Storyboard.TargetProperty="(UIElement.Opacity)">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                            Value="0.0"/>
                                        <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_ProgressCard_GlowStart}"
                                            Value="1.0"/>
                                        <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_ProgressCard_GlowEnd}"
                                            Value="0.0"
                                            EasingFunction="{local:ExponentialEasing EasingMode=EaseIn}" />
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames
                                        Storyboard.TargetName="CardGlow"
                                        Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                                        <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_ProgressCard_GlowStart}"
                                            Value="0.98"/>
                                        <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_ProgressCard_GlowEnd}"
                                            Value="1.15"
                                            EasingFunction="{local:LinearEasing}" />
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames
                                        Storyboard.TargetName="CardGlow"
                                        Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                        <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_ProgressCard_GlowStart}"
                                            Value="0.98"/>
                                        <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_ProgressCard_GlowEnd}"
                                            Value="1.15"
                                            EasingFunction="{local:LinearEasing}" />
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames
                                        Storyboard.TargetName="CardSheen"
                                        Storyboard.TargetProperty="(UIElement.Opacity)">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                            Value="0.0"/>
                                        <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_ProgressCard_SheenStart}"
                                            Value="0.65"/>
                                        <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_ProgressCard_SheenFadeOutStart}"
                                            Value="0.65"/>
                                        <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_ProgressCard_SheenEnd}"
                                            Value="0.0"
                                            EasingFunction="{local:LinearEasing}" />
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames
                                        Storyboard.TargetName="CardSheenCutout"
                                        Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
                                        <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_ProgressCard_SheenStart}"
                                            Value="-550"/>
                                        <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_ProgressCard_SheenEnd}"
                                            Value="550"
                                            EasingFunction="{local:LinearEasing}" />
                                    </DoubleAnimationUsingKeyFrames>
                                </local:UIStoryboard>
                            </local:EventFireTrigger.Storyboard>
                        </local:EventFireTrigger>
                        <local:EventFireTrigger Event="TransitionInNoGlow">
                            <local:EventFireTrigger.Storyboard>
                                <local:UIStoryboard>
                                    <DoubleAnimationUsingKeyFrames
                                        Storyboard.TargetName="{x:Null}"
                                        Storyboard.TargetProperty="(UIElement.Opacity)">
                                        <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_ProgressCard_SwapStart}"
                                            Value="0.0"/>
                                        <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_ProgressCard_SwapEnd}"
                                            Value="1.0"
                                            EasingFunction="{local:LinearEasing}" />
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames
                                        Storyboard.TargetName="{x:Null}"
                                        Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
                                        <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_ProgressCard_SwapStart}"
                                            Value="-500"/>
                                        <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_ProgressCard_SwapEnd}"
                                            Value="0"
                                            EasingFunction="{local:ExponentialEasing EasingMode=EaseInOut}" />
                                    </DoubleAnimationUsingKeyFrames>
                                </local:UIStoryboard>
                            </local:EventFireTrigger.Storyboard>
                        </local:EventFireTrigger>
                        <local:EventFireTrigger Event="SwitchToFinalValue">
                            <local:EventFireTrigger.Storyboard>
                                <local:UIStoryboard>
                                    <ObjectAnimationUsingKeyFrames
                                        Storyboard.TargetName="InitialValueAndDeltaContainer"
                                        Storyboard.TargetProperty="(UIElement.Visibility)">
                                        <DiscreteObjectKeyFrame KeyTime="0:0:0.0"
                                            Value="{x:Static Visibility.Collapsed}"/>
                                    </ObjectAnimationUsingKeyFrames>
                                    <ObjectAnimationUsingKeyFrames
                                        Storyboard.TargetName="FinalValueContainer"
                                        Storyboard.TargetProperty="(UIElement.Visibility)">
                                        <DiscreteObjectKeyFrame KeyTime="0:0:0.0"
                                            Value="{x:Static Visibility.Visible}"/>
                                    </ObjectAnimationUsingKeyFrames>
                                </local:UIStoryboard>
                            </local:EventFireTrigger.Storyboard>
                        </local:EventFireTrigger>
                        <local:EventFireTrigger Event="TransitionOut">
                            <local:EventFireTrigger.Storyboard>
                                <local:UIStoryboard>
                                    <DoubleAnimationUsingKeyFrames
                                        Storyboard.TargetName="{x:Null}"
                                        Storyboard.TargetProperty="(UIElement.Opacity)">
                                        <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_ProgressCard_SwapStart}"
                                            Value="1.0"/>
                                        <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_ProgressCard_SwapEnd}"
                                            Value="0.0"
                                            EasingFunction="{local:LinearEasing}" />
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames
                                        Storyboard.TargetName="{x:Null}"
                                        Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
                                        <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_ProgressCard_SwapStart}"
                                            Value="0"/>
                                        <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_ProgressCard_SwapEnd}"
                                            Value="500"
                                            EasingFunction="{local:ExponentialEasing EasingMode=EaseInOut}" />
                                    </DoubleAnimationUsingKeyFrames>
                                </local:UIStoryboard>
                            </local:EventFireTrigger.Storyboard>
                        </local:EventFireTrigger>
                        <local:EventFireTrigger Event="Show">
                            <local:EventFireTrigger.Storyboard>
                                <local:UIStoryboard>
                                    <DoubleAnimationUsingKeyFrames
                                        Storyboard.TargetName="{x:Null}"
                                        Storyboard.TargetProperty="(UIElement.Opacity)">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                            Value="0.0"/>
                                        <EasingDoubleKeyFrame KeyTime="0:0:0.2"
                                            Value="1.0"
                                            EasingFunction="{local:LinearEasing}" />
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames
                                        Storyboard.TargetName="{x:Null}"
                                        Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                            Value="0.01"/>
                                        <EasingDoubleKeyFrame KeyTime="0:0:0.4"
                                            Value="1.025"
                                            EasingFunction="{local:CircleEasing EasingMode=EaseOut}" />
                                        <EasingDoubleKeyFrame KeyTime="0:0:0.567"
                                            Value="1.0"
                                            EasingFunction="{local:CircleEasing EasingMode=EaseInOut}" />
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames
                                        Storyboard.TargetName="{x:Null}"
                                        Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                            Value="0.01"/>
                                        <EasingDoubleKeyFrame KeyTime="0:0:0.4"
                                            Value="1.025"
                                            EasingFunction="{local:CircleEasing EasingMode=EaseOut}" />
                                        <EasingDoubleKeyFrame KeyTime="0:0:0.567"
                                            Value="1.0"
                                            EasingFunction="{local:CircleEasing EasingMode=EaseInOut}" />
                                    </DoubleAnimationUsingKeyFrames>
                                </local:UIStoryboard>
                            </local:EventFireTrigger.Storyboard>
                        </local:EventFireTrigger>
                    </local:EventFire.FzTriggers>
                </Grid>
            </ControlTemplate>

            <Style x:Key="A_Style_LeagueProgress_Card"
                TargetType="{x:Type Control}">
                <Setter Property="Template" Value="{StaticResource A_ControlTemplate_LeagueProgress_Card}"/>
                <Setter Property="VerticalAlignment" Value="Top"/>
                <Setter Property="Margin" Value="0,294,-12,0"/>
                <Setter Property="Focusable" Value="False"/>
                <Setter Property="Width" Value="302"/>
                <Setter Property="Height" Value="406"/>
            </Style>

            <local:MappingConverter x:Key="A_Converter_CompareResultToDeltaVisibility"
                Default="{x:Static Visibility.Hidden}">
                <local:MappingConverterEntry Key="0" Value="{x:Static Visibility.Visible}"/>
                <local:MappingConverterEntry Key="1" Value="{x:Static Visibility.Visible}"/>
            </local:MappingConverter>

            <local:LinearTransformConverter x:Key="A_IntToAbsoluteFloatConverter"
                AbsOutput="True"/>

            <local:MultiConverter x:Key="A_Converter_HideDeltaWhenUnderAbsoluteThreshold">
                <local:MultiConverterEntry Converter="{StaticResource A_IntToAbsoluteFloatConverter}" />
                <local:MultiConverterEntry Converter="{StaticResource A_CompareConverter}" Parameter="1"/>
                <local:MultiConverterEntry Converter="{StaticResource A_Converter_CompareResultToDeltaVisibility}" />
            </local:MultiConverter>

            <Style x:Key="A_Style_FZTextBlock_ProgressBar_IndicatorNumbers"
                TargetType="{x:Type local:FZTextBlock}"
                BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}">
                <Setter Property="CapHeight" Value="26"/>
                <Setter Property="Color" Value="#FFFFFFFF"/>
            </Style>

            <Style x:Key="A_Style_ProgressBar_LeaguePoints"
                TargetType="{x:Type ProgressBar}">
                <Setter Property="Height" Value="36"/>
                <Setter Property="VerticalAlignment" Value="Center"/>
                <Setter Property="local:BindingProxy.A">
                    <Setter.Value>
                        <System:Double>1.0</System:Double>
                    </Setter.Value>
                </Setter>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type ProgressBar}">
                            <Grid>
                                <local:FZMaterial x:Name="PART_Track"
                                    Color="#40000000"
                                    Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_InnerAll}"/>
                                <Grid x:Name="PART_Indicator"
                                    HorizontalAlignment="Left"
                                    ClipToBounds="True">
                                    <local:FZMaterial Width="{TemplateBinding ActualWidth}"
                                        Preset="{Binding LeagueNumber, Converter={StaticResource A_Converter_League_ID_To_GradientPreset_Horiz_InnerAll}}"/>
                                    <local:FZMaterial Color="#FFFFFFFF"
                                        Width="3"
                                        Height="54"
                                        HorizontalAlignment="Right"
                                        VerticalAlignment="Top"
                                        Margin="0,0,-1.5,0"
                                        local:ZPanel.DisableClipping="True"
                                        Opacity="{Binding (local:BindingProxy.A), RelativeSource={RelativeSource TemplatedParent}}">
                                        <local:FZMaterial.Preset>
                                            <local:FZMaterialPresetRoundtangle BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
                                                CornerRadius="0,0,1.5,1.5"/>
                                        </local:FZMaterial.Preset>
                                        <StackPanel Orientation="Horizontal"
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Bottom"
                                            Margin="0,0,0,-37">
                                            <local:FZTextBlock
                                                Text="{Binding (local:BindingProxy.AlwaysValidNumeric), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource A_NumUnitConverter_ShowUnit_0dp_Positive}}"
                                                Style="{StaticResource A_Style_FZTextBlock_ProgressBar_IndicatorNumbers}"
                                                Visibility="Hidden"/>
                                            <local:FZTextBlock
                                                Text="{Binding Value, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource A_NumUnitConverter_ShowUnit_0dp}}"
                                                Style="{StaticResource A_Style_FZTextBlock_ProgressBar_IndicatorNumbers}"/>
                                            <Decorator Visibility="{Binding IsUnranked, Converter={StaticResource A_FZBooleanToVisibilityConverter_UseHidden_Inverse}}">
                                                <local:FZTextBlock
                                                    Text="{Binding (local:BindingProxy.AlwaysValidNumeric), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource A_NumUnitConverter_ShowUnit_0dp_Positive}}"
                                                    Style="{StaticResource A_Style_FZTextBlock_ProgressBar_IndicatorNumbers}"
                                                    Color="{StaticResource A_Color_Tile_Text_Highlight}"
                                                    Visibility="{Binding (local:BindingProxy.AlwaysValidNumeric), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource A_Converter_HideDeltaWhenUnderAbsoluteThreshold}, FallbackValue=Hidden}"/>
                                            </Decorator>
                                        </StackPanel>
                                    </local:FZMaterial>
                              </Grid>
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>

            <ControlTemplate x:Key="A_ControlTemplate_LeagueProgress_Bar"
                TargetType="{x:Type Control}">
                <Grid x:Name="BarContainer"
                    Opacity="0">
                    <StackPanel Orientation="Vertical">
                        <Grid x:Name="PrevNextLeagues"
                            Margin="0,0,0,14"
                            Opacity="1">
                            <local:FZTextBlock local:TextBlockInlineMarkup.Markup="{Binding PrevLeagueNumber, Converter={StaticResource A_Converter_League_ID_To_LeagueName}}"
                                local:TextBlockInlineMarkup.ResourceBaseName=""
                                Style="{StaticResource A_Style_FZTextBlock_HorizonA}"
                                HorizontalAlignment="Left"
                                CapHeight="16"
                                Color="#FFFFFFFF"
                                Visibility="{Binding HasPrevLeague, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"/>
                            <local:FZTextBlock local:TextBlockInlineMarkup.Markup="{Binding NextLeagueNumber, Converter={StaticResource A_Converter_League_ID_To_LeagueName}}"
                                local:TextBlockInlineMarkup.ResourceBaseName=""
                                Style="{StaticResource A_Style_FZTextBlock_HorizonA}"
                                HorizontalAlignment="Right"
                                CapHeight="16"
                                Color="#FFFFFFFF"
                                Visibility="{Binding HasNextLeague, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"/>
                        </Grid>
                        <Grid Height="52">
                            <Grid x:Name="ProgressBarContainer"
                                Style="{StaticResource A_Style_FrameworkElement_Flippable}">
                                <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_LeagueProgressShadow}"/>
                                <local:FZMaterial Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterAll}">
                                    <Grid>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="*"/>
                                            <ColumnDefinition Width="375"/>
                                            <ColumnDefinition Width="*"/>
                                        </Grid.ColumnDefinitions>
                                        <local:FZTextBlock Grid.Column="0"
                                            Text="{Binding ProgressMin, Converter={StaticResource A_NumUnitConverter_ShowUnit_0dp}}"
                                            Style="{StaticResource A_Style_FZTextBlock_HorizonA}"
                                            CapHeight="20"
                                            Color="{StaticResource A_Color_Tile_Text}"
                                            Margin="12"
                                            VerticalAlignment="Center"
                                            HorizontalAlignment="Center"/>
                                        <local:FZTextBlock Grid.Column="2"
                                            Text="{Binding ProgressMax, Converter={StaticResource A_NumUnitConverter_ShowUnit_0dp}}"
                                            Style="{StaticResource A_Style_FZTextBlock_HorizonA}"
                                            CapHeight="20"
                                            Color="{StaticResource A_Color_Tile_Text}"
                                            Margin="12"
                                            VerticalAlignment="Center"
                                            HorizontalAlignment="Center"/>
                                        <Decorator x:Name="DummyProgressBlendDeltaElement"
                                            local:BlendValue.Input="{Binding ProgressBlendInputDelta, Converter={StaticResource A_IntToFloatConverter}}"
                                            local:BlendValue.ShouldSkipInitialInputChange="True"
                                            local:BlendValue.InputChangedStoryboard="{Binding LeagueChangeState, Converter={StaticResource A_Converter_LeagueChangeStatesToBlendValueChangedStoryboard}}"/>
                                        <ProgressBar Grid.Column="1"
                                            x:Name="ProgressBar"
                                            Style="{StaticResource A_Style_ProgressBar_LeaguePoints}"
                                            local:BlendValue.Input="{Binding ProgressBlendInputValue, Converter={StaticResource A_IntToFloatConverter}}"
                                            local:BlendValue.ShouldSkipInitialInputChange="True"
                                            local:BlendValue.InputChangedStoryboard="{Binding LeagueChangeState, Converter={StaticResource A_Converter_LeagueChangeStatesToBlendValueChangedStoryboard}}"
                                            Value="{Binding (local:BlendValue.Output), RelativeSource={RelativeSource Self}}"
                                            local:BindingProxy.AlwaysValidNumeric="{Binding (local:BlendValue.Output), ElementName=DummyProgressBlendDeltaElement}"
                                            Minimum="{Binding ProgressMin, Converter={StaticResource A_IntToFloatConverter}}"
                                            Maximum="{Binding ProgressMax, Converter={StaticResource A_IntToFloatConverter}}"/>
                                    </Grid>
                                </local:FZMaterial>
                            </Grid>
                            <local:FZMaterial x:Name="ProgressBarRadialGlow"
                                Width="450"
                                Height="450"
                                Margin="-225"
                                VerticalAlignment="Center"
                                HorizontalAlignment="Center"
                                RenderTransformOrigin="0.5,0.5"
                                Opacity="0">
                                <local:FZMaterial.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1.25" ScaleY="0.15"/>
                                        <ScaleTransform ScaleX="1" ScaleY="1"/>
                                        <SkewTransform/>
                                        <RotateTransform/>
                                        <TranslateTransform/>
                                    </TransformGroup>
                                </local:FZMaterial.RenderTransform>
                                <local:FZMaterial.Preset>
                                    <local:FZMaterialPresetRoundtangle AlphaMode="Additive"
                                        CornerRadius="225"
                                        Softness="225"
                                        />
                                </local:FZMaterial.Preset>
                            </local:FZMaterial>
                            <local:FZMaterial x:Name="ProgressBarRoundtangleGlow"
                                ImageSource="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Bar_Glow.png"
                                Color="#FFFFFFFF"
                                Margin="-312,-53"
                                RenderTransformOrigin="0.5,0.5"
                                VerticalAlignment="Center"
                                HorizontalAlignment="Center"
                                Opacity="0"
                                Width="624"
                                Height="106"
                                Preset="{StaticResource A_FZMaterialPresetAdditive}">
                                <local:FZMaterial.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform/>
                                        <SkewTransform/>
                                        <RotateTransform/>
                                        <TranslateTransform/>
                                    </TransformGroup>
                                </local:FZMaterial.RenderTransform>
                            </local:FZMaterial>
                        </Grid>
                    </StackPanel>
                    <local:EventFire.FzTriggers>
                        <local:EventFireTrigger Event="TransitionOut">
                            <local:EventFireTrigger.Storyboard>
                                <local:UIStoryboard>
                                    <DoubleAnimationUsingKeyFrames
                                        Storyboard.TargetName="PrevNextLeagues"
                                        Storyboard.TargetProperty="(UIElement.Opacity)">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                            Value="1.0"/>
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.067"
                                            Value="1.0"/>
                                        <EasingDoubleKeyFrame KeyTime="0:0:0.267"
                                            Value="0.0"
                                            EasingFunction="{local:LinearEasing}" />
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames
                                        Storyboard.TargetName="ProgressBarContainer"
                                        Storyboard.TargetProperty="(UIElement.Opacity)">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                            Value="1.0"/>
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.067"
                                            Value="1.0"/>
                                        <EasingDoubleKeyFrame KeyTime="0:0:0.133"
                                            Value="0.0"
                                            EasingFunction="{local:LinearEasing}" />
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames
                                        Storyboard.TargetName="ProgressBarRadialGlow"
                                        Storyboard.TargetProperty="(UIElement.Opacity)">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                            Value="0.0"/>
                                        <EasingDoubleKeyFrame KeyTime="0:0:0.033"
                                            Value="1.0"
                                            EasingFunction="{local:LinearEasing}" />
                                        <EasingDoubleKeyFrame KeyTime="0:0:0.567"
                                            Value="0.0"
                                            EasingFunction="{local:LinearEasing}" />
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames
                                        Storyboard.TargetName="ProgressBarRadialGlow"
                                        Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[1].(ScaleTransform.ScaleX)">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.033"
                                            Value="1.0"/>
                                        <EasingDoubleKeyFrame KeyTime="0:0:0.1"
                                            Value="2.0"
                                            EasingFunction="{local:ExponentialEasing EasingMode=EaseOut}" />
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames
                                        Storyboard.TargetName="ProgressBarRadialGlow"
                                        Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[1].(ScaleTransform.ScaleY)">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.033"
                                            Value="1.0"/>
                                        <EasingDoubleKeyFrame KeyTime="0:0:0.1"
                                            Value="2.0"
                                            EasingFunction="{local:ExponentialEasing EasingMode=EaseOut}" />
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames
                                        Storyboard.TargetName="ProgressBarRoundtangleGlow"
                                        Storyboard.TargetProperty="(UIElement.Opacity)">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                            Value="0.0"/>
                                       <DiscreteDoubleKeyFrame KeyTime="0:0:0.033"
                                            Value="0.0"/>
                                        <EasingDoubleKeyFrame KeyTime="0:0:0.067"
                                            Value="1.0"
                                            EasingFunction="{local:LinearEasing}" />
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.133"
                                            Value="1.0"/>
                                        <EasingDoubleKeyFrame KeyTime="0:0:0.267"
                                            Value="0.0"
                                            EasingFunction="{local:ExponentialEasing EasingMode=EaseOut}" />
                                    </DoubleAnimationUsingKeyFrames>
                                </local:UIStoryboard>
                            </local:EventFireTrigger.Storyboard>
                        </local:EventFireTrigger>
                         <local:EventFireTrigger Event="Show">
                            <local:EventFireTrigger.Storyboard>
                                <local:UIStoryboard>
                                    <DoubleAnimationUsingKeyFrames
                                        Storyboard.TargetName="PrevNextLeagues"
                                        Storyboard.TargetProperty="(UIElement.Opacity)">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                            Value="0.0"/>
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.2"
                                            Value="0.0"/>
                                        <EasingDoubleKeyFrame KeyTime="0:0:0.433"
                                            Value="1.0"
                                            EasingFunction="{local:LinearEasing}" />
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames
                                        Storyboard.TargetName="ProgressBar"
                                        Storyboard.TargetProperty="(local:BindingProxy.A)">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                            Value="0.0"/>
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.2"
                                            Value="0.0"/>
                                        <EasingDoubleKeyFrame KeyTime="0:0:0.433"
                                            Value="1.0"
                                            EasingFunction="{local:LinearEasing}" />
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames
                                        Storyboard.TargetName="BarContainer"
                                        Storyboard.TargetProperty="(UIElement.Opacity)">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                            Value="0.0"/>
                                        <EasingDoubleKeyFrame KeyTime="0:0:0.133"
                                            Value="1.0"
                                            EasingFunction="{local:LinearEasing}" />
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames
                                        Storyboard.TargetName="ProgressBarContainer"
                                        Storyboard.TargetProperty="(local:ZPanel.Transform).(local:XRotation.Angle)">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                            Value="-96.0"/>
                                        <EasingDoubleKeyFrame KeyTime="0:0:0.333"
                                            Value="0.0"
                                            EasingFunction="{local:ExponentialEasing EasingMode=EaseOut}" />
                                    </DoubleAnimationUsingKeyFrames>
                                </local:UIStoryboard>
                            </local:EventFireTrigger.Storyboard>
                        </local:EventFireTrigger>
                    </local:EventFire.FzTriggers>
                </Grid>
            </ControlTemplate>

            <Style x:Key="A_Style_LeagueProgress_Bar"
                TargetType="{x:Type Control}">
                <Setter Property="Template" Value="{StaticResource A_ControlTemplate_LeagueProgress_Bar}"/>
                <Setter Property="VerticalAlignment" Value="Bottom"/>
                <Setter Property="Margin" Value="0,0,0,280"/>
                <Setter Property="Focusable" Value="False"/>
            </Style>

            <local:MappingConverter x:Key="A_MappingConverter_LeagueTypeToHeadingRank">
                <local:MappingConverterEntry Key="{x:Static local:LeagueType.RacingOnly}" Value="{local:Loc RoadTrip.IDS_OnlineAdventure_Rank_Racing_Title}"/>
                <local:MappingConverterEntry Key="{x:Static local:LeagueType.PlaygroundGamesOnly}" Value="{local:Loc RoadTrip.IDS_OnlineAdventure_Rank_Games_Title}"/>
                <local:MappingConverterEntry Key="{x:Static local:LeagueType.AnythingGoes}" Value="{local:Loc RoadTrip.IDS_OnlineAdventure_Rank_AnythingGoes_Title}"/>
                <local:MappingConverterEntry Key="{x:Static local:LeagueType.SoloRacingOnly}" Value="{local:Loc RoadTrip.IDS_OnlineAdventure_Rank_SoloRacing_Title}"/>
            </local:MappingConverter >

            <Style x:Key="A_Style_FZTextBlock_PostRaceLeagueProgressTitle"
                TargetType="{x:Type local:FZTextBlock}"
                BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}">
                <Setter Property="Text" Value="{Binding LeagueType, Converter={StaticResource A_MappingConverter_LeagueTypeToHeadingRank}}"/>
                <Setter Property="Color" Value="#FFFFFFFF"/>
                <Setter Property="Margin" Value="0,242,0,0"/>
                <Setter Property="VerticalAlignment" Value="Top"/>
                <Setter Property="HorizontalAlignment" Value="Center"/>
                <Setter Property="CapHeight" Value="26"/>
                <Setter Property="Opacity" Value="0"/>
                <Setter Property="local:EventFire.FzTriggers">
                    <Setter.Value>
                        <local:EventFireTriggerCollection>
                            <local:EventFireTrigger Event="ShowTitleText">
                                <local:EventFireTrigger.Storyboard>
                                    <local:UIStoryboard>
                                        <DoubleAnimationUsingKeyFrames
                                        Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                            Value="0.0"/>
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.3"
                                            Value="1.0"
                                            EasingFunction="{local:LinearEasing}" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </local:UIStoryboard>
                                </local:EventFireTrigger.Storyboard>
                            </local:EventFireTrigger>
                        </local:EventFireTriggerCollection>
                    </Setter.Value>
                </Setter>
            </Style>

            <Style x:Key="A_Style_FZTextBlock_PostRaceLeagueChangedText"
                TargetType="{x:Type local:FZTextBlock}"
                BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}">
                <Setter Property="Text" Value="{Binding LeagueChangeState, Converter={StaticResource A_Converter_LeagueChangeStatesToString}}"/>
                <Setter Property="Color" Value="#FFFFFFFF"/>
                <Setter Property="Margin" Value="0,0,0,310"/>
                <Setter Property="VerticalAlignment" Value="Bottom"/>
                <Setter Property="HorizontalAlignment" Value="Center"/>
                <Setter Property="CapHeight" Value="38"/>
                <Setter Property="Opacity" Value="0"/>
                <Setter Property="local:EventFire.FzTriggers">
                    <Setter.Value>
                        <local:EventFireTriggerCollection>
                         <local:EventFireTrigger Event="ShowLeagueChangedText">
                            <local:EventFireTrigger.Storyboard>
                                <local:UIStoryboard>
                                    <DoubleAnimationUsingKeyFrames
                                        Storyboard.TargetProperty="(UIElement.Opacity)">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                            Value="0.0"/>
                                        <EasingDoubleKeyFrame KeyTime="0:0:0.167"
                                            Value="1.0"
                                            EasingFunction="{local:LinearEasing}" />
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:1.067"
                                            Value="1.0"/>
                                        <EasingDoubleKeyFrame KeyTime="0:0:1.2"
                                            Value="0.0"
                                            EasingFunction="{local:LinearEasing}" />
                                    </DoubleAnimationUsingKeyFrames>
                                </local:UIStoryboard>
                            </local:EventFireTrigger.Storyboard>
                        </local:EventFireTrigger>
                        </local:EventFireTriggerCollection>
                    </Setter.Value>
                </Setter>
            </Style>

            <local:UIStoryboard x:Key="A_Storyboard_PostRaceLeagueProgress_Unchanged">
                <local:UIStoryboard.TriggerAnimation>
                    <local:RaiseFzEvent Storyboard.TargetName="OriginalLeagueBar"
                        EventName="Show"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressBar_Show}"/>
                    <local:RaiseFzEvent Storyboard.TargetName="OriginalLeagueCard"
                        EventName="Show"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressCard_Show}"/>
                    <local:StartAudioTrigger EventName="AudioUITrigger_PostRaceLeagueProgress_Appear"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressCard_Show}"/>
                    <local:RaiseFzEvent Storyboard.TargetName="TitleText"
                        EventName="ShowTitleText"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_TitleText_Show}"/>
                    <local:RaiseFzEvent
                        EventName="OriginalLeagueAnimate"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressBar_BlendValueStart_OriginalLeagueAbsolute}"/>
                    <local:StartAudioTrigger EventName="AudioUITrigger_PostRaceLeagueProgress_Counter"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressBar_BlendValueStart_OriginalLeagueAbsolute}"/>
                    <local:RaiseFzEvent Storyboard.TargetName="OriginalLeagueCard"
                        EventName="SwitchToFinalValue"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressBar_BlendValueEnd_OriginalLeagueAbsolute}"/>

                    <local:RaiseFzEvent
                        EventName="Finished"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_LeagueProgress_UnchangedFinished}"/>
                </local:UIStoryboard.TriggerAnimation>
            </local:UIStoryboard>
            <local:UIStoryboard x:Key="A_Storyboard_PostRaceLeagueProgress_Promoted">
                <local:UIStoryboard.TriggerAnimation>
                    <local:RaiseFzEvent Storyboard.TargetName="OriginalLeagueBar"
                        EventName="Show"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressBar_Show}"/>
                    <local:RaiseFzEvent Storyboard.TargetName="OriginalLeagueCard"
                        EventName="Show"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressCard_Show}"/>
                    <local:StartAudioTrigger EventName="AudioUITrigger_PostRaceLeagueProgress_Appear"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressCard_Show}"/>
                    <local:RaiseFzEvent Storyboard.TargetName="TitleText"
                        EventName="ShowTitleText"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_TitleText_Show}"/>
                    <local:RaiseFzEvent
                        EventName="OriginalLeagueAnimate"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressBar_BlendValueStart_OriginalLeagueAbsolute}"/>
                    <local:StartAudioTrigger EventName="AudioUITrigger_PostRaceLeagueProgress_Counter"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressBar_BlendValueStart_OriginalLeagueAbsolute}"/>

                    <local:StartAudioTrigger EventName="AudioUITrigger_PostRaceLeagueProgress_Promoted"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressBar_BlendValueEnd_OriginalLeagueAbsolute}"/>
                    <local:RaiseFzEvent Storyboard.TargetName="OriginalLeagueCard"
                        EventName="TransitionOut"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressBar_BlendValueEnd_OriginalLeagueAbsolute}"/>
                    <local:RaiseFzEvent Storyboard.TargetName="NewLeagueCard"
                        EventName="TransitionIn"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressBar_BlendValueEnd_OriginalLeagueAbsolute}"/>
                    <local:RaiseEntityModelEvent EventName="PostRaceLeagueChanged"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressBar_BlendValueEnd_OriginalLeagueAbsolute}" />
                    <local:RaiseFzEvent Storyboard.TargetName="OriginalLeagueBar"
                        EventName="TransitionOut"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressBar_BlendValueEnd_OriginalLeagueAbsolute}"/>
                    <local:RaiseFzEvent EventName="SetDataSourceLevelChange"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressBar_BlendValueEnd_OriginalLeagueAbsolute}"/>
                    <local:RaiseFzEvent Storyboard.TargetName="LeagueChangedText"
                        EventName="ShowLeagueChangedText"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_LeagueChangedText_Show}"/>
                    <local:RaiseFzEvent Storyboard.TargetName="NewLeagueBar"
                        EventName="Show"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressBar_NewLeague_Show}"/>
                    <local:RaiseFzEvent
                        EventName="NewLeagueAnimate"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressBar_BlendValueStart_NewLeagueAbsolute}"/>
                    <local:StartAudioTrigger EventName="AudioUITrigger_PostRaceLeagueProgress_Counter"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressBar_BlendValueStart_NewLeagueAbsolute}"/>

                    <local:RaiseFzEvent
                        EventName="Finished"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_LeagueProgress_ChangedFinished}"/>
                </local:UIStoryboard.TriggerAnimation>
            </local:UIStoryboard>
            <local:UIStoryboard x:Key="A_Storyboard_PostRaceLeagueProgress_Demoted">
                <local:UIStoryboard.TriggerAnimation>
                    <local:RaiseFzEvent Storyboard.TargetName="OriginalLeagueBar"
                        EventName="Show"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressBar_Show}"/>
                    <local:RaiseFzEvent Storyboard.TargetName="OriginalLeagueCard"
                        EventName="Show"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressCard_Show}"/>
                    <local:StartAudioTrigger EventName="AudioUITrigger_PostRaceLeagueProgress_Appear"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressCard_Show}"/>
                    <local:RaiseFzEvent Storyboard.TargetName="TitleText"
                        EventName="ShowTitleText"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_TitleText_Show}"/>
                    <local:RaiseFzEvent
                        EventName="OriginalLeagueAnimate"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressBar_BlendValueStart_OriginalLeagueAbsolute}"/>
                    <local:StartAudioTrigger EventName="AudioUITrigger_PostRaceLeagueProgress_Counter"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressBar_BlendValueStart_OriginalLeagueAbsolute}"/>

                    <local:StartAudioTrigger EventName="AudioUITrigger_PostRaceLeagueProgress_Demoted"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressBar_BlendValueEnd_OriginalLeagueAbsolute}"/>
                    <local:RaiseFzEvent Storyboard.TargetName="OriginalLeagueCard"
                        EventName="TransitionOut"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressBar_BlendValueEnd_OriginalLeagueAbsolute}"/>
                    <local:RaiseFzEvent Storyboard.TargetName="NewLeagueCard"
                        EventName="TransitionInNoGlow"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressBar_BlendValueEnd_OriginalLeagueAbsolute}"/>
                    <local:RaiseEntityModelEvent EventName="PostRaceLeagueChanged"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressBar_BlendValueEnd_OriginalLeagueAbsolute}" />
                    <local:RaiseFzEvent Storyboard.TargetName="OriginalLeagueBar"
                        EventName="TransitionOut"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressBar_BlendValueEnd_OriginalLeagueAbsolute}"/>
                    <local:RaiseFzEvent EventName="SetDataSourceLevelChange"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressBar_BlendValueEnd_OriginalLeagueAbsolute}"/>
                    <local:RaiseFzEvent Storyboard.TargetName="LeagueChangedText"
                        EventName="ShowLeagueChangedText"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_LeagueChangedText_Show}"/>
                    <local:RaiseFzEvent Storyboard.TargetName="NewLeagueBar"
                        EventName="Show"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressBar_NewLeague_Show}"/>
                    <local:RaiseFzEvent
                        EventName="NewLeagueAnimate"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressBar_BlendValueStart_NewLeagueAbsolute}"/>
                    <local:StartAudioTrigger EventName="AudioUITrigger_PostRaceLeagueProgress_Counter"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressBar_BlendValueStart_NewLeagueAbsolute}"/>

                    <local:RaiseFzEvent
                        EventName="Finished"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_LeagueProgress_ChangedFinished}"/>
                </local:UIStoryboard.TriggerAnimation>
            </local:UIStoryboard>
            <local:UIStoryboard x:Key="A_Storyboard_PostRaceLeagueProgress_Qualified">
                <local:UIStoryboard.TriggerAnimation>
                    <local:RaiseFzEvent Storyboard.TargetName="OriginalLeagueBar"
                        EventName="Show"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressBar_Show}"/>
                    <local:RaiseFzEvent Storyboard.TargetName="OriginalLeagueCard"
                        EventName="Show"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressCard_Show}"/>
                    <local:StartAudioTrigger EventName="AudioUITrigger_PostRaceLeagueProgress_Appear"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressCard_Show}"/>
                    <local:RaiseFzEvent Storyboard.TargetName="TitleText"
                        EventName="ShowTitleText"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_TitleText_Show}"/>
                    <local:RaiseFzEvent
                        EventName="OriginalLeagueAnimate"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressBar_BlendValueStart_OriginalLeagueAbsolute}"/>
                    <local:StartAudioTrigger EventName="AudioUITrigger_PostRaceLeagueProgress_Counter"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressBar_BlendValueStart_OriginalLeagueAbsolute}"/>

                    <local:StartAudioTrigger EventName="AudioUITrigger_PostRaceLeagueProgress_Qualified"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressBar_BlendValueEnd_OriginalLeagueAbsolute}"/>
                    <local:RaiseFzEvent Storyboard.TargetName="OriginalLeagueCard"
                        EventName="TransitionOut"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressBar_BlendValueEnd_OriginalLeagueAbsolute}"/>
                    <local:RaiseFzEvent Storyboard.TargetName="NewLeagueCard"
                        EventName="TransitionIn"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressBar_BlendValueEnd_OriginalLeagueAbsolute}"/>
                    <local:RaiseEntityModelEvent EventName="PostRaceLeagueChanged"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressBar_BlendValueEnd_OriginalLeagueAbsolute}" />
                    <local:RaiseFzEvent Storyboard.TargetName="OriginalLeagueBar"
                        EventName="TransitionOut"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressBar_BlendValueEnd_OriginalLeagueAbsolute}"/>
                    <local:RaiseFzEvent EventName="SetDataSourceLevelChange"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressBar_BlendValueEnd_OriginalLeagueAbsolute}"/>
                    <local:RaiseFzEvent Storyboard.TargetName="LeagueChangedText"
                        EventName="ShowLeagueChangedText"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_LeagueChangedText_Show}"/>
                    <local:RaiseFzEvent Storyboard.TargetName="NewLeagueBar"
                        EventName="Show"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressBar_NewLeague_Show}"/>
                    <local:RaiseFzEvent
                        EventName="NewLeagueAnimate"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressBar_BlendValueStart_NewLeagueAbsolute}"/>
                    <local:StartAudioTrigger EventName="AudioUITrigger_PostRaceLeagueProgress_Counter"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_ProgressBar_BlendValueStart_NewLeagueAbsolute}"/>

                    <local:RaiseFzEvent
                        EventName="Finished"
                        local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_LeagueProgress_ChangedFinished}"/>
                </local:UIStoryboard.TriggerAnimation>
            </local:UIStoryboard>
        </ResourceDictionary>
    </Page.Resources>

    <Grid>
        <Decorator Style="{StaticResource A_Style_FrameworkElement_LayoutRoot}"
            DataContext="{Binding DataSource}">
            <Grid Width="572"
                HorizontalAlignment="Right"
                Margin="0,0,153,0">
                <local:FZTextBlock x:Name="TitleText"
                    Style="{StaticResource A_Style_FZTextBlock_PostRaceLeagueProgressTitle}"/>

                <local:FZMaterial
                    Margin="0,0,0,280"
                    Color="#FFFFFFFF"
                    CaptureSubgraph="True">
                    <local:FZMaterial.Preset>
                        <local:FZMaterialPresetRoundtangle Softness="52"/>
                    </local:FZMaterial.Preset>
                    <Grid ClipToBounds="True">
                        <Control x:Name="OriginalLeagueCard"
                            Style="{StaticResource A_Style_LeagueProgress_Card}"
                            DataContext="{Binding OriginalLeague}"/>

                        <Control x:Name="NewLeagueCard"
                            Style="{StaticResource A_Style_LeagueProgress_Card}"
                            DataContext="{Binding NewLeague}"/>
                    </Grid>
                </local:FZMaterial>

                <Control x:Name="OriginalLeagueBar"
                    Style="{StaticResource A_Style_LeagueProgress_Bar}"
                    DataContext="{Binding OriginalLeague}"/>

                <Control x:Name="NewLeagueBar"
                    Style="{StaticResource A_Style_LeagueProgress_Bar}"
                    DataContext="{Binding NewLeague}"/>

                <local:FZTextBlock x:Name="LeagueChangedText"
                    Style="{StaticResource A_Style_FZTextBlock_PostRaceLeagueChangedText}"
                    DataContext="{Binding OriginalLeague}"/>
            </Grid>
        </Decorator>
    </Grid>
    <local:EventFire.FzTriggers>
        <local:EventFireTrigger Event="PostRaceLeagueProgress_Unchanged"
            Storyboard="{StaticResource A_Storyboard_PostRaceLeagueProgress_Unchanged}"/>
        <local:EventFireTrigger Event="PostRaceLeagueProgress_Promoted"
            Storyboard="{StaticResource A_Storyboard_PostRaceLeagueProgress_Promoted}"/>
        <local:EventFireTrigger Event="PostRaceLeagueProgress_Demoted"
            Storyboard="{StaticResource A_Storyboard_PostRaceLeagueProgress_Demoted}"/>
        <local:EventFireTrigger Event="PostRaceLeagueProgress_Qualified"
            Storyboard="{StaticResource A_Storyboard_PostRaceLeagueProgress_Qualified}"/>
    </local:EventFire.FzTriggers>
</Page>
