<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Style
        x:Key="A_Style_ScrollingTextBlock"
        TargetType="{Type local:ScrollingTextBlock}">
        <Setter
            Property="Focusable"
            Value="False" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="{Type local:ScrollingTextBlock}">
                    <Grid
                        x:Name="PART_ContentContainer">
                        <ScrollViewer
                            x:Name="PART_ScrollViewer"
                            VerticalScrollBarVisibility="Hidden">
                            <FZTextBlock
                                x:Name="PART_ContentText"
                                Margin="0,0,0,15"
                                Text="{TemplateBinding Text}"
                                Style="{StaticResource A_Style_FZTextBlock_DescriptionBlockBody}"
                                Color="{TemplateBinding Tag}"
                                TextWrapping="Wrap"
                                Stretch="None" />
                        </ScrollViewer>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <MappingConverter
        x:Key="A_Converter_BlammoTypeToText">
        <MappingConverterEntry
            Key="{x:Static local:MarketplaceBlammoType.Purchased}"
            Value="{Loc InGameMarketplace.IDS_Purchased}" />
        <MappingConverterEntry
            Key="{x:Static local:MarketplaceBlammoType.Free}"
            Value="{Loc InGameMarketplace.IDS_Free}" />
        <MappingConverterEntry
            Key="{x:Static local:MarketplaceBlammoType.OnSale}"
            Value="{Loc InGameMarketplace.IDS_OnSale}" />
        <MappingConverterEntry
            Key="{x:Static local:MarketplaceBlammoType.New}"
            Value="{Loc InGameMarketplace.IDS_New}" />
    </MappingConverter>
    <MappingConverter
        x:Key="A_Converter_BlammoTypeToVisibility"
        Default="{x:Static Visibility.Visible}">
        <MappingConverterEntry
            Key="{x:Static local:MarketplaceBlammoType.None}"
            Value="{x:Static Visibility.Collapsed}" />
    </MappingConverter>
    <Style x:Key="A_Style_Marketplace_Credits_Breadcrumb" TargetType="{Type ContentControl}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{Type ContentControl}">
                    <Grid>
                        <FZMaterial x:Name="Shadow" 
                                    Color="{StaticResource H_Color_Primary_Black}"
                                    Opacity="0.2"
                                    Margin="2,2,-2,-2"
                                    Height="28"
                                    Preset="{StaticResource H_Roundtangle_Outer_2px}"/>
                        <FZMaterial x:Name="Background"
                                    Color="{StaticResource H_Color_Primary_Yellow}"
                                    Height="28"
                                    Preset="{StaticResource H_Roundtangle_Outer_2px}"/>
                        <DockPanel>
                            <Control Style="{StaticResource H_Style_Control_CreditsIcon}"
                                        Width="20"
                                        Height="20"
                                        Margin="5,0,0,0"/>
                            <FZTextBlock DockPanel.Dock="Right"
                                         Style="{StaticResource A_Style_FZTextBlock_HorizonA}"
                                         Color="{StaticResource H_Color_Primary_Black}"
                                         CapHeight="14"
                                         Margin="5,0"
                                         VerticalAlignment="Center"
                                         HorizontalAlignment="Right"
                                         Text="{TemplateBinding Content, Converter={StaticResource A_NumUnitConverter_NoUnit_0dp}, ConverterParameter=money}"/>
                        </DockPanel>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="A_Style_MarketplaceBlammo"
        TargetType="{Type ContentControl}">
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{Type ContentControl}">
                    <Grid>
                        <FZMaterial Color="{StaticResource H_Color_Primary_Black}"
                                    Opacity="0.2"
                                    Width="{TemplateBinding Width}"
                                    Height="{TemplateBinding Height}"
                                    Margin="2,2,-2,-2"
                                    Preset="{StaticResource H_Roundtangle_Outer_2px}">
                        </FZMaterial>
                        <FZMaterial
                            Style="{StaticResource A_Style_FZMaterial_CarSelectCarouselItem_StatusIconBackground}"
                            Focusable="False"
                            Color="{Binding (local:BindingProxy.A), RelativeSource={RelativeSource TemplatedParent}}">
                                <FZTextBlock
                                    Text="{TemplateBinding Content}"
                                    Style="{DynamicResource A_Style_FZTextBlock_CarSelectCarouseItem_StatusText}"
                                    Color="{Binding (local:BindingProxy.B), RelativeSource={RelativeSource TemplatedParent}}" />
                        </FZMaterial>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter
            Property="FocusVisualStyle"
            Value="{Null}" />
        <Setter
            Property="local:BindingProxy.A"
            Value="{StaticResource H_Color_Primary_Yellow}" />
        <Setter
            Property="local:BindingProxy.B"
            Value="{StaticResource H_Color_Primary_Black}" />
        <Setter
            Property="Tag"
            Value="{x:Static local:MarketplaceBlammoType.None}" />
        <Style.Triggers>
            <Trigger
                Property="Tag"
                Value="{x:Static local:MarketplaceBlammoType.Purchased}">
                <Setter
                    Property="Content"
                    Value="{Loc InGameMarketplace.IDS_Owned}" />
                <Setter
                    Property="local:BindingProxy.A"
                    Value="{StaticResource H_Color_Primary_Green}" />
            </Trigger>
            <Trigger
                Property="Tag"
                Value="{x:Static local:MarketplaceBlammoType.Free}">
                <Setter
                    Property="Content"
                    Value="{Loc InGameMarketplace.IDS_Free}" />
                <Setter
                    Property="local:BindingProxy.A"
                    Value="{StaticResource A_Color_ItemStatusBackground}" />
            </Trigger>
            <Trigger
                Property="Tag"
                Value="{x:Static local:MarketplaceBlammoType.OnSale}">
                <Setter
                    Property="Content"
                    Value="{Loc InGameMarketplace.IDS_OnSale}" />
                <Setter
                    Property="local:BindingProxy.A"
                    Value="{StaticResource A_Color_ItemStatusBackground_Sale}" />
            </Trigger>
            <Trigger
                Property="Tag"
                Value="{x:Static local:MarketplaceBlammoType.New}">
                <Setter
                    Property="Content"
                    Value="{Convert {local:Loc InGameMarketplace.IDS_New}, Converter={StaticResource A_StringToUpper}}" />
                <Setter
                    Property="local:BindingProxy.A"
                    Value="{StaticResource H_Color_Primary_Yellow}" />
            </Trigger>
            <Trigger
                Property="Tag"
                Value="{x:Static local:MarketplaceBlammoType.None}">
                <Setter
                    Property="Visibility"
                    Value="Collapsed" />
            </Trigger>
            <Trigger
                Property="Tag"
                Value="{Null}">
                <Setter
                    Property="Visibility"
                    Value="Collapsed" />
            </Trigger>
            <Trigger
                Property="Selector.IsSelected"
                Value="True">
                <Setter
                    Property="Panel.ZIndex"
                    Value="3" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style
        x:Key="A_Style_MarketPlaceBlammoWithIcon"
        TargetType="{Type ContentControl}"
        BasedOn="{StaticResource A_Style_MarketplaceBlammo}">
        <Style.Resources>
            <ResourceDictionary>
                <Style
                    x:Key="A_Style_BlammoIcon_Dynamic"
                    TargetType="local:FZMaterial">
                    <Setter
                        Property="Visibility"
                        Value="Collapsed" />
                </Style>
                <Style
                    x:Key="A_Style_BlammoText_Dynamic"
                    TargetType="local:FZTextBlock"
                    BasedOn="{StaticResource A_Style_FZTextBlock_CarSelectCarouseItem_StatusText}">
                    <Setter
                        Property="Margin"
                        Value="50,0,12,0" />
                    <Setter
                        Property="Color"
                        Value="{Binding (local:BindingProxy.B), RelativeSource={RelativeSource TemplatedParent}}" />
                </Style>
            </ResourceDictionary>
        </Style.Resources>
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="{Type ContentControl}">
                    <Grid>
                        <FZMaterial
                            Style="{StaticResource A_Style_FZMaterial_CarSelectCarouselItem_StatusIconBackground}"
                            Height="27"
                            Focusable="False"
                            Color="{Binding (local:BindingProxy.A), RelativeSource={RelativeSource TemplatedParent}}">
                            <Grid>
                                <FZMaterial
                                    Style="{DynamicResource A_Style_BlammoIcon_Dynamic}" />
                                <FZTextBlock
                                    Text="{TemplateBinding Content}"
                                    Style="{DynamicResource A_Style_BlammoText_Dynamic}" />
                            </Grid>
                        </FZMaterial>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style
        x:Key="A_Style_Control_MarketplaceBlammoOwnedTick"
        TargetType="{Type Control}">
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="{Type Control}">
                    <FZMaterial
                        Style="{StaticResource A_Style_FZMaterial_CarSelectCarouselItem_StatusIconBackground}"
                        Focusable="False">
                        <FZTextBlock
                            Text="{Loc InGameMarketplace.IDS_Owned}"
                            Color="{StaticResource H_Color_Primary_Purple}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            CapHeight="13"
                            Margin="8,6"
                            FontFamily="Horizon_A"/>
                    </FZMaterial>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter
            Property="Visibility"
            Value="Collapsed" />
        <Style.Triggers>
            <Trigger
                Property="Tag"
                Value="{x:Static local:MarketplaceBlammoType.Purchased}">
                <Setter
                    Property="Visibility"
                    Value="Visible" />
            </Trigger>
        </Style.Triggers>
    </Style>
</ResourceDictionary>