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


    <local:MultiConverter x:Key="A_Converter_AuctionTime">
        <local:MultiConverterEntry>
            <local:MultiConverterEntry.Converter>
                <local:LinearTransformConverter Scale="60" />
            </local:MultiConverterEntry.Converter>
        </local:MultiConverterEntry>
        <local:MultiConverterEntry>
            <local:MultiConverterEntry.Converter>
                <local:AbbreviatedTimeConverter SubstituteStringOnZero="{local:Loc AuctionHouse.IDS_Ending}" />
            </local:MultiConverterEntry.Converter>
        </local:MultiConverterEntry>
    </local:MultiConverter>

    <local:FZMaterialPresetRoundtangleStroke x:Key="A_FZMaterialPresetRoundtangleStroke_AuctionHouse_CurrentBidNotSet"
                                                 BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
                                                 CornerRadius="{StaticResource A_CornerRadius_InnerInner_All}"
                                                 Thickness="2" />
                                                 
    <local:FZMaterialPresetRoundtangleStroke x:Key="A_FZMaterialPresetRoundtangleStroke_AuctionHouse_AuctionStateBox"
                                                 BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
                                                 CornerRadius="{StaticResource A_CornerRadius_InnerInner_All}"
                                                 Thickness="2" />
    <local:FZMaterialPresetRoundtangle
        x:Key="A_FZMaterialPresetRoundtangle_Gradient_RemainingTime_Default"
        BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
        GradientColorA="{StaticResource A_Color_AuctionHouse_RemainingTime_Default_GradientA}"
        GradientColorB="{StaticResource A_Color_AuctionHouse_RemainingTime_Default_GradientB}"
        GradientAngle="90" 
        CornerRadius="0,0,0,5"/>

    <local:FZMaterialPresetRoundtangle
        x:Key="A_FZMaterialPresetRoundtangle_Gradient_RemainingTime_EndingSoon"
        BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
        GradientColorA="{StaticResource A_Color_AuctionHouse_RemainingTime_EndSoon_GradientA}"
        GradientColorB="{StaticResource A_Color_AuctionHouse_RemainingTime_EndSoon_GradientB}"
        GradientAngle="90" 
        CornerRadius="0,0,0,5"/>

    <local:MultiConverter x:Key="A_Converter_RemainingTime_Gradient">
        <local:MultiConverterEntry>
            <local:MultiConverterEntry.Converter>
                <local:LinearTransformConverter Scale="60" />
            </local:MultiConverterEntry.Converter>
        </local:MultiConverterEntry>
        <local:MultiConverterEntry>
            <local:MultiConverterEntry.Converter>
                <local:CompareConverter Value="0" Equal="{StaticResource A_FZMaterialPresetRoundtangle_Gradient_RemainingTime_EndingSoon}" NotEqual="{StaticResource A_FZMaterialPresetRoundtangle_Gradient_RemainingTime_Default}"  />
            </local:MultiConverterEntry.Converter>
        </local:MultiConverterEntry>
    </local:MultiConverter>

    <Style x:Key="A_Style_FrameworkElement_Auction_Banner_Content_Coloured"
           TargetType="FrameworkElement">
        <Setter Property="local:BindingProxy.C"
                Value="{StaticResource A_Color_SubHeader_Text}" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding State}"
                         Value="{x:Static local:AuctionState.WillSell}">
                <Setter Property="local:BindingProxy.C"
                        Value="{StaticResource A_Color_Header_Text}" />
            </DataTrigger>
            <DataTrigger Binding="{Binding State}"
                         Value="{x:Static local:AuctionState.Winning}">
                <Setter Property="local:BindingProxy.C"
                        Value="{StaticResource A_Color_Header_Text}" />
            </DataTrigger>
            <DataTrigger Binding="{Binding State}"
                         Value="{x:Static local:AuctionState.NoBids}">
                <Setter Property="local:BindingProxy.C"
                        Value="{StaticResource A_Color_Header_Text}" />
            </DataTrigger>
            <DataTrigger Binding="{Binding State}"
                         Value="{x:Static local:AuctionState.Sold}">
                <Setter Property="local:BindingProxy.C"
                        Value="{StaticResource A_Color_Header_Text}" />
            </DataTrigger>
            <DataTrigger Binding="{Binding State}"
                         Value="{x:Static local:AuctionState.Won}">
                <Setter Property="local:BindingProxy.C"
                        Value="{StaticResource A_Color_Header_Text}" />
            </DataTrigger>
            <DataTrigger Binding="{Binding NoActions}"
                         Value="True">
                <Setter Property="local:BindingProxy.C"
                        Value="{StaticResource A_Color_SubHeader_Text}" />
            </DataTrigger>
        </Style.Triggers>
    </Style>
    
    <MappingConverter x:Key="A_Converter_AuctionState_to_AuctionStateText">
        <MappingConverterEntry Key="{x:Static local:AuctionState.NoBids}" Value="{Loc AuctionHouse.IDS_NoBids}"/>
        <MappingConverterEntry Key="{x:Static local:AuctionState.DidntSell}" Value="{Loc AuctionHouse.IDS_State_DidntSell}"/>
        <MappingConverterEntry Key="{x:Static local:AuctionState.Outbid}" Value="{Loc AuctionHouse.IDS_State_Outbid}"/>
        <MappingConverterEntry Key="{x:Static local:AuctionState.Sold}" Value="{Loc AuctionHouse.IDS_State_Sold}"/>
        <MappingConverterEntry Key="{x:Static local:AuctionState.WillSell}" Value="{Loc AuctionHouse.IDS_State_WillSell}"/>
        <MappingConverterEntry Key="{x:Static local:AuctionState.Lost}" Value="{Loc AuctionHouse.IDS_State_Lost}"/>
        <MappingConverterEntry Key="{x:Static local:AuctionState.Winning}" Value="{Loc AuctionHouse.IDS_State_Winning}"/>
        <MappingConverterEntry Key="{x:Static local:AuctionState.Won}" Value="{Loc AuctionHouse.IDS_State_Won}"/>
        <MappingConverterEntry Key="{x:Static local:AuctionState.Banned}" Value="{Loc AuctionHouse.IDS_State_Banned}"/>
    </MappingConverter>
    
    <Style x:Key="A_Style_FZTextBlock_Auction_CanExpire"
           TargetType="local:FZTextBlock">
        <Setter Property="local:BindingProxy.A"
                Value="{StaticResource A_Color_Header_Text}" />
        <Setter Property="Color"
                Value="{Binding Path=(local:BindingProxy.A), RelativeSource={RelativeSource Self}}" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding Ended}"
                         Value="True">
                <Setter Property="Color"
                        Value="{StaticResource A_Color_AuctionHouse_Expired}" />
            </DataTrigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="A_Style_FZTextBlock_Auction_Pill_CreditValueText"
           TargetType="local:FZTextBlock">
        <Setter Property="CapHeight"
                Value="19" />
        <Setter Property="FontFamily"
                Value="Horizon_A" />
        <Setter Property="Margin"
                Value="6,0,0,0" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding Ended}"
                         Value="True">
                <Setter Property="Color"
                        Value="{StaticResource A_Color_AuctionHouse_Expired}" />
            </DataTrigger>
            <DataTrigger Binding="{Binding NoActions}"
                         Value="True">
                <Setter Property="Color"
                        Value="{StaticResource A_Color_AuctionHouse_NoActionsText}" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <ControlTemplate x:Key="A_Template_ContentControl_BidBox"
                     TargetType="ContentControl">
        <StackPanel Orientation="Vertical">
            <local:FZTextBlock Style="{DynamicResource A_Style_FZTextBlock_BidBoxTitle_Dynamic}" FontFamily="Horizon_B" />
            <Decorator Height="9" />
            <ContentPresenter VerticalAlignment="Center"/>
        </StackPanel>
    </ControlTemplate>

    <Style x:Key="A_Style_FZTextBlock_BidBoxTitle_Default"
           TargetType="{x:Type local:FZTextBlock}"
           BasedOn="{StaticResource A_Style_FZTextBlock_Auction_CanExpire}">
        <Setter Property="Text" Value="{Binding Tag, RelativeSource={RelativeSource AncestorType=ContentControl}}" />
        <Setter Property="Height" Value="16" />
        <Setter Property="Stretch" Value="Uniform" />
        <Setter Property="StretchDirection" Value="Both" />
        <Setter Property="TextAlignment" Value="{DynamicResource A_TextAlignment_BidBox_Title}" />
        <Setter Property="FontFamily" Value="Horizon_A" />
        <Setter Property="local:BindingProxy.A" Value="{StaticResource A_Color_AuctionHouse_PillDetailText}" />
    </Style>

    <Style x:Key="A_Style_FZTextBlock_BidBoxTitle_Dynamic"
           BasedOn="{StaticResource A_Style_FZTextBlock_BidBoxTitle_Default}"
           TargetType="{x:Type local:FZTextBlock}" />


    <Style x:Key="A_Style_ContentControl_BidBox_HighestBid"
           TargetType="ContentControl">
        <Setter Property="Template"
                Value="{StaticResource A_Template_ContentControl_BidBox}" />
        <Setter Property="Tag"
                Value="{local:Loc AuctionHouse.IDS_HighestBid}" />
        <Setter Property="local:BindingProxy.B"
                Value="{StaticResource A_Color_AuctionHouse_CurrentBidPrice}" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding HighestBidder}"
                         Value="{x:Null}">
                <Setter Property="Tag"
                        Value="{local:Loc AuctionHouse.IDS_NoBidsTitle}" />
            </DataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition  Binding="{Binding HighestBidder, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"
                                Value="{x:Static Visibility.Visible}" />
                    <Condition Binding="{Binding Ended}"
                               Value="True" />
                </MultiDataTrigger.Conditions>
                <Setter Property="Tag"
                        Value="{local:Loc AuctionHouse.IDS_WinningBid}" />
            </MultiDataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="A_Style_FZTextBlock_AuctionDetails_TimeRemaining"
           TargetType="local:FZTextBlock">
        <Setter Property="FontFamily"
                Value="Horizon_A" />
        <Setter Property="CapHeight"
                Value="19" />
        <Setter Property="Stretch"
                Value="Uniform" />
        <Setter Property="StretchDirection"
                Value="DownOnly" />
        <Setter Property="Color"
                Value="{StaticResource H_Color_Primary_Black}" />
    </Style>
    <Style x:Key="A_Style_FrameworkElement_AuctionDetails_TimeRemaining_Active"
           TargetType="FrameworkElement">
        <Setter Property="Visibility"
                Value="Visible" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding Ended}"
                         Value="True">
                <Setter Property="Visibility"
                        Value="Collapsed" />
            </DataTrigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="A_Style_FrameworkElement_AuctionDetails_TimeRemaining_Expired"
           TargetType="FrameworkElement">
        <Setter Property="Visibility"
                Value="Collapsed" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding Ended}"
                         Value="True">
                <Setter Property="Visibility"
                        Value="Visible" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <ControlTemplate TargetType="Control"
                     x:Key="A_ControlTemplate_AuctionDetails_TimeRemaining">
        <Grid>
            <!-- Time remaining -->
            <DockPanel VerticalAlignment="Bottom"
                        HorizontalAlignment="Center"
                        Style="{StaticResource A_Style_FrameworkElement_AuctionDetails_TimeRemaining_Active}">
                <local:FZMaterial Height="34"
                                  Width="34"
                                  ImageSource="/ForzaUI;component/Textures/Anthem/Icons/TinyGavel.png"
                                  VerticalAlignment="Center"
                                  Color="{StaticResource H_Color_Primary_Purple}" />
                <Decorator Width="10" />
                <Viewbox StretchDirection="DownOnly">
                    <StackPanel Orientation="Horizontal">
                        <local:FZTextBlock Text="{Binding Source={local:Loc AuctionHouse.IDS_Time_Remaining}, Converter={StaticResource A_StringToUpper}}"
                                           Style="{StaticResource A_Style_FZTextBlock_AuctionDetails_TimeRemaining}"
                                           Color="{StaticResource A_Color_AuctionHouse_PillDetailText}"
                                           FontFamily="Horizon_B"
                                           VerticalAlignment="Center"
                                           Visibility="{Binding (local:BindingProxy.A), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource A_FZBooleanToVisibilityConverter}, FallbackValue=Collapsed}" />
                        <Decorator Width="8"
                               Visibility="{Binding (local:BindingProxy.A), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource A_FZBooleanToVisibilityConverter}, FallbackValue=Collapsed}" />
                        <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_AuctionDetails_TimeRemaining}"
                                   VerticalAlignment="Center"
                                   Text="{Binding TimeRemaining, Converter={StaticResource A_Converter_AuctionTime}}" />
                    </StackPanel>
                </Viewbox>
            </DockPanel>
            <StackPanel Orientation="Horizontal"
                        VerticalAlignment="Bottom"
                        HorizontalAlignment="Center"
                        Margin="0,-2"
                        Style="{StaticResource A_Style_FrameworkElement_AuctionDetails_TimeRemaining_Expired}">
                <local:FZMaterial Height="34"
                                  Width="34"
                                  ImageSource="/ForzaUI;component/Textures/Anthem/Icons/TinyGavel.png"
                                  VerticalAlignment="Center"
                                  Color="{StaticResource A_Color_AuctionHouse_Expired}" />
                <Decorator Width="10" />
                <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_AuctionDetails_TimeRemaining}"
                                   Color="{StaticResource A_Color_AuctionHouse_Expired}"
                                   Text="{local:Loc AuctionHouse.IDS_Ended}" 
                                   Margin="0,6,0,0"/>
            </StackPanel>
        </Grid>
    </ControlTemplate>

    <Size x:Key="A_Size_Auction_GamerPicSizeParams">102,102</Size>

    <Style x:Key="A_Style_FZMaterial_Auction_HighestBidder"
           TargetType="local:FZMaterial">
        <Setter Property="ImageSource"
                Value="{Binding HighestBidder, Converter={StaticResource A_GamerPicConverter}, ConverterParameter={StaticResource A_Size_Auction_GamerPicSizeParams}}" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding HighestBidder}"
                         Value="{x:Null}">
                <Setter Property="ImageSource"
                        Value="/ForzaUI;component/Textures/Anthem/NoGamerpic.png" />
                <Setter Property="Color"
                        Value="{Binding Tag, RelativeSource={RelativeSource Self}}" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="A_Style_FZTextBlock_Auction_HighestBidder"
           TargetType="local:FZTextBlock">
        <Setter Property="Text"
                Value="{Binding HighestBidder.FormattedGamertag}" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding HighestBidder}"
                         Value="{x:Null}">
                <Setter Property="Text"
                        Value="{local:Loc AuctionHouse.IDS_NoBids}" />
                <Setter Property="Margin" Value="0,5,0,0" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="A_Style_FZTextBlock_Auction_HighestBidder_Title"
           TargetType="local:FZTextBlock">
        <Setter Property="Text"
                Value="{local:Loc AuctionHouse.IDS_AuctionHouse_High_Bidder}" />
        <Style.Triggers>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition  Binding="{Binding HighestBidder, Converter={StaticResource H_TrueIfNotNull}}"
                                Value="True" />
                    <Condition Binding="{Binding Ended}"
                                 Value="True" />
                </MultiDataTrigger.Conditions>
                <Setter Property="Text"
                        Value="{local:Loc AuctionHouse.IDS_Winner}" />
            </MultiDataTrigger>
        </Style.Triggers>
    </Style>

    <ControlTemplate TargetType="Control"
                     x:Key="A_Template_Control_Auction_HighestBidder">
        <StackPanel Height="80" Orientation="Horizontal">
            <Grid Width="80">
                <local:FZMaterial x:Name="GamerPicMaterial"
                                  Style="{StaticResource A_Style_FZMaterial_Auction_HighestBidder}"
                                  Height="80"
                                  Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_InnerInnerAll}"
                                  Stretch="Uniform"
                                  Tag="{Binding Path=(local:BindingProxy.B), RelativeSource={RelativeSource TemplatedParent}}"
                                  Visibility="{Binding Downloaded, RelativeSource={RelativeSource Self}, Converter={StaticResource A_FZBooleanToVisibilityConverter_UseHidden}}" />
                <ProgressBar Style="{DynamicResource A_Style_ProgressBar_WaitSpinner_Dynamic}"
                             HorizontalAlignment="Center"
                             VerticalAlignment="Center"
                             Visibility="{Binding Downloaded, ElementName=GamerPicMaterial, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}"/>
            </Grid>

            <StackPanel Orientation="Vertical" Margin="11,3,0,3">
                <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_Auction_HighestBidder_Title}"
                                   x:Name="HighestBidderTitle"
                                   HorizontalAlignment="Left"
                                   StretchDirection="Both"
                                   Stretch="Uniform"
                                   CapHeight="22"
                                   TextAlignment="Left"
                                   FontFamily="Horizon_B"
                                   Color="{StaticResource H_Color_Primary_Grey_80pc}"
                                   TrackingAdjust="0.03"/>
                <Decorator Height="24"/>
                <StackPanel Orientation="Horizontal">
                    <local:FZTextBlock Text="{Binding HighestBidder.FormattedClubTag}"
                                       HorizontalAlignment="Left"
                                       FontFamily="Horizon_A"
                                       x:Name="BidderClubTagName"
                                       CapHeight="22"
                                       VerticalAlignment="Center"
                                       TrackingAdjust="0.03"
                                       Color="{TemplateBinding local:BindingProxy.A}"
                                       Visibility="{Binding HighestBidder.FormattedClubTag, Converter={StaticResource A_StringVisConverter}}"/>
                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_Auction_HighestBidder}"
                                       x:Name="HighestBidderName"
                                       HorizontalAlignment="Left"
                                       VerticalAlignment="Bottom"
                                       FontFamily="Horizon_A"
                                       CapHeight="22"
                                       TrackingAdjust="0.03"
                                       Stretch="Uniform"
                                       Color="{TemplateBinding local:BindingProxy.A}"/>
                </StackPanel>
            </StackPanel>
        </StackPanel>
        <ControlTemplate.Triggers>
            <DataTrigger Binding="{Binding HighestBidder.FormattedClubTag, Converter={StaticResource A_StringVisConverter}}" Value="{x:Static Visibility.Visible}">
                <Setter TargetName="HighestBidderName" Property="Margin" Value="5,0,0,0"/>
            </DataTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <Style x:Key="A_Style_FZTextBlock_HighestBid"
           TargetType="FZTextBlock">
        <Setter Property="Text"
                Value="{local:Loc AuctionHouse.IDS_HighestBid}" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding HighestBidder}"
                         Value="{x:Null}">
                <Setter Property="Text"
                        Value="{local:Loc AuctionHouse.IDS_StartingBid}" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <ControlTemplate TargetType="Control"
                     x:Key="A_Template_Control_Auction_HighestBid">
        <StackPanel Height="80" Orientation="Horizontal">
            <local:FZMaterial x:Name="HighestBidIcon"
                              Width="80"
                              Height="80"
                              Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_InnerInnerAll}"
                              Stretch="Uniform"
                              ImageSource="/ForzaUI;component/Textures/Anthem/Icons/Auction/Highest_Bid.png"/>
            <StackPanel Orientation="Vertical" Margin="11,1,0,3">
                <local:FZTextBlock x:Name="HighestBidTitle"
                                   Style="{StaticResource A_Style_FZTextBlock_HighestBid}"
                                   StretchDirection="Both"
                                   Stretch="Uniform"
                                   CapHeight="22"
                                   TextAlignment="Left"
                                   HorizontalAlignment="Left"
                                   FontFamily="Horizon_B"
                                   Color="{StaticResource H_Color_Primary_Grey_80pc}"
                                   TrackingAdjust="0.03"/>
                <Decorator Height="20"/>
                <StackPanel Orientation="Horizontal">
                    <Control x:Name="CreditsIcon"
                                      Style="{StaticResource H_Style_Control_CreditsIcon}"
                                      Width="30"
                                      Height="30"/>
                    <local:FZTextBlock Text="{Binding HighestBid, Converter={StaticResource A_NumUnitConverter_NoUnit_0dp}}"
                                       HorizontalAlignment="Left"
                                       FontFamily="Horizon_A"
                                       CapHeight="30"
                                       Margin="8,-2,0,0"
                                       VerticalAlignment="Top"
                                       Color="{StaticResource H_Color_Primary_Yellow}"/>
                </StackPanel>
            </StackPanel>
        </StackPanel>
    </ControlTemplate>

    <Style x:Key="A_Style_FZMaterial_Auction_Seller"
           TargetType="local:FZMaterial">
        <Setter Property="ImageSource"
                Value="{Binding Seller, Converter={StaticResource A_GamerPicConverter}, ConverterParameter={StaticResource A_Size_Auction_GamerPicSizeParams}}" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding Seller}"
                         Value="{x:Null}">
                <Setter Property="ImageSource"
                        Value="/ForzaUI;component/Textures/Anthem/NoGamerpic.png" />
                <Setter Property="Color"
                        Value="{Binding Tag, RelativeSource={RelativeSource Self}}" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="A_Style_Control_Auction_Seller"
           TargetType="Control">
        <Style.Resources>
            <Style x:Key="A_Style_ProgressBar_WaitSpinner_Dynamic"
                TargetType="{x:Type ProgressBar}"
                BasedOn="{StaticResource A_Style_ProgressBar_WaitSpinner}"/>
        </Style.Resources>
        <Setter Property="Template" Value="{DynamicResource A_Template_Control_Auction_Seller}"/>
    </Style>
    
    <ControlTemplate TargetType="Control"
                     x:Key="A_Template_Control_Auction_Seller">
        <StackPanel Height="80" Orientation="Horizontal">
            <Grid Width="80">
                <local:FZMaterial x:Name="SellerGamerPicMaterial"
                                  Style="{StaticResource A_Style_FZMaterial_Auction_Seller}"
                                  Height="80"
                                  Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_InnerInnerAll}"
                                  Stretch="Uniform"
                                  Tag="{Binding Path=(local:BindingProxy.B), RelativeSource={RelativeSource TemplatedParent}}"
                                  Visibility="{Binding Downloaded, RelativeSource={RelativeSource Self}, Converter={StaticResource A_FZBooleanToVisibilityConverter_UseHidden}}" />
                <ProgressBar Style="{DynamicResource A_Style_ProgressBar_WaitSpinner_Dynamic}"
                             HorizontalAlignment="Center"
                             VerticalAlignment="Center"
                             Visibility="{Binding Downloaded, ElementName=SellerGamerPicMaterial, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}"/>
            </Grid>

            <StackPanel Orientation="Vertical" Margin="12,3,0,3">
                <local:FZTextBlock Text="{local:Loc AuctionHouse.IDS_Seller}"
                                   x:Name="SellerTitle"
                                   HorizontalAlignment="Left"
                                   StretchDirection="Both"
                                   Stretch="Uniform"
                                   CapHeight="22"
                                   TextAlignment="Left"
                                   FontFamily="Horizon_B"
                                   Color="{StaticResource H_Color_Primary_Grey_80pc}"/>
                <Decorator Height="24"/>
                <StackPanel Orientation="Horizontal">
                    <local:FZTextBlock Text="{Binding Seller.FormattedClubTag}"
                                       HorizontalAlignment="Left"
                                       FontFamily="Horizon_A"
                                       x:Name="SellerClubTagName"
                                       CapHeight="22"
                                       VerticalAlignment="Center"
                                       Color="{TemplateBinding local:BindingProxy.A}"
                                       Visibility="{Binding Seller.FormattedClubTag, Converter={StaticResource A_StringVisConverter}}"/>
                    <local:FZTextBlock Text="{Binding Seller.FormattedGamertag}"
                                       x:Name="SellerName"
                                       HorizontalAlignment="Left"
                                       VerticalAlignment="Bottom"
                                       FontFamily="Horizon_A"
                                       CapHeight="22"
                                       Stretch="Uniform"
                                       Color="{TemplateBinding local:BindingProxy.A}"/>
                </StackPanel>
            </StackPanel>
        </StackPanel>
        <ControlTemplate.Triggers>
            <DataTrigger Binding="{Binding Seller.FormattedClubTag, Converter={StaticResource A_StringVisConverter}}" Value="{x:Static Visibility.Visible}">
                <Setter TargetName="SellerName" Property="Margin" Value="5,0,0,0"/>
            </DataTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <Style x:Key="A_Style_FZMaterial_BuyoutPriceHigh_Arrow" TargetType="FZMaterial">
        <Setter Property="Stretch" Value="Uniform"/>
        <Setter Property="Color" Value="{StaticResource A_Color_AuctionHouse_HighPrice}"/>
        <Setter Property="ImageSource" Value="/ForzaUI;component/Textures/Anthem/Icons/Auction/Arrow.png"/>
        <Setter Property="Width" Value="22"/>
        <Setter Property="Margin" Value="5,0,0,0"/>
    </Style>

    <ControlTemplate TargetType="Control"
                     x:Key="A_Template_Control_Auction_Buyout">
        <StackPanel Height="80" Orientation="Horizontal">
            <local:FZMaterial x:Name="BuyoutIcon"
                              Width="80"
                              Height="80"
                              Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_InnerInnerAll}"
                              Stretch="Uniform"
                              ImageSource="/ForzaUI;component/Textures/Anthem/Icons/Auction/Buy_Out_Icon.png"/>
            <StackPanel Orientation="Vertical" Margin="12,3,0,3">
                <local:FZTextBlock x:Name="BuyoutTitle"
                                   Text="{local:Loc AuctionHouse.IDS_AuctionHouseDetails_Buyout}"
                                   StretchDirection="Both"
                                   Stretch="Uniform"
                                   CapHeight="22"
                                   TextAlignment="Left"
                                   HorizontalAlignment="Left"
                                   FontFamily="Horizon_B"
                                   Color="{StaticResource H_Color_Primary_Grey_80pc}"/>
                <Decorator Height="20"/>
                <StackPanel Orientation="Horizontal">
                    <Control x:Name="CreditsIcon"
                                Style="{StaticResource H_Style_Control_CreditsIcon}"
                                Width="30"
                                Height="30"/>
                    <FZTextBlock Style="{StaticResource A_Style_FZTextBlock_Auction_Pill_CreditValueText}"
                                 Text="{Binding Buyout, Converter={StaticResource A_NumUnitConverter_NoUnit_0dp}}"
                                 HorizontalAlignment="Left"
                                 FontFamily="Horizon_A"
                                 x:Name="BuyoutValue"
                                 CapHeight="30"
                                 Margin="10,0,0,0"
                                 VerticalAlignment="Center"
                                 Color="{StaticResource H_Color_Primary_White}"/>
                    <FZMaterial x:Name="Arrow"
                                Visibility="Collapsed"
                                Style="{StaticResource A_Style_FZMaterial_BuyoutPriceHigh_Arrow}"/>
                </StackPanel>
            </StackPanel>
        </StackPanel>
        <ControlTemplate.Triggers>
            <DataTrigger Binding="{Binding IsBuyoutAboveCarPrice}" Value="True">
                <Setter TargetName="Arrow" Property="Visibility" Value="Visible"/>
                <Setter TargetName="BuyoutValue" Property="Color" Value="{StaticResource A_Color_AuctionHouse_HighPrice}"/>
            </DataTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <Style x:Key="A_Style_Control_Auction_HighestBidder"
           TargetType="Control">
        <Style.Resources>
            <Style x:Key="A_Style_ProgressBar_WaitSpinner_Dynamic"
                TargetType="{x:Type ProgressBar}"
                BasedOn="{StaticResource A_Style_ProgressBar_WaitSpinner}"/>
        </Style.Resources>
        <Setter Property="Template" Value="{DynamicResource A_Template_Control_Auction_HighestBidder}"/>
    </Style>

    <Style x:Key="A_Style_Control_Auction_HighestBidder_Dark"
           TargetType="Control">
        <Style.Resources>
            <Style x:Key="A_Style_ProgressBar_WaitSpinner_Dynamic"
                TargetType="{x:Type ProgressBar}"
                BasedOn="{StaticResource A_Style_ProgressBar_WaitSpinnerDark}"/>
        </Style.Resources>
        <Setter Property="Template" Value="{StaticResource A_Template_Control_Auction_HighestBidder}"/>
    </Style>

    <MappingConverter x:Key="A_Converter_AuctionState_to_SoldVisibility" Default="{x:Static Visibility.Collapsed}">
        <MappingConverterEntry Key="{x:Static AuctionState.Won}" Value="{x:Static Visibility.Visible}"/>
        <MappingConverterEntry Key="{x:Static AuctionState.DidntSell}" Value="{x:Static Visibility.Visible}"/>
        <MappingConverterEntry Key="{x:Static AuctionState.Sold}" Value="{x:Static Visibility.Visible}"/>
        <MappingConverterEntry Key="{x:Static AuctionState.Banned}" Value="{x:Static Visibility.Visible}"/>
        <MappingConverterEntry Key="{x:Static AuctionState.Lost}" Value="{x:Static Visibility.Visible}"/>
        <MappingConverterEntry Key="{x:Static AuctionState.Expired}" Value="{x:Static Visibility.Visible}"/>
        <MappingConverterEntry Key="{x:Static AuctionState.Bought}" Value="{x:Static Visibility.Visible}"/>
    </MappingConverter>
            
    <local:MultiConverter x:Key="A_Converter_AuctionState_to_SoldVisibility_Inverse">
        <local:MultiConverterEntry Converter="{StaticResource A_Converter_AuctionState_to_SoldVisibility}"/>
        <local:MultiConverterEntry Converter="{CompareConverter Value={x:Static Visibility.Visible}, Equal={x:Static Visibility.Collapsed}, NotEqual={x:Static Visibility.Visible}}"/>
    </local:MultiConverter>

    <ControlTemplate x:Key="A_Template_Control_Auction_StateBox" TargetType="Control">
        <ControlTemplate.Resources>
            <Style x:Key="A_Style_FZMaterial_Auction_Banner" TargetType="local:FZMaterial">
                <Setter Property="Preset" Value="{StaticResource A_FZMaterialPreset_FlatPanel_Base}" />
                <Style.Triggers>
                    <DataTrigger Binding="{Binding (BindingProxy.A), RelativeSource={RelativeSource AncestorType=Control}}" 
                                 Value="{x:Static local:AuctionState.None}">
                        <Setter Property="Visibility" Value="Hidden" />
                    </DataTrigger>
                    <DataTrigger Binding="{Binding (BindingProxy.A), RelativeSource={RelativeSource AncestorType=Control}}"
                                 Value="{x:Static local:AuctionState.NoBids}">
                        <Setter Property="Color"
                                Value="{StaticResource A_Color_AuctionHouse_BidNow_Light}" />
                    </DataTrigger>
                    <DataTrigger Binding="{Binding (BindingProxy.A), RelativeSource={RelativeSource AncestorType=Control}}"
                                 Value="{x:Static local:AuctionState.Expired}">
                        <Setter Property="Visibility"
                                Value="Hidden" />
                    </DataTrigger>
                    <DataTrigger Binding="{Binding (BindingProxy.A), RelativeSource={RelativeSource AncestorType=Control}}"
                                 Value="{x:Static local:AuctionState.WillSell}">
                        <Setter Property="Color"
                                Value="{StaticResource A_Color_AuctionHouse_Status_WillSell}" />
                    </DataTrigger>
                    <DataTrigger Binding="{Binding (BindingProxy.A), RelativeSource={RelativeSource AncestorType=Control}}"
                                 Value="{x:Static local:AuctionState.Winning}">
                        <Setter Property="Color"
                                Value="{StaticResource A_Color_AuctionHouse_Status_Winning}" />
                    </DataTrigger>
                    <DataTrigger Binding="{Binding (BindingProxy.A), RelativeSource={RelativeSource AncestorType=Control}}"
                                 Value="{x:Static local:AuctionState.Outbid}">
                        <Setter Property="Color"
                                Value="{StaticResource A_Color_AuctionHouse_Status_Outbid}" />
                    </DataTrigger>
                    <DataTrigger Binding="{Binding (BindingProxy.A), RelativeSource={RelativeSource AncestorType=Control}}"
                                 Value="{x:Static local:AuctionState.Lost}">
                        <Setter Property="Color"
                                Value="{StaticResource A_Color_AuctionHouse_Status_Lost}" />
                    </DataTrigger>
                    <DataTrigger Binding="{Binding (BindingProxy.A), RelativeSource={RelativeSource AncestorType=Control}}"
                                 Value="{x:Static local:AuctionState.DidntSell}">
                        <Setter Property="Color"
                                Value="{StaticResource A_Color_AuctionHouse_Status_DidntSell}" />
                    </DataTrigger>
                    <DataTrigger Binding="{Binding (BindingProxy.A), RelativeSource={RelativeSource AncestorType=Control}}"
                                 Value="{x:Static local:AuctionState.Sold}">
                        <Setter Property="Color"
                                Value="{StaticResource A_Color_AuctionHouse_Status_Sold}" />
                    </DataTrigger>
                    <DataTrigger Binding="{Binding (BindingProxy.A), RelativeSource={RelativeSource AncestorType=Control}}"
                                 Value="{x:Static local:AuctionState.Won}">
                        <Setter Property="Color"
                                Value="{StaticResource A_Color_AuctionHouse_Status_Won}" />
                    </DataTrigger>
                    <DataTrigger Binding="{Binding (BindingProxy.A), RelativeSource={RelativeSource AncestorType=Control}}"
                                 Value="{x:Static local:AuctionState.Bought}">
                        <Setter Property="Color"
                                Value="{StaticResource A_Color_AuctionHouse_Status_Won}" />
                    </DataTrigger>
                    <DataTrigger Binding="{Binding (BindingProxy.A), RelativeSource={RelativeSource AncestorType=Control}}"
                                 Value="{x:Static local:AuctionState.Banned}">
                        <Setter Property="Color"
                                Value="{StaticResource A_Color_AuctionHouse_Status_Banned}" />
                    </DataTrigger>
                </Style.Triggers>
            </Style>
            <Style x:Key="A_Style_FZTextBlock_Auction_Banner" TargetType="local:FZTextBlock"
                   BasedOn="{StaticResource A_Style_FrameworkElement_Auction_Banner_Content_Coloured}">
                <Setter Property="FontFamily" Value="Horizon_A" />
                <Setter Property="Color" Value="{Binding Path=(local:BindingProxy.C), RelativeSource={RelativeSource Self}}" />
                <Setter Property="Stretch" Value="None" />
                <Setter Property="CapHeight" Value="16" />
                <Setter Property="HorizontalAlignment" Value="Center" />
                <Setter Property="VerticalAlignment" Value="Center" />
                <Setter Property="Text" Value="{Binding (BindingProxy.A), Converter={StaticResource A_Converter_AuctionState_to_AuctionStateText}, RelativeSource={RelativeSource AncestorType=Control}}" />
                <Style.Triggers>
                    <DataTrigger Binding="{Binding (BindingProxy.A), RelativeSource={RelativeSource AncestorType=Control}}" Value="{x:Static local:AuctionState.Winning}">
                        <Setter Property="Color" Value="{StaticResource A_Color_AuctionHouse_Status_Text_Dark}"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding (BindingProxy.A), RelativeSource={RelativeSource AncestorType=Control}}" Value="{x:Static local:AuctionState.Won}">
                        <Setter Property="Color" Value="{StaticResource A_Color_AuctionHouse_Status_Text_Dark}"/>
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <Double x:Key="A_Double_AuctionState_Text_CapHeight">14</Double>
            <Thickness x:Key="A_Margin_AuctionState_Text">9,7</Thickness>
        </ControlTemplate.Resources>
        <Grid MinWidth="93"
              Height="auto"
              Visibility="{Binding (BindingProxy.A), Converter={StaticResource A_Converter_AuctionState}, RelativeSource={RelativeSource AncestorType=Control}}">
            <local:FZMaterial Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_InnerInnerAll}"
                              Color="{StaticResource H_Color_Primary_Black}"
                              VerticalAlignment="Top"
                              HorizontalAlignment="Stretch"
                              Height="auto"
                              MinWidth="93">
                <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_Auction_Banner}"
                                  Margin="2">
                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_Auction_Banner}"
                                       CapHeight="{DynamicResource A_Double_AuctionState_Text_CapHeight}"
                                       Margin="{DynamicResource A_Margin_AuctionState_Text}" />
                </local:FZMaterial>
            </local:FZMaterial>
        </Grid>
    </ControlTemplate>

    <ControlTemplate x:Key="A_Template_Control_Auction_FinalState" TargetType="Control">
        <ControlTemplate.Resources>
            <MappingConverter x:Key="A_Converter_AuctionState_to_SoldTextColor" Default="{StaticResource H_Color_Primary_White}">
                <MappingConverterEntry Key="{x:Static AuctionState.Won}" Value="{StaticResource H_Color_Primary_Black}"/>
                <MappingConverterEntry Key="{x:Static AuctionState.Lost}" Value="{StaticResource H_Color_Primary_Black}"/>
                <MappingConverterEntry Key="{x:Static AuctionState.Sold}" Value="{StaticResource H_Color_Primary_Black}"/>
                <MappingConverterEntry Key="{x:Static AuctionState.Bought}" Value="{StaticResource H_Color_Primary_Black}"/>
            </MappingConverter>

            <MappingConverter x:Key="A_Converter_AuctionState_to_SoldText" Default="">
                <MappingConverterEntry Key="{x:Static AuctionState.Won}" Value="{Loc AuctionHouse.IDS_Sold}"/>
                <MappingConverterEntry Key="{x:Static AuctionState.Sold}" Value="{Loc AuctionHouse.IDS_Sold}"/>
                <MappingConverterEntry Key="{x:Static AuctionState.DidntSell}" Value="{Loc AuctionHouse.IDS_NotSold}"/>
                <MappingConverterEntry Key="{x:Static AuctionState.Banned}" Value="{Loc AuctionHouse.IDS_State_Banned}"/>
                <MappingConverterEntry Key="{x:Static AuctionState.Lost}" Value="{Loc AuctionHouse.IDS_Sold}"/>
                <MappingConverterEntry Key="{x:Static AuctionState.Expired}" Value="{Loc AuctionHouse.IDS_NotSold}"/>
                <MappingConverterEntry Key="{x:Static AuctionState.Bought}" Value="{Loc AuctionHouse.IDS_Sold}"/>
            </MappingConverter>

            <local:MappingConverter x:Key="A_Converter_AuctionState_to_SoldBackgroundColor" Default="{StaticResource H_Color_Primary_Black}">
                <MappingConverterEntry Key="{x:Static AuctionState.Won}" Value="{StaticResource A_Color_AuctionHouse_Sold}"/>
                <MappingConverterEntry Key="{x:Static AuctionState.Sold}" Value="{StaticResource A_Color_AuctionHouse_Sold}"/>
                <MappingConverterEntry Key="{x:Static AuctionState.DidntSell}" Value="{StaticResource A_Color_AuctionHouse_NotSold}"/>
                <MappingConverterEntry Key="{x:Static AuctionState.Banned}" Value="{StaticResource A_Color_AuctionHouse_NotSold}"/>
                <MappingConverterEntry Key="{x:Static AuctionState.Lost}" Value="{StaticResource A_Color_AuctionHouse_Sold}"/>
                <MappingConverterEntry Key="{x:Static AuctionState.Expired}" Value="{StaticResource A_Color_AuctionHouse_NotSold}"/>
                <MappingConverterEntry Key="{x:Static AuctionState.Bought}" Value="{StaticResource A_Color_AuctionHouse_Sold}"/>
            </local:MappingConverter>

            <Style x:Key="A_Style_FZTextBlock_Auction_SoldState" TargetType="FZTextBlock">
                <Setter Property="Color" Value="{Binding (BindingProxy.A), Converter={StaticResource A_Converter_AuctionState_to_SoldTextColor}, RelativeSource={RelativeSource AncestorType=Control}}"/>
                <Setter Property="Margin" Value="0,7"/>
                <Setter Property="HorizontalAlignment" Value="Center"/>
                <Setter Property="VerticalAlignment" Value="Center"/>
                <Setter Property="ScreenReader.Event" Value="OnChange"/>
                <Setter Property="ScreenReader.LineType" Value="SelectedGroupState"/>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding Path=(Selector.IsSelected), RelativeSource={RelativeSource AncestorType=ListBoxItem}}" Value="True">
                        <Setter Property="ScreenReader.Line" Value="{Binding Text, RelativeSource={RelativeSource Self}}"/>
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <Double x:Key="A_Double_AuctionState_Text_CapHeight">18</Double>
            <Thickness x:Key="A_Margin_AuctionState_Text">10,0</Thickness>
        </ControlTemplate.Resources>
        <FZMaterial MinWidth="120"
                    Height="auto"
                    Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterAll3px}"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    Color="{StaticResource H_Color_Primary_Black}"
                    Visibility="{Binding (BindingProxy.A), Converter={StaticResource A_Converter_AuctionState_to_SoldVisibility}, RelativeSource={RelativeSource AncestorType=Control}}"
                    Margin="0,0,0,36">
        <FZMaterial.LayoutTransform>
            <RotateTransform Angle="-14"/>
        </FZMaterial.LayoutTransform>
            <FZMaterial Margin="2"
                        Color="{Binding (BindingProxy.A), Converter={StaticResource A_Converter_AuctionState_to_SoldBackgroundColor}, RelativeSource={RelativeSource AncestorType=Control}}"
                        Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterAll3px}" >
                <Grid Margin="{DynamicResource A_Margin_AuctionState_Text}"
                      ClipToBounds="True">
                    <FZTextBlock Style="{StaticResource A_Style_FZTextBlock_Auction_SoldState}"
                                 CapHeight="{DynamicResource A_Double_AuctionState_Text_CapHeight}"
                                 Text="{Binding (BindingProxy.A), Converter={StaticResource A_Converter_AuctionState_to_SoldText}, RelativeSource={RelativeSource AncestorType=Control}}"/>
                </Grid>
            </FZMaterial>
        </FZMaterial>
        <ControlTemplate.Triggers>
            
        </ControlTemplate.Triggers>        
    </ControlTemplate>

    <Style x:Key="A_Style_FZTextBlock_ClubAndGamertag"
           TargetType="local:FZTextBlock">
        <Setter Property="Stretch"
                Value="Uniform" />
        <Setter Property="FontSize"
                Value="22" />
        <Setter Property="StretchDirection"
                Value="Both" />
        <Setter Property="FontFamily"
                Value="Horizon_A" />
        <Setter Property="Color"
                Value="{StaticResource A_Color_SubHeader_Text}" />
    </Style>

    <ControlTemplate TargetType="Control"
                     x:Key="A_Template_ClubAndGamertag">
        <Viewbox>
            <StackPanel Orientation="Horizontal">
                <StackPanel Orientation="Horizontal"
                            x:Name="TagBlock">
                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_ClubAndGamertag}"
                                       Text="{Binding FormattedClubTag}" />
                    <Decorator Width="4" />
                </StackPanel>
                <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_ClubAndGamertag}"
                                   Text="{Binding FormattedGamertag}" />
            </StackPanel>
        </Viewbox>
        <ControlTemplate.Triggers>
            <DataTrigger Binding="{Binding FormattedClubTag}"
                         Value="{x:Null}">
                <Setter Property="Visibility"
                        TargetName="TagBlock"
                        Value="Collapsed" />
            </DataTrigger>
            <DataTrigger Binding="{Binding FormattedClubTag}"
                         Value="">
                <Setter Property="Visibility"
                        TargetName="TagBlock"
                        Value="Collapsed" />
            </DataTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <ControlTemplate x:Key="A_ControlTemplate_RankLevel_Pill_AuctionHouse">
        <ControlTemplate.Resources>
            <local:FZMaterialPresetRoundtangleStroke x:Key="A_FZMaterialPresetRoundtangleStroke_AuctionHouse_RankPillEmpty"
                                                     BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
                                                     CornerRadius="{StaticResource A_CornerRadius_Inner_All}"
                                                     Thickness="2" />
        </ControlTemplate.Resources>
        <Grid>
            <local:FZMaterial x:Name="RankPillEmpty"
                              Preset="{StaticResource A_FZMaterialPresetRoundtangleStroke_AuctionHouse_RankPillEmpty}"
                              Color="{StaticResource A_Color_AuctionHouse_BidNow_Light}"
                              Height="30" 
                              Width="101"
                              Visibility="Collapsed"
                              Opacity="0.4"/>

            <local:FZMaterial x:Name="RankPill"
                              Style="{StaticResource A_Style_FZMaterial_RankContainer_Background}"
                              Color="{StaticResource H_Color_Primary_Black}"
                              Height="30"
                              MinWidth="101"
                              MaxWidth="130">
                <Grid VerticalAlignment="Center" HorizontalAlignment="Center">
                    <local:FZMaterial ImageSource="{Binding ThreadType, Converter={StaticResource A_Converter_ThreadTypeToIcon}}"
                                      HorizontalAlignment="Left"
                                      GreedyMeasure="True"
                                      Stretch="Uniform"
                                      Margin="-1,0,0,0"/>
                    <StackPanel Orientation="Horizontal" 
                                Margin="30,4,4,4">
                        <local:FZTextBlock x:Name="RankText" 
                                           Text="{local:Loc Storefront.IDS_Rank}"
                                           Style="{StaticResource A_Style_UGC_Text_Style}"
                                           CapHeight="19"
                                           FontFamily="Horizon_B"
                                           VerticalAlignment="Center"/>
                        <local:FZTextBlock x:Name="RankTextValue" 
                                           Text="{Binding ThreadValue}"
                                           Style="{StaticResource A_Style_UGC_Text_Style}"
                                           CapHeight="19"
                                           FontFamily="Horizon_B"
                                           Margin="5,0,0,0"
                                           VerticalAlignment="Center"/>
                    </StackPanel>
                </Grid>
            </local:FZMaterial>
        </Grid>
        <ControlTemplate.Triggers>
            <DataTrigger Binding="{Binding Path=(local:BindingProxy.A), RelativeSource={RelativeSource FindAncestor, AncestorType=Control}}" Value="{x:Null}">
                <Setter TargetName="RankPill" 
                        Property="Visibility" 
                        Value="Collapsed"/>
                <Setter TargetName="RankPillEmpty" 
                        Property="Visibility" 
                        Value="Visible"/>
            </DataTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>


    <Style x:Key="A_Style_FZMaterial_Auction_Collaborator"
           TargetType="local:FZMaterial">
        <Setter Property="ImageSource"
                Value="{Binding Path=(local:BindingProxy.A), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource A_GamerPicConverter}, ConverterParameter={StaticResource A_Size_Auction_GamerPicSizeParams}}" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding Path=(local:BindingProxy.A), RelativeSource={RelativeSource TemplatedParent}}"
                         Value="{x:Null}">
                <Setter Property="ImageSource"
                        Value="/ForzaUI;component/Textures/Anthem/NoGamerpic.png" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <!-- Text = UGC player level -->
    <!-- local:BindingProxy.A = UserProfile -->
    <!-- local:BindingProxy.B = UGC Type -->
    <!-- local:BindingProxy.C = Title Text -->
    <!-- Tag = Contributors text -->
    <ControlTemplate TargetType="Control"
                     x:Key="A_Template_Control_Auction_Collaborator">
        <StackPanel Orientation="Horizontal">
            <Grid Width="84">
                <local:FZMaterial x:Name="CollaboratorGamerPicMaterial"
                                  Style="{StaticResource A_Style_FZMaterial_Auction_Collaborator}"
                                  Height="84"
                                  Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_InnerInnerAll}"
                                  Stretch="Uniform"
                                  Tag="{Binding Path=(local:BindingProxy.A), RelativeSource={RelativeSource TemplatedParent}}"
                                  Visibility="{Binding Downloaded, RelativeSource={RelativeSource Self}, Converter={StaticResource A_FZBooleanToVisibilityConverter_UseHidden}}" />
                <ProgressBar Style="{DynamicResource A_Style_ProgressBar_WaitSpinner_Dynamic}"
                             HorizontalAlignment="Center"
                             VerticalAlignment="Center"
                             Visibility="{Binding Downloaded, ElementName=CollaboratorGamerPicMaterial, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}"/>
            </Grid>
            <Decorator Width="9" />
            <Grid>
                <StackPanel Orientation="Horizontal"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="Top"
                            Margin="0,8,0,0">
                    <local:FZTextBlock Height="21"
                                       Stretch="Uniform"
                                       StretchDirection="Both"
                                       TextAlignment="Left"
                                       VerticalAlignment="Center"
                                       FontFamily="Horizon_B"
                                       Color="{StaticResource H_Color_Primary_Grey_80pc}"
                                       Text="{Binding Path=(local:BindingProxy.C), RelativeSource={RelativeSource TemplatedParent}}"                                   
                                       x:Name="Text" />
                    <Decorator Width="15" />

                    <Control Template="{StaticResource A_ControlTemplate_RankLevel_Pill_AuctionHouse}"
                             DataContext="{Binding Path=(local:BindingProxy.A), RelativeSource={RelativeSource FindAncestor, AncestorType=Control}}"
                             Tag="{Binding Path=(local:BindingProxy.B), RelativeSource={RelativeSource FindAncestor, AncestorType=Control}}"
                             HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
                </StackPanel>

                <StackPanel Orientation="Vertical"
                            VerticalAlignment="Bottom"
                            Margin="0,0,0,9">
                    <Control Template="{StaticResource A_Template_ClubAndGamertag}"
                            DataContext="{Binding Path=(local:BindingProxy.A), RelativeSource={RelativeSource TemplatedParent}}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            Height="20"
                            x:Name="Gamertag" />
                    <Viewbox x:Name="Stock"
                            Visibility="Collapsed"
                            Height="20"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
                        <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_ClubAndGamertag}"
                                        Stretch="None"
                                        Text="{local:Loc AuctionHouse.IDS_Stock}"
                                        TextAlignment="{TemplateBinding HorizontalContentAlignment}" />
                    </Viewbox>
                    <Viewbox x:Name="Contributors"
                            Visibility="{Binding Tag, Converter={StaticResource A_StringVisConverter}, RelativeSource={RelativeSource TemplatedParent}}"
                            Height="20"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            Margin="0,15,0,0">
                        <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_ClubAndGamertag}"
                                        Stretch="None"
                                        Text="{Binding Tag, RelativeSource={RelativeSource TemplatedParent}}"
                                        TextAlignment="{TemplateBinding HorizontalContentAlignment}" />
                    </Viewbox>
                </StackPanel>
            </Grid>
        </StackPanel>
        <ControlTemplate.Triggers>
            <!-- No collaborator -->
            <DataTrigger Binding="{Binding Path=(local:BindingProxy.A), RelativeSource={RelativeSource Self}}"
                         Value="{x:Null}">
                <Setter Property="Visibility"
                        TargetName="Stock"
                        Value="{x:Static Visibility.Visible}" />
                <Setter Property="Visibility"
                        TargetName="Gamertag"
                        Value="{x:Static Visibility.Collapsed}" />
            </DataTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <DataTemplate x:Key="A_DataTemplate_TextMenu_AuctionDetails">
        <Grid IsHitTestVisible="False"
              Margin="10,16">
            <local:FZTextBlock x:Name="MainText"
                               Text="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}}"
                               Style="{StaticResource A_Style_FZTextBlock_OptionText}"
                               Margin="0"
                               local:MultiStringFormatter.Format="{StaticResource A_String_012FormatString}"
                               local:MultiStringFormatter.Param0="{Binding Text}"
                               local:MultiStringFormatter.Param1="{local:Loc AuctionHouse.IDS_Separator_Unformatted}"
                               local:MultiStringFormatter.Param2="{Binding Subtext}"
                               HorizontalAlignment="Center"
                               MarkupConverter="{StaticResource A_MappingConverter_TextMenu}"/>
        </Grid>
        <DataTemplate.Triggers>
            <DataTrigger Binding="{Binding Subtext}" Value="{x:Null}">
                <Setter TargetName="MainText" Property="Text" Value="{Binding Text}" />
            </DataTrigger>
        </DataTemplate.Triggers>
    </DataTemplate>

    <Style x:Key="A_Style_FZRun_AuctionHouse_BOLD" TargetType="{x:Type local:FZRun}">
        <Setter Property="FontFamily" Value="Horizon_A"/>
    </Style>
    
    <MappingConverter x:Key="A_MappingConverter_AuctionHouse" >
        <MappingConverterEntry Key="{NoCase BOLD}" Value="{StaticResource A_Style_FZRun_AuctionHouse_BOLD}" />
    </MappingConverter>

    <Style x:Key="A_Style_FZTextBlock_ActionHouse_PillText"
           BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}"
           TargetType="{x:Type local:FZTextBlock}">
        <Setter Property="Color"
                Value="{Binding Rarity, Converter={StaticResource A_Converter_CarRarityToTextColor}}" />
        <Setter Property="HorizontalAlignment"
                Value="Center" />
        <Setter Property="VerticalAlignment"
                Value="Center" />
        <Setter Property="CapHeight"
                Value="14" />
        <Setter Property="Margin"
                Value="6" />
    </Style>

    <Style x:Key="A_Style_Control_AuctionHouseItemPill"
           TargetType="{x:Type Control}">
        <Style.Resources>
            <Visibility x:Key="A_Visibility_HEBonus_Dynamic">Collapsed</Visibility>
        </Style.Resources>
        <Setter Property="Height"
                Value="34" />
        <Setter Property="MinWidth"
                Value="126" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <local:FZMaterial Style="{DynamicResource A_Style_FZMaterial_PillBG_Dynamic}">
                        <Viewbox>
                            <StackPanel Orientation="Horizontal">
                                <local:FZTextBlock Text="{Binding Tag, RelativeSource={RelativeSource TemplatedParent}}"
                                                   Style="{StaticResource A_Style_FZTextBlock_ActionHouse_PillText}" />
                                <StackPanel Orientation="Horizontal"
                                    Visibility="{DynamicResource A_Visibility_HEBonus_Dynamic}">
                                    <local:FZMaterial Color="#66FFFFFF"
                                        Width="2"
                                        Margin="0,1"
                                        Visibility="{Binding HorizonEditionBonus, Converter={StaticResource A_StringVisConverter}}"/>
                                    <local:FZTextBlock Text="{Binding HorizonEditionBonus}"
                                                       MarkupConverter="{StaticResource A_MappingConverter_AuctionHouse}"
                                                       Style="{StaticResource A_Style_FZTextBlock_ActionHouse_PillText}"
                                                       FontFamily="Horizon_B"
                                                       Visibility="{Binding HorizonEditionBonus, Converter={StaticResource A_StringVisConverter}}" />
                                </StackPanel>
                            </StackPanel>
                        </Viewbox>
                    </local:FZMaterial>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="A_Style_Control_AuctionHouse_RarityPill"
           BasedOn="{StaticResource A_Style_Control_AuctionHouseItemPill}"
           TargetType="{x:Type Control}">
        <Style.Resources>
            <local:MappingConverter x:Key="A_Converter_RarityToPreset" Default="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_InnerInnerAll}">
                <local:MappingConverterEntry Key="{x:Static local:XAMLRarity.HorizonEdition}" Value="{StaticResource A_FZMaterialPresetRoundtangle_GradientHorizonEdition_InnerInnerAll}" />
            </local:MappingConverter>
            <Style x:Key="A_Style_FZMaterial_PillBG_Dynamic"
                   TargetType="{x:Type local:FZMaterial}">
                <Setter Property="Preset"
                        Value="{Binding Rarity, Converter={StaticResource A_Converter_RarityToPreset}}" />
                <Setter Property="Color"
                        Value="{Binding Rarity, Converter={StaticResource A_Converter_RarityToColor}}" />
            </Style>
        </Style.Resources>
        <Setter Property="Tag"
                Value="{Binding Rarity, Converter={StaticResource A_Converter_RarityToNameString}}" />
    </Style>

    <Style x:Key="A_Style_Control_AuctionHouse_RarityPillWithHEBonus"
           BasedOn="{StaticResource A_Style_Control_AuctionHouse_RarityPill}"
           TargetType="{x:Type Control}">
        <Style.Resources>
            <Visibility x:Key="A_Visibility_HEBonus_Dynamic">Visible</Visibility>
        </Style.Resources>
    </Style>


    <Style x:Key="A_Style_Control_AuctionHouse_BarnFindPill"
           BasedOn="{StaticResource A_Style_Control_AuctionHouseItemPill}"
           TargetType="{x:Type Control}">
        <Style.Resources>
            <Style x:Key="A_Style_FZMaterial_PillBG_Dynamic"
                   TargetType="{x:Type local:FZMaterial}">
                <Setter Property="Preset"
                        Value="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_InnerInnerAll}" />
                <Setter Property="Color"
                        Value="{StaticResource A_Color_AuctionHouse_CarInGarageBackground}" />
            </Style>
        </Style.Resources>
        <Setter Property="Tag"
                Value="{local:Loc AuctionHouse.IDS_BarnFind}" />
        <Setter Property="Visibility"
                Value="Collapsed" />
        <Style.Triggers>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding IsBarnFind}"
                               Value="True" />
                </MultiDataTrigger.Conditions>
                <Setter Property="Visibility"
                        Value="Visible" />
            </MultiDataTrigger>
        </Style.Triggers>
    </Style>

    <local:MappingConverter x:Key="A_Converter_AuctionState"
                            Default="{x:Static Visibility.Visible}">
        <local:MappingConverterEntry Key="{x:Static local:AuctionState.Expired}"
                                     Value="{x:Static Visibility.Hidden}" />
        <local:MappingConverterEntry Key="{x:Static local:AuctionState.DidntSell}"
                                     Value="{x:Static Visibility.Hidden}" />
        <local:MappingConverterEntry Key="{x:Static local:AuctionState.None}"
                                     Value="{x:Static Visibility.Hidden}" />
        <local:MappingConverterEntry Key="{x:Static local:AuctionState.Bought}"
                                     Value="{x:Static Visibility.Hidden}" />
        <local:MappingConverterEntry Key="{x:Static local:AuctionState.Banned}"
                                     Value="{x:Static Visibility.Hidden}" />
    </local:MappingConverter>

</ResourceDictionary>