<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ForzaUI;assembly="
                    xmlns:System="clr-namespace:System;assembly=mscorlib">

    <Style x:Key="A_Style_Decorator_TombolaCreditsSkewTransform" TargetType="FrameworkElement">
        <Setter Property="RenderTransformOrigin"
                Value="0.5,0.5" />
        <Setter Property="RenderTransform">
            <Setter.Value>
                <TransformGroup>
                    <RotateTransform Angle="-8" />
                    <SkewTransform AngleX="-12" />
                </TransformGroup>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="A_Style_FZMaterial_TombolaLetterboxTint"
        TargetType="{x:Type local:FZMaterial}">
        <Setter Property="Height" Value="27"/>
        <Setter Property="Opacity" Value="0.3"/>
        <Setter Property="Color" Value="#FF000000"/>
    </Style>

    <Style x:Key="A_Style_FZMaterial_TombolaArrow"
        TargetType="{x:Type local:FZMaterial}">
        <Setter Property="Width" Value="70"/>
        <Setter Property="Height" Value="90"/>
        <Setter Property="ImageSourceNoPreload" Value="/ForzaUI;component/Textures/Anthem/Tombola/Arrow.png"/>
        <Setter Property="RenderTransformOrigin" Value="0.5, 0.5"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
    </Style>

    <Style x:Key="A_Style_FZMaterial_TombolaArrow_Right"
        BasedOn="{StaticResource A_Style_FZMaterial_TombolaArrow}"
        TargetType="{x:Type local:FZMaterial}">
        <Setter Property="HorizontalAlignment" Value="Right"/>
    </Style>

    <Style x:Key="A_Style_FZMaterial_TombolaArrow_Left"
        BasedOn="{StaticResource A_Style_FZMaterial_TombolaArrow}"
        TargetType="{x:Type local:FZMaterial}">
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="RenderTransform">
            <Setter.Value>
                <ScaleTransform ScaleX="-1"/>
            </Setter.Value>
        </Setter>
    </Style>

    <System:Double x:Key="A_Double_TombolaLitBulbs_SpinsCount">14</System:Double>
    <local:LinearTransformConverter x:Key="A_TombolaLitBulbAngleRoundingConverter"
        Scale="360"
        Round="18" /> <!-- Round=360deg / bulb count -->
    <local:LinearTransformConverter x:Key="A_TombolaBulbAngleOffsetConverter" Scale="18"/> <!-- Scale=360deg / bulb count -->
    <local:LinearTransformConverter x:Key="A_TombolaNegHalfConverter" Scale="-0.5"/>

    <Style x:Key="A_Style_FZMaterial_TombolaLitBulb"
        TargetType="{x:Type local:FZMaterial}">
        <Setter Property="Width" Value="90"/>
        <Setter Property="Height" Value="90"/>
        <Setter Property="ImageSourceNoPreload" Value="/ForzaUI;component/Textures/Anthem/Tombola/Bulb_Lit.png"/>
        <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetAdditive}"/>
        <Setter Property="RenderTransformOrigin" Value="0.5, 0.5"/>
        <Setter Property="HorizontalAlignment" Value="Center"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="RenderTransform">
            <Setter.Value>
                <TransformGroup>
                    <TranslateTransform Y="-168.5"/>
                    <RotateTransform Angle="{Binding (ItemsControl.AlternationIndex), RelativeSource={RelativeSource AncestorType={x:Type local:FZMaterial}}, Converter={StaticResource A_TombolaBulbAngleOffsetConverter}}"/>
                </TransformGroup>
            </Setter.Value>
        </Setter>
    </Style>

    <local:LinearTransformConverter x:Key="A_TombolaBackgroundSpokeAngleOffsetConverter" Scale="17.143"/> <!-- Scale=360deg / Spoke Count -->

    <Style x:Key="A_Style_FZMaterial_TombolaBackgroundSpoke"
        TargetType="{x:Type local:FZMaterial}">
        <Setter Property="Width" Value="275"/>
        <Setter Property="Height" Value="1920"/>
        <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetAdditive}"/>
        <Setter Property="RenderTransformOrigin" Value="0.5, 0.5"/>
        <Setter Property="HorizontalAlignment" Value="Center"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="Color" Value="#08FFFFFF"/>
        <Setter Property="Data">
            <Setter.Value>
                <local:FZGeometry Data="M0.5,1,1,0,0,0z" />
            </Setter.Value>
        </Setter>
        <Setter Property="RenderTransform">
            <Setter.Value>
                <TransformGroup>
                    <TranslateTransform Y="{Binding ActualHeight, RelativeSource={RelativeSource AncestorType={x:Type local:FZMaterial}}, Converter={StaticResource A_TombolaNegHalfConverter}}"/>
                    <RotateTransform Angle="{Binding (ItemsControl.AlternationIndex), RelativeSource={RelativeSource AncestorType={x:Type local:FZMaterial}}, Converter={StaticResource A_TombolaBackgroundSpokeAngleOffsetConverter}}"/>
                </TransformGroup>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="A_Style_ItemsControl_TombolaBackgroundSpokes"
        TargetType="{x:Type ItemsControl}">
        <Setter Property="AlternationCount" Value="10000"/>
        <Setter Property="RenderTransformOrigin" Value="0.5, 0.5"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ItemsControl}">
                    <Grid IsItemsHost="True"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="RenderTransform">
            <Setter.Value>
                <RotateTransform/>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <EventTrigger RoutedEvent="FrameworkElement.Loaded">
                <local:BeginUIStoryboard>
                    <local:UIStoryboard RepeatBehavior="Forever">
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)">
                            <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                                    Value="0" />
                            <LinearDoubleKeyFrame KeyTime="0:0:35.0"
                                                    Value="360" />
                        </DoubleAnimationUsingKeyFrames>
                    </local:UIStoryboard>
                </local:BeginUIStoryboard>
            </EventTrigger>
        </Style.Triggers>
    </Style>



    <Style x:Key="A_Style_ItemsControl_TombolaLitBulbs_Base"
        TargetType="{x:Type ItemsControl}">
        <Setter Property="AlternationCount" Value="10000"/>
        <Setter Property="RenderTransformOrigin" Value="0.5, 0.5"/>
        <Setter Property="Opacity" Value="0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ItemsControl}">
                    <Grid IsItemsHost="True"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Tag">
            <Setter.Value>
                <System:Double>0.0</System:Double>
            </Setter.Value>
        </Setter>
        <Setter Property="RenderTransform">
            <Setter.Value>
                <RotateTransform Angle="{Binding Tag, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}, Converter={StaticResource A_TombolaLitBulbAngleRoundingConverter}}"/>
            </Setter.Value>
        </Setter>
    </Style>

    <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPresetRoundtangle_TombolaBackgroundGradient_Default"
            BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
            GradientColorA="{StaticResource A_Color_TombolaBackgroundGradientA_Default}"
            GradientColorB="{StaticResource A_Color_TombolaBackgroundGradientB_Default}"/>
    <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPresetRoundtangle_TombolaBackgroundGradient_Common"
            BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
            GradientColorA="{StaticResource A_Color_TombolaBackgroundGradientA_Common}"
            GradientColorB="{StaticResource A_Color_TombolaBackgroundGradientB_Common}"/>
    <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPresetRoundtangle_TombolaBackgroundGradient_Rare"
            BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
            GradientColorA="{StaticResource A_Color_TombolaBackgroundGradientA_Rare}"
            GradientColorB="{StaticResource A_Color_TombolaBackgroundGradientB_Rare}"/>
    <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPresetRoundtangle_TombolaBackgroundGradient_Epic"
            BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
            GradientColorA="{StaticResource A_Color_TombolaBackgroundGradientA_Epic}"
            GradientColorB="{StaticResource A_Color_TombolaBackgroundGradientB_Epic}"/>
    <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPresetRoundtangle_TombolaBackgroundGradient_Legendary"
            BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
            GradientColorA="{StaticResource A_Color_TombolaBackgroundGradientA_Legendary}"
            GradientColorB="{StaticResource A_Color_TombolaBackgroundGradientB_Legendary}"/>
    <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPresetRoundtangle_TombolaBackgroundGradient_HorizonEdition"
            BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
            GradientColorA="{StaticResource A_Color_TombolaBackgroundGradientA_HorizonEdition}"
            GradientColorB="{StaticResource A_Color_TombolaBackgroundGradientB_HorizonEdition}"/>

    <local:MappingConverter x:Key="A_Converter_RarityToTombolaBackgroundGradientPreset" Default="{StaticResource A_FZMaterialPresetRoundtangle_TombolaBackgroundGradient_Default}">
        <local:MappingConverterEntry Key="{x:Static local:XAMLRarity.Common}" Value="{StaticResource A_FZMaterialPresetRoundtangle_TombolaBackgroundGradient_Common}"/>
        <local:MappingConverterEntry Key="{x:Static local:XAMLRarity.Rare}" Value="{StaticResource A_FZMaterialPresetRoundtangle_TombolaBackgroundGradient_Rare}"/>
        <local:MappingConverterEntry Key="{x:Static local:XAMLRarity.Epic}" Value="{StaticResource A_FZMaterialPresetRoundtangle_TombolaBackgroundGradient_Epic}"/>
        <local:MappingConverterEntry Key="{x:Static local:XAMLRarity.Legendary}" Value="{StaticResource A_FZMaterialPresetRoundtangle_TombolaBackgroundGradient_Legendary}"/>
        <local:MappingConverterEntry Key="{x:Static local:XAMLRarity.HorizonEdition}" Value="{StaticResource A_FZMaterialPresetRoundtangle_TombolaBackgroundGradient_HorizonEdition}"/>
    </local:MappingConverter>

    <Style x:Key="A_Style_FZMaterial_TombolaBackgroundGradient"
        TargetType="{x:Type local:FZMaterial}">
        <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_TombolaBackgroundGradient_Default}"/>
        <Style.Triggers>
            <DataTrigger Binding="{Binding IsSpinComplete}" Value="True">
                <Setter Property="Preset" Value="{Binding MostRareWinningTicket.PrizeRarity, Converter={StaticResource A_Converter_RarityToTombolaBackgroundGradientPreset}}"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPresetRoundtangle_TombolaPrizeBackgroundGradient_Default"
            BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
            GradientColorA="{StaticResource A_Color_TombolaPrizeBackgroundGradientA_Default}"
            GradientColorB="{StaticResource A_Color_TombolaPrizeBackgroundGradientB_Default}"
            GradientAngle="90"/>
    <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPresetRoundtangle_TombolaPrizeBackgroundGradient_Common"
            BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
            GradientColorA="{StaticResource A_Color_TombolaPrizeBackgroundGradientA_Common}"
            GradientColorB="{StaticResource A_Color_TombolaPrizeBackgroundGradientB_Common}"
            GradientAngle="90"/>
    <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPresetRoundtangle_TombolaPrizeBackgroundGradient_Rare"
            BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
            GradientColorA="{StaticResource A_Color_TombolaPrizeBackgroundGradientA_Rare}"
            GradientColorB="{StaticResource A_Color_TombolaPrizeBackgroundGradientB_Rare}"
            GradientAngle="90"/>
    <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPresetRoundtangle_TombolaPrizeBackgroundGradient_Epic"
            BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
            GradientColorA="{StaticResource A_Color_TombolaPrizeBackgroundGradientA_Epic}"
            GradientColorB="{StaticResource A_Color_TombolaPrizeBackgroundGradientB_Epic}"
            GradientAngle="90"/>
    <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPresetRoundtangle_TombolaPrizeBackgroundGradient_Legendary"
            BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
            GradientColorA="{StaticResource A_Color_TombolaPrizeBackgroundGradientA_Legendary}"
            GradientColorB="{StaticResource A_Color_TombolaPrizeBackgroundGradientB_Legendary}"
            GradientAngle="90"/>
    <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPresetRoundtangle_TombolaPrizeBackgroundGradient_HorizonEdition"
            BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
            GradientColorA="{StaticResource A_Color_TombolaPrizeBackgroundGradientA_HorizonEdition}"
            GradientColorB="{StaticResource A_Color_TombolaPrizeBackgroundGradientB_HorizonEdition}"
            GradientAngle="90"/>

    <local:MappingConverter x:Key="A_Converter_RarityToTombolaPrizeBackgroundGradientPreset" Default="{StaticResource A_FZMaterialPresetRoundtangle_TombolaPrizeBackgroundGradient_Default}">
      <local:MappingConverterEntry Key="{x:Static local:XAMLRarity.Common}" Value="{StaticResource A_FZMaterialPresetRoundtangle_TombolaPrizeBackgroundGradient_Common}"/>
      <local:MappingConverterEntry Key="{x:Static local:XAMLRarity.Rare}" Value="{StaticResource A_FZMaterialPresetRoundtangle_TombolaPrizeBackgroundGradient_Rare}"/>
      <local:MappingConverterEntry Key="{x:Static local:XAMLRarity.Epic}" Value="{StaticResource A_FZMaterialPresetRoundtangle_TombolaPrizeBackgroundGradient_Epic}"/>
      <local:MappingConverterEntry Key="{x:Static local:XAMLRarity.Legendary}" Value="{StaticResource A_FZMaterialPresetRoundtangle_TombolaPrizeBackgroundGradient_Legendary}"/>
      <local:MappingConverterEntry Key="{x:Static local:XAMLRarity.HorizonEdition}" Value="{StaticResource A_FZMaterialPresetRoundtangle_TombolaPrizeBackgroundGradient_HorizonEdition}"/>
    </local:MappingConverter>
  
    <Style x:Key="A_Style_ContentControl_TombolaSpinsRemaining"
        TargetType="{x:Type ContentControl}">
        <Setter Property="HorizontalAlignment" Value="Center"/>
        <Setter Property="VerticalAlignment" Value="Bottom"/>
        <Setter Property="Margin" Value="0,0,0,30"/>
        <Setter Property="Visibility" Value="{Binding IsPostRace, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ContentControl}">
                    <local:FZMaterial
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Color="#C0FFFFFF">
                        <local:FZMaterial.Preset>
                            <local:FZMaterialPresetRoundtangle
                                CornerRadius="35"
                                Softness="15"/>
                        </local:FZMaterial.Preset>
                        <local:FZMaterial Color="#FFFFFFFF"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Height="50"
                            Margin="10">
                            <local:FZMaterial.Preset>
                                <local:FZMaterialPresetRoundtangle BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
                                        CornerRadius="25"/>
                            </local:FZMaterial.Preset>
                            <local:FZMaterial Color="#FF0B0A30"
                                Margin="1.5">
                                <local:FZMaterial.Preset>
                                    <local:FZMaterialPresetRoundtangle BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
                                        CornerRadius="23.5"/>
                                </local:FZMaterial.Preset>
                                <StackPanel Orientation="Horizontal"
                                    Margin="18,8">
                                    <local:FZTextBlock Text="{Binding Content, Converter={StaticResource A_NumUnitConverter_NoUnit_0dp}, RelativeSource={RelativeSource TemplatedParent}}"
                                        Style="{StaticResource A_Style_FZTextBlock_HorizonA}"
                                        CapHeight="28"
                                        VerticalAlignment="Center"
                                        Color="#FFFFFF00"/>
                                    <Decorator Width="10"/>
                                    <local:FZTextBlock x:Name="SpinsRemainingLabel"
                                        Text="{local:Loc PauseMenu.IDS_Tombola_SpinsRemaining_Plural}"
                                        Style="{StaticResource A_Style_FZTextBlock_HorizonA}"
                                        CapHeight="20"
                                        VerticalAlignment="Center"
                                        Color="#FFFFFFFF"
                                        Margin="4,0"/>
                                </StackPanel>
                            </local:FZMaterial>
                        </local:FZMaterial>
                    </local:FZMaterial>
                    <ControlTemplate.Triggers>
                        <DataTrigger Binding="{Binding Content, RelativeSource={RelativeSource Self}}"
                            Value="1">
                            <Setter Property="Text"
                                TargetName="SpinsRemainingLabel"
                                Value="{local:Loc PauseMenu.IDS_Tombola_SpinsRemaining_Singular}"/>
                        </DataTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

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

    <Style x:Key="A_Style_FZRun_Tombola_BOLD" TargetType="{x:Type local:FZRun}">
        <Setter Property="FontFamily" Value="Horizon_A"/>
    </Style>

    <Style x:Key="A_Style_FZTextBlock_TombolaHorizonEditionText"
        TargetType="{x:Type local:FZTextBlock}"
        BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}">
        <Setter Property="FontSize" Value="24"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="Margin" Value="6,0"/>
        <Setter Property="Color" Value="{StaticResource A_Color_TombolaCarText}"/>
    </Style>

    <Style x:Key="A_Style_FZMaterial_TombolaHorizonEditionBacking"
        TargetType="{x:Type local:FZMaterial}">
        <Setter Property="Height" Value="28"/>
        <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_GradientHorizonEdition_InnerInnerAll}"/>
        <Setter Property="Visibility" Value="{Binding HorizonEditionBonus, Converter={StaticResource A_StringVisConverter}}"/>
    </Style>

    <Style x:Key="A_Style_Control_TombolaHorizonEditionBlammo"
        TargetType="{x:Type Control}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Control}">
                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_TombolaHorizonEditionBacking}">
                        <StackPanel Orientation="Horizontal">
                            <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_TombolaHorizonEditionText}"
                                Text="{Binding Source={local:Loc AuctionHouse.IDS_HorizonEdition}, Converter={StaticResource A_StringToUpper}}"/>
                            <local:FZMaterial Color="#66FFFFFF" 
                                Width="2"
                                Margin="0,1"/>
                            <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_TombolaHorizonEditionText}"
                                local:TextBlockInlineMarkup.Markup="{Binding HorizonEditionBonus, Converter={StaticResource A_StringToUpper}}"
                                local:TextBlockInlineMarkup.ResourceBaseName="A_Style_FZRun_Tombola_"
                                FontFamily="Horizon_B"/>
                        </StackPanel>
                    </local:FZMaterial>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="A_Style_Control_SuperTombolaHorizonEditionBlammo"
        TargetType="{x:Type Control}"
        BasedOn="{StaticResource A_Style_Control_TombolaHorizonEditionBlammo}">
        <Setter Property="Focusable" Value="False"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Control}">
                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_TombolaHorizonEditionBacking}">
                        <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_TombolaHorizonEditionText}"
                            local:TextBlockInlineMarkup.Markup="{Binding HorizonEditionBonus, Converter={StaticResource A_StringToUpper}}"
                            local:TextBlockInlineMarkup.ResourceBaseName="A_Style_FZRun_Tombola_"
                            FontFamily="Horizon_B"/>
                    </local:FZMaterial>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <KeyTime x:Key="A_KeyTime_TombolaResetTime">0:0:0.233</KeyTime>

    <System:TimeSpan x:Key="A_TimeSpan_TombolaFlashOffsetFadeInStart">-0:0:0.2</System:TimeSpan>
    <System:TimeSpan x:Key="A_TimeSpan_TombolaFlashOffsetFadeInEnd">-0:0:0.033</System:TimeSpan>
    <System:TimeSpan x:Key="A_TimeSpan_TombolaFlashOffsetFadeOutStart">0:0:0.033</System:TimeSpan>
    <System:TimeSpan x:Key="A_TimeSpan_TombolaFlashOffsetFadeOutEnd">0:0:0.233</System:TimeSpan>

    <System:TimeSpan x:Key="A_TimeSpan_TombolaLitBulbsFadeInStart">0:0:0.0</System:TimeSpan>
    <System:TimeSpan x:Key="A_TimeSpan_TombolaLitBulbsFadeInEnd">0:0:0.1</System:TimeSpan>
    <System:TimeSpan x:Key="A_TimeSpan_TombolaLitBulbsFadeOutStart">0:0:0.0</System:TimeSpan>
    <System:TimeSpan x:Key="A_TimeSpan_TombolaLitBulbsFadeOutEnd">0:0:0.0</System:TimeSpan>
    <System:TimeSpan x:Key="A_TimeSpan_TombolaLitBulbsMotionOffset">0:0:1.43</System:TimeSpan>

    <System:TimeSpan x:Key="A_TimeSpan_TombolaPrizeGlowFadeInStart">-0:0:0.3</System:TimeSpan>
    <System:TimeSpan x:Key="A_TimeSpan_TombolaPrizeGlowFadeInEnd">0:0:0.0</System:TimeSpan>
    <System:TimeSpan x:Key="A_TimeSpan_TombolaPrizeGlowFadeOutStart">0:0:3.5</System:TimeSpan>
    <System:TimeSpan x:Key="A_TimeSpan_TombolaPrizeGlowFadeOutEnd">0:0:3.8</System:TimeSpan>

    <local:OffsetKeyTime x:Key="A_KeyTime_TombolaResetFlashFadeInStart"
        KeyTime="{StaticResource A_KeyTime_TombolaResetTime}"
        Offset="{StaticResource A_TimeSpan_TombolaFlashOffsetFadeInStart}"/>

    <local:OffsetKeyTime x:Key="A_KeyTime_TombolaResetFlashFadeInEnd"
        KeyTime="{StaticResource A_KeyTime_TombolaResetTime}"
        Offset="{StaticResource A_TimeSpan_TombolaFlashOffsetFadeInEnd}"/>

    <local:OffsetKeyTime x:Key="A_KeyTime_TombolaResetFlashFadeOutStart"
        KeyTime="{StaticResource A_KeyTime_TombolaResetTime}"
        Offset="{StaticResource A_TimeSpan_TombolaFlashOffsetFadeOutStart}"/>

    <local:OffsetKeyTime x:Key="A_KeyTime_TombolaResetFlashFadeOutEnd"
        KeyTime="{StaticResource A_KeyTime_TombolaResetTime}"
        Offset="{StaticResource A_TimeSpan_TombolaFlashOffsetFadeOutEnd}"/>

    <Style x:Key="A_Style_FZMaterial_TombolaFlash"
        TargetType="{x:Type local:FZMaterial}">
        <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetAdditive}"/>
        <Setter Property="Color" Value="#FFFFFFFF"/>
        <Setter Property="Opacity" Value="0"/>
    </Style>

    <Style x:Key="A_Style_TicketsList_Base"
        TargetType="ItemsControl">
        <Setter Property="Margin" Value="0,20"/>
        <Setter Property="ItemsSource" Value="{Binding}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <StackPanel Orientation="Vertical" IsItemsHost="True"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <local:FZMaterialPresetRoundtangleStroke x:Key="A_FZMaterialPresetRoundtangle_TombolaHardGlow"
        CornerRadius="32"
        Thickness="17"/>

    <local:FZMaterialPresetRoundtangleStroke x:Key="A_FZMaterialPresetRoundtangle_TombolaHardGlow_HorizonEdition"
        BasedOn="{StaticResource A_FZMaterialPresetRoundtangle_TombolaHardGlow}"
        GradientColorA="{StaticResource A_Color_HorizonEditionGradientA}"
        GradientColorB="{StaticResource A_Color_HorizonEditionGradientB}"
        GradientAngle="90"/>

    <local:FZMaterialPresetRoundtangleStroke x:Key="A_FZMaterialPresetRoundtangle_TombolaSoftGlow"
        CornerRadius="64"
        Thickness="64"
        Softness="64"
        AlphaMode="Additive"/>

    <local:FZMaterialPresetRoundtangleStroke x:Key="A_FZMaterialPresetRoundtangle_TombolaSoftGlow_HorizonEdition"
        BasedOn="{StaticResource A_FZMaterialPresetRoundtangle_TombolaSoftGlow}"
        GradientColorA="{StaticResource A_Color_HorizonEditionGradientA}"
        GradientColorB="{StaticResource A_Color_HorizonEditionGradientB}"
        GradientAngle="90"/>

    <Style x:Key="A_Style_FZMaterial_WinningPrizeHardGlow"
        TargetType="{x:Type local:FZMaterial}">
        <Setter Property="Opacity" Value="0"/>
        <Setter Property="Color" Value="{Binding PrizeRarity, Converter={StaticResource A_Converter_RarityToColor}}"/>
        <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_TombolaHardGlow}"/>
        <Style.Triggers>
            <EventTrigger RoutedEvent="FrameworkElement.Loaded">
                <local:BeginUIStoryboard>
                    <local:UIStoryboard RepeatBehavior="Forever">
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)">
                            <EasingDoubleKeyFrame KeyTime="0:0:0.0"
                                Value="0"
                                EasingFunction="{local:LinearEasing}" />
                            <EasingDoubleKeyFrame KeyTime="0:0:0.1"
                                Value="1"
                                EasingFunction="{local:LinearEasing}" />
                            <EasingDoubleKeyFrame KeyTime="0:0:0.2"
                                Value="0"
                                EasingFunction="{local:LinearEasing}" />
                        </DoubleAnimationUsingKeyFrames>
                    </local:UIStoryboard>
                </local:BeginUIStoryboard>
            </EventTrigger>
            <DataTrigger Binding="{Binding PrizeRarity}" Value="{x:Static local:XAMLRarity.HorizonEdition}">
                <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_TombolaHardGlow_HorizonEdition}"/>
                <Setter Property="Color" Value="#FFFFFFFF"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="A_Style_FZMaterial_WinningPrizeSoftGlow"
        TargetType="{x:Type local:FZMaterial}">
        <Setter Property="Opacity" Value="0"/>
        <Setter Property="Margin" Value="-40"/>
        <Setter Property="Color" Value="{Binding PrizeRarity, Converter={StaticResource A_Converter_RarityToColor}}"/>
        <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_TombolaSoftGlow}"/>
        <Style.Triggers>
            <EventTrigger RoutedEvent="FrameworkElement.Loaded">
                <local:BeginUIStoryboard>
                    <local:UIStoryboard RepeatBehavior="Forever">
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)">
                            <EasingDoubleKeyFrame KeyTime="0:0:0.0"
                                Value="1"
                                EasingFunction="{local:LinearEasing}" />
                            <EasingDoubleKeyFrame KeyTime="0:0:0.1"
                                Value="0"
                                EasingFunction="{local:LinearEasing}" />
                            <EasingDoubleKeyFrame KeyTime="0:0:0.2"
                                Value="1"
                                EasingFunction="{local:LinearEasing}" />
                        </DoubleAnimationUsingKeyFrames>
                    </local:UIStoryboard>
                </local:BeginUIStoryboard>
            </EventTrigger>
            <DataTrigger Binding="{Binding PrizeRarity}" Value="{x:Static local:XAMLRarity.HorizonEdition}">
                <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_TombolaSoftGlow_HorizonEdition}"/>
                <Setter Property="Color" Value="#FFFFFFFF"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>

</ResourceDictionary>
