<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:System="clr-namespace:System;assembly=mscorlib"
                    xmlns:local="clr-namespace:ForzaUI;assembly="
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <local:LinearTransformConverter Scale="1.777777777777777"
                                    x:Key="A_Converter_CarThumb_Ratio" />
    <System:Double x:Key="A_Double_CarSelect_CentreContentHeight">494</System:Double>
    <GridLength x:Key="A_GridLength_CarSelect_CentreContentGaps">10</GridLength>
    <System:Double x:Key="A_Double_CarSelect_LargeImageWidth">1008</System:Double>

    <local:MappingConverter x:Key="A_Converter_BarnFindStateIsDiscoveredOrLater"
                            Default="{StaticResource A_Boolean_False}">
        <local:MappingConverterEntry Key="{x:Static local:BarnFindStateEnum.Discovered}" Value="{StaticResource A_Boolean_True}" />
        <local:MappingConverterEntry Key="{x:Static local:BarnFindStateEnum.Restored}" Value="{StaticResource A_Boolean_True}" />
        <local:MappingConverterEntry Key="{x:Static local:BarnFindStateEnum.Collected}" Value="{StaticResource A_Boolean_True}" />
    </local:MappingConverter>

    <local:MappingConverter x:Key="A_Converter_BarnFindStateIsRestoredOrLater"
                            Default="{StaticResource A_Boolean_False}">
        <local:MappingConverterEntry Key="{x:Static local:BarnFindStateEnum.Restored}" Value="{StaticResource A_Boolean_True}" />
        <local:MappingConverterEntry Key="{x:Static local:BarnFindStateEnum.Collected}" Value="{StaticResource A_Boolean_True}" />
    </local:MappingConverter>

    <local:MappingConverter x:Key="A_Converter_BarnFindStateIsDiscoveredNotAvailable"
                            Default="{StaticResource A_Boolean_False}">
        <local:MappingConverterEntry Key="{x:Static local:BarnFindStateEnum.DiscoveredNotAvailable}" Value="{StaticResource A_Boolean_True}" />
    </local:MappingConverter>

    <Style TargetType="{x:Type Grid}"
           x:Key="A_Style_Grid_CarSelect_DescriptionBlock">
        <Setter Property="Height"
                Value="{StaticResource A_Double_CarSelect_CentreContentHeight}" />
    </Style>
    <Style TargetType="{x:Type Grid}"
           x:Key="A_Style_Grid_CarSelect_LargeImageBlock">
        <Setter Property="Height"
                Value="{StaticResource A_Double_CarSelect_CentreContentHeight}" />
    </Style>
    <Style BasedOn="{StaticResource A_Style_FZTextBlock_Heading}"
           TargetType="local:FZTextBlock"
           x:Key="A_Style_TextBlock_CarSelect_Heading">
        <Setter Property="Color"
                Value="{StaticResource A_Color_Header_Text}" />
        <Setter Property="Stretch"
                Value="Uniform" />
        <Setter Property="StretchDirection"
                Value="DownOnly" />
    </Style>
    <Style BasedOn="{StaticResource A_Style_FZTextBlock_Heading_Huge}"
           TargetType="local:FZTextBlock"
           x:Key="A_Style_TextBlock_CarSelect_Heading_Huge">
        <Setter Property="Color"
                Value="{StaticResource A_Color_Header_Text}" />
        <Setter Property="Stretch"
                Value="Uniform" />
        <Setter Property="StretchDirection"
                Value="DownOnly" />
    </Style>
    
    <Style BasedOn="{StaticResource A_Style_TextBlock_CarSelect_Heading}"
           TargetType="local:FZTextBlock"
           x:Key="A_Style_TextBlock_CarSelect_Cost">
        <Setter Property="FontSize"
                Value="34" />
        <Setter Property="HorizontalAlignment"
                Value="Right" />
        <Setter Property="VerticalAlignment"
                Value="Center" />
        <Setter Property="Margin"
                Value="0,18,0,18" />
        <Setter Property="Color"
                Value="{StaticResource A_Color_Tile_Title_Alternate}" />
    </Style>

    <Style BasedOn="{StaticResource A_Style_TextBlock_CarSelect_Cost}"
           TargetType="local:FZTextBlock"
           x:Key="A_Style_TextBlock_CarSelect_CostOrFree">
        <Setter Property="Text"
                Value="{Binding Tag, RelativeSource={RelativeSource Self}}"/>
        <Style.Triggers>
            <Trigger Property="Tag" Value="0">
                <Setter Property="Text" Value="{local:Loc InGameMarketplace.IDS_Free}"/>
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style BasedOn="{StaticResource A_Style_TextBlock_CarSelect_Cost}"
           TargetType="local:FZTextBlock"
           x:Key="A_Style_TextBlock_CarSelect_CapturedNotCaptured">
        <Setter Property="Text"
                Value="{Binding Source={local:Loc CarFlow.IDS_CarFilter_PhotoNotCaptured}, Converter={StaticResource A_StringToUpper}}" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding IsPhotoCaptured}" Value="1">
                <Setter Property="Text"
                        Value="{Binding Source={local:Loc CarFlow.IDS_CarFilter_PhotoCaptured}, Converter={StaticResource A_StringToUpper}}" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Style BasedOn="{StaticResource A_Style_TextBlock_CarSelect_Heading}"
           TargetType="local:FZTextBlock"
           x:Key="A_Style_TextBlock_CarSelect_OnSale">
        <Setter Property="FontSize"
                Value="32" />
        <Setter Property="Margin"
                Value="0" />
        <Setter Property="Color"
                Value="{StaticResource A_Color_Tile_Title_Alternate}" />
    </Style>
   
    <DataTemplate x:Key="A_DataTemplate_CarSelect_SalePrice">
        <local:FZMaterial x:Name="Credits_Sale" Color="{StaticResource A_Color_TileSelected_Background}" Margin="15,0,0,0" Height="80">
            <StackPanel Orientation="Vertical" Margin="8,0" VerticalAlignment="Center">
                <local:FZTextBlock Style="{StaticResource A_Style_TextBlock_CarSelect_OnSale}" Text="{local:Loc InGameMarketplace.IDS_OnSale}" Margin="0,0,0,12" />
                <Grid HorizontalAlignment="Left">
                    <local:FZTextBlock Style="{StaticResource A_Style_TextBlock_CarSelect_OnSale}"
                                       Text="{TemplateBinding Content}"
                                       Margin="6,0" />
                    <local:FZMaterial Height="3" />
                </Grid>
            </StackPanel>
        </local:FZMaterial>
    </DataTemplate>
    
    <Style BasedOn="{StaticResource A_Style_FZTextBlock_SubHeading}"
           TargetType="local:FZTextBlock"
           x:Key="A_Style_TextBlock_CarSelect_Manufacturer">
        <Setter Property="Color"
                Value="{StaticResource A_Color_CarSelect_ItemTitle}" />
        <Setter Property="FontSize"
                Value="24" />
        <Setter Property="FontFamily"
                Value="Horizon_B" />
    </Style>
    <Style BasedOn="{StaticResource A_Style_FZTextBlock_Heading}"
           TargetType="local:FZTextBlock"
           x:Key="A_Style_TextBlock_CarSelect_Car">
        <Setter Property="Color"
                Value="{StaticResource A_Color_CarSelect_ItemTitle}" />
        <Setter Property="Margin"
                Value="0,-6,0,0" />
        <Setter Property="FontSize"
                Value="34" />
        <Setter Property="FontFamily"
                Value="Horizon_A" />
    </Style>

    <Style BasedOn="{StaticResource A_Style_FZTextBlock_Heading}"
           TargetType="local:FZTextBlock"
           x:Key="A_Style_TextBlock_CarSelect_Year">
        <Setter Property="Color"
                Value="{StaticResource A_Color_CarSelect_ItemTitle}" />
        <Setter Property="Margin"
                Value="0,-6,0,0" />
        <Setter Property="FontSize"
                Value="24" />
        <Setter Property="FontFamily"
                Value="Horizon_B" />
        <Setter Property="Visibility"
                Value="Visible" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding BarnFindState, Converter={StaticResource A_Converter_BarnFindStateIsDiscoveredOrLater}}"
                         Value="{StaticResource A_Boolean_False}">
               <Setter Property="Visibility"
                        Value="Collapsed" />
            </DataTrigger>
        </Style.Triggers>
    </Style>
    <Style BasedOn="{StaticResource A_Style_TextBlock_CarSelect_Heading}"
           TargetType="local:FZTextBlock"
           x:Key="A_Style_TextBlock_CarSelect_CarBucket">
        <Setter Property="Color"
                Value="{StaticResource A_Color_CarSelectHeading}" />
        <Setter Property="FontSize" Value="30" />
    </Style>

    <Style TargetType="local:FZMaterial"
           x:Key="A_Style_FZMaterial_CarSelectCarouselItem_StatusIcon">
        <Setter Property="Width"
                Value="22" />
        <Setter Property="Height"
                Value="22" />
        <Setter Property="Color"
                Value="{StaticResource A_Color_CarouselIcon}" />
        <Setter Property="Margin"
                Value="3,0" />
    </Style>

    <Style TargetType="local:FZTextBlock"
           x:Key="A_Style_FZTextBlock_CarSelectCarouseItem_StatusText"
           BasedOn="{StaticResource A_Style_FZTextBlock_Heading_Small}">
        <Setter Property="FontSize"
                Value="22" />
        <Setter Property="Color"
                Value="{StaticResource A_Color_Header_Text}" />
        <Setter Property="Margin"
                Value="8,0" />
        <Setter Property="VerticalAlignment"
                Value="Center" />
        <Setter Property="HorizontalAlignment"
                Value="Center" />
        <Setter Property="Stretch"
                Value="None" />
    </Style>

    <Style x:Key="A_Style_FZTextBlock_BarnfindReady"
           BasedOn="{StaticResource A_Style_FZTextBlock_CarSelectCarouseItem_StatusText}"
           TargetType="local:FZTextBlock">
        <Setter Property="Visibility"
                Value="Collapsed" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding BarnFindState}"
                         Value="{x:Static local:BarnFindStateEnum.Restored}" >
                <Setter Property="Visibility"
                        Value="Visible" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Style TargetType="local:FZMaterial"
           x:Key="A_Style_FZMaterial_CarSelectCarouselItem_StatusIconBackground">
        <Setter Property="MinWidth"
                Value="32" />
        <Setter Property="Height"
                Value="32" />
        <Setter Property="Color"
                Value="{StaticResource A_Color_ItemStatusBackground}" />
        <Setter Property="Preset"
                Value="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_InnerAll}" />
    </Style>

    <Style TargetType="local:FZMaterial"
           x:Key="A_Style_FZMaterial_CarSelectCarouselItem_StatusIcon_BarnFindInProgress"
           BasedOn="{StaticResource A_Style_FZMaterial_CarSelectCarouselItem_StatusIcon}">
        <Setter Property="Visibility"
                Value="Collapsed" />
        <Style.Triggers>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding BarnFindState, Converter={StaticResource A_Converter_BarnFindStateIsRestoredOrLater}}"
                               Value="{StaticResource A_Boolean_False}" />
                    <Condition Binding="{Binding BarnFindState, Converter={StaticResource A_Converter_BarnFindStateIsDiscoveredOrLater}}"
                               Value="{StaticResource A_Boolean_True}" />
                </MultiDataTrigger.Conditions>
                <Setter Property="Visibility"
                        Value="Visible" />
            </MultiDataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="A_Style_FrameworkElement_NewBlammoContainer"
           TargetType="FrameworkElement">
        <Setter Property="Visibility"
                Value="Collapsed" />
        <Style.Triggers>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding BlammoType}"
                               Value="{x:Null}" />
                    <Condition Binding="{Binding ShowPhotoInfo, RelativeSource={RelativeSource AncestorType=Page}, FallbackValue=False}"
                               Value="False" />
                </MultiDataTrigger.Conditions>
                <Setter Property="Visibility"
                        Value="Visible" />
            </MultiDataTrigger>
        </Style.Triggers>
    </Style>

    <Style TargetType="local:FZMaterial"
           x:Key="A_Style_FZMaterial_CarSelectCarouselItem_ItemTitleBackground">
        <Setter Property="Color"
                Value="#AAE6E6E6" />
    </Style>

    <Style TargetType="local:FZTextBlock"
           x:Key="A_Style_FZTextBlock_CarSelectCarousel_MainTitle"
           BasedOn="{StaticResource A_Style_TextBlock_CarSelect_Car}">
        <Setter Property="Margin"
                Value="0" />
        <Setter Property="TextTrimming"
                Value="CharacterEllipsis" />
        <Setter Property="Text"
                Value="{Binding DisplayName, Converter={StaticResource A_StringToUpper}}" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding IsFakeCarRecord}"
                         Value="True">
                <Setter Property="Text"
                        Value="{Binding Name, Converter={StaticResource A_StringToUpper}}" />
            </DataTrigger>
            <DataTrigger Binding="{Binding BarnFindState, Converter={StaticResource A_Converter_BarnFindStateIsDiscoveredOrLater}}"
                         Value="{StaticResource A_Boolean_False}">
               <Setter Property="Text"
                        Value="{local:Loc BarnFind.IDS_CarState_Locked}" />
            </DataTrigger>
            <DataTrigger Binding="{Binding BarnFindState, Converter={StaticResource A_Converter_BarnFindStateIsDiscoveredNotAvailable}}"
                         Value="{StaticResource A_Boolean_True}">
               <Setter Property="Text"
                        Value="{local:Loc BarnFind.IDS_CarState_DiscoveredNotAvailable}" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Style TargetType="local:FZTextBlock"
           x:Key="A_Style_FZTextBlock_CarSelectCarousel_Manufacturer"
           BasedOn="{StaticResource A_Style_TextBlock_CarSelect_Manufacturer}">
        <Setter Property="Text"
                Value="{Binding MakeName, Converter={StaticResource A_StringToUpper}}" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding BarnFindState, Converter={StaticResource A_Converter_BarnFindStateIsDiscoveredOrLater}}"
                         Value="{StaticResource A_Boolean_False}">
               <Setter Property="Text"
                        Value="{local:Loc BarnFind.IDS_Unknown}" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Color x:Key="A_Color_BarnFindCar_Silhouette">#FF212121</Color>
    <local:FZMaterialPreset x:Key="A_FZMaterialPreset_BarnFindCar_Default" />

    <local:MappingConverter x:Key="A_Converter_BarnFindThumbnailVisibilityFromState"
                            Default="Visible">
        <local:MappingConverterEntry Key="{x:Static local:BarnFindStateEnum.Hidden}" Value="Hidden" />
        <local:MappingConverterEntry Key="{x:Static local:BarnFindStateEnum.Spawned}" Value="Hidden" />
        <local:MappingConverterEntry Key="{x:Static local:BarnFindStateEnum.DiscoveredByDrone}" Value="Hidden" />
        <local:MappingConverterEntry Key="{x:Static local:BarnFindStateEnum.DiscoveredNotAvailable}" Value="Hidden" />
    </local:MappingConverter>
    <local:MappingConverter x:Key="A_Converter_BarnFindThumbnailColorFromState"
                            Default="#FFFFFF">
        <local:MappingConverterEntry Key="{x:Static local:BarnFindStateEnum.Discovered}" Value="{StaticResource A_Color_BarnFindCar_Silhouette}" />
        <local:MappingConverterEntry Key="{x:Static local:BarnFindStateEnum.DiscoveredByDrone}" Value="{StaticResource A_Color_BarnFindCar_Silhouette}" />
        <local:MappingConverterEntry Key="{x:Static local:BarnFindStateEnum.Restored}" Value="{StaticResource A_Color_BarnFindCar_Silhouette}" />
    </local:MappingConverter>

    <local:MappingConverter x:Key="A_Converter_BarnFindOverlayIconVisibilityFromState"
                            Default="Visible">
        <local:MappingConverterEntry Key="{x:Static local:BarnFindStateEnum.Discovered}" Value="Hidden" />
        <local:MappingConverterEntry Key="{x:Static local:BarnFindStateEnum.Restored}" Value="Hidden" />
        <local:MappingConverterEntry Key="{x:Static local:BarnFindStateEnum.Collected}" Value="Hidden" />
    </local:MappingConverter>

    <local:MappingConverter x:Key="A_Converter_BarnFindThumnailPresetFromState"
                            Default="{StaticResource A_FZMaterialPreset_AlphaOnly}">
        <local:MappingConverterEntry Key="{x:Static local:BarnFindStateEnum.Collected}" Value="{StaticResource A_FZMaterialPreset_BarnFindCar_Default}" />
    </local:MappingConverter>

    <local:MappingConverter x:Key="A_Converter_BarnFindAllowCustomOverlayIconBooleanFromState"
                            Default="{StaticResource A_Boolean_False}">
        <local:MappingConverterEntry Key="{x:Static local:BarnFindStateEnum.DiscoveredNotAvailable}" Value="{StaticResource A_Boolean_True}" />
    </local:MappingConverter>

    <System:String x:Key="A_String_BarnFindOverlayIcon_Default">/ForzaUI;component/Textures/Data_Bound/UI_Symbols/BarnFind_Big.png</System:String>
    <System:String x:Key="A_String_BarnFindOverlayIcon_3253">/ForzaUI;component/Textures/Data_Bound/PDLC2/BarnFind/BarnFind_Big_3253.png</System:String>
    <local:MappingConverter x:Key="A_Converter_BarnFindOverlayIconImageSourceFromOrdinal"
                            Default="{StaticResource A_String_BarnFindOverlayIcon_Default}">
        <local:MappingConverterEntry Key="3253" Value="{StaticResource A_String_BarnFindOverlayIcon_3253}"/>
    </local:MappingConverter>

    <Style x:Key="A_Style_FZMaterial_BarnFindOverlayIcon"
        TargetType="{x:Type local:FZMaterial}">
        <Setter Property="Color" Value="{StaticResource A_Color_BarnFindCar_Silhouette}" />
        <Setter Property="ImageSourceNoPreload" Value="{StaticResource A_String_BarnFindOverlayIcon_Default}" />
        <Setter Property="Preset" Value="{StaticResource A_FZMaterialPreset_AlphaOnly}" />
        <Setter Property="Margin" Value="0,20,0,0" />
        <Setter Property="Stretch" Value="Uniform" />
        <Setter Property="Visibility" Value="{Binding BarnFindState, Converter={StaticResource A_Converter_BarnFindOverlayIconVisibilityFromState}}" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding BarnFindState, Converter={StaticResource A_Converter_BarnFindAllowCustomOverlayIconBooleanFromState}}" Value="{StaticResource A_Boolean_True}">
                <Setter Property="ImageSourceNoPreload" Value="{Binding ModelId, Converter={StaticResource A_Converter_BarnFindOverlayIconImageSourceFromOrdinal}}"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <ControlTemplate x:Key="A_ControlTemplate_BarnFindItemImage"
                     TargetType="Control">
        <Grid>
            <local:FZMaterial ImageSource="{Binding BigThumbnail}"
                              Preset="{Binding BarnFindState, Converter={StaticResource A_Converter_BarnFindThumnailPresetFromState}}"
                              Stretch="Uniform"
                              x:Name="Thumbnail"
                              Visibility="{Binding BarnFindState, Converter={StaticResource A_Converter_BarnFindThumbnailVisibilityFromState}}"
                              Color="{Binding BarnFindState, Converter={StaticResource A_Converter_BarnFindThumbnailColorFromState}}" />
            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_BarnFindOverlayIcon}"
                              x:Name="OverlayIcon" />
        </Grid>
    </ControlTemplate>

    <Style x:Key="A_Style_FrameworkElement_CarSelectItemForeground"
           TargetType="FrameworkElement">
        <Setter Property="VerticalAlignment" Value="Bottom" />
        <Setter Property="HorizontalAlignment" Value="Center" />
        <Setter Property="Width" Value="302" />
        <Setter Property="Height" Value="173" />
        <Setter Property="Margin" Value="0,0,0,10" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding IsFakeCarRecord}" Value="True">
                <Setter Property="Margin" Value="0,0,0,10"/>
                <Setter Property="Width" Value="322"/>
                <Setter Property="Height" Value="194"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="A_Style_AutoScrollPanel_CarSelectCarTitle" TargetType="local:AutoScrollPanel">
        <Style.Resources>
            <ControlTemplate x:Key="A_ControlTemplate_AutoscrollTemplate_Dynamic">
                <local:FZTextBlock x:Name="CarName"  Style="{StaticResource A_Style_FZTextBlock_CarSelectCarousel_MainTitle}" TextAlignment="Center" HorizontalAlignment="Center" Height="24"/>
                <ControlTemplate.Triggers>
                    <DataTrigger Binding="{Binding Path=(Selector.IsSelected), RelativeSource={RelativeSource FindAncestor, AncestorType=ListBoxItem, AncestorLevel=2}}" Value="False">
                        <Setter TargetName="CarName" Property="MaxWidth" Value="293"/>
                    </DataTrigger>
                </ControlTemplate.Triggers>
            </ControlTemplate>
        </Style.Resources>
        <Setter Property="AnimationContext" Value="{Binding}" />
        <Setter Property="ScrollType" Value="Speed" />
        <Setter Property="ScrollSeparation" Value="100" />
        <Setter Property="Speed" Value="40.0" />
        <Setter Property="InitialPause" Value="0:0:0.5" />
        <Setter Property="ClipToBounds" Value="True" />
        <Setter Property="Orientation" Value="Horizontal" />
        <Setter Property="AllowScrolling" Value="False"/>
        <Setter Property="Margin" Value="0,-2"/> <!-- To avoid cutting off text due to clipping. -->
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:AutoScrollPanel">
                    <local:CommonListBox Style="{StaticResource A_Style_ListBox_AutoScrollPanel}" VerticalAlignment="Center">
                        <ListBox.ItemsPanel>
                            <ItemsPanelTemplate>
                                <StackPanel Orientation="{Binding Orientation, RelativeSource={RelativeSource FindAncestor, AncestorType=local:AutoScrollPanel}}"
                                IsItemsHost="True"
                                Focusable="False"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Top"/>
                            </ItemsPanelTemplate>
                        </ListBox.ItemsPanel>
                        <Control x:Name="ItemFirst" Template="{DynamicResource A_ControlTemplate_AutoscrollTemplate_Dynamic}"/>
                        <Decorator x:Name="DecoratorFirst"  Width="{Binding ScrollSeparation, RelativeSource={RelativeSource TemplatedParent}}" Visibility="Collapsed"/>
                        <Control x:Name="ItemSecond" Template="{DynamicResource A_ControlTemplate_AutoscrollTemplate_Dynamic}" Visibility="Collapsed"/>
                        <Decorator x:Name="DecoratorSecond" Width="{Binding ScrollSeparation, RelativeSource={RelativeSource TemplatedParent}}" Visibility="Collapsed"/>
                    </local:CommonListBox>
                    <ControlTemplate.Triggers>
                        <DataTrigger Binding="{Binding Path=(Selector.IsSelected), RelativeSource={RelativeSource FindAncestor, AncestorType=ListBoxItem}}" Value="True">
                            <Setter Property="AllowScrolling" Value="True"/>
                        </DataTrigger>
                        <Trigger Property="RequiresScrolling" Value="True">
                            <Setter TargetName="DecoratorFirst" Property="Visibility" Value="Visible"/>
                            <Setter TargetName="ItemSecond" Property="Visibility" Value="Visible"/>
                            <Setter TargetName="DecoratorSecond" Property="Visibility" Value="Visible"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

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

    <local:MappingConverter x:Key="A_Converter_CarSelect_RarityToPreset" Default="{StaticResource A_FZMaterialPresetRoundtangleStroke_FlatPanel_Thick_Inner_All}">
        <local:MappingConverterEntry Key="{x:Static local:XAMLRarity.HorizonEdition}" Value="{StaticResource A_FZMaterialPresetRoundtangleStroke_FlatPanel_Thick_Inner_All_HorizonEdition}" />
    </local:MappingConverter>
    
    <Style x:Key="A_FZMaterial_StatusIconContainer" TargetType="local:FZMaterial">
        <Setter Property="local:BindingProxy.A" Value="{Binding Rarity, Converter={StaticResource A_Converter_RarityToColor}, FallbackValue=#FFFFFFFF}"/>
        <Setter Property="local:BindingProxy.B" Value="{Binding Rarity, Converter={StaticResource A_Converter_RarityToColor}, FallbackValue=#FFFFFFFF}"/>
        <Setter Property="Height" Value="33"/>
        <Setter Property="Margin" Value="0,-1,0,0"/>
        <Setter Property="Preset">
            <Setter.Value>
                <local:FZMaterialPresetRoundtangle
                                BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
                                GradientColorA="{Binding (local:BindingProxy.A), RelativeSource={RelativeSource FindAncestor, AncestorType=local:FZMaterial}, FallbackValue=#FFFFFFFF}"
                                GradientColorB="{Binding (local:BindingProxy.B), RelativeSource={RelativeSource FindAncestor, AncestorType=local:FZMaterial}, FallbackValue=#FFFFFFFF}"
                                CornerRadius="{Binding (local:BindingProxy.C), RelativeSource={RelativeSource FindAncestor, AncestorType=local:FZMaterial}}"
                                GradientAngle="90"/>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="A_FZMaterial_StatusIconContainer_Right" BasedOn="{StaticResource A_FZMaterial_StatusIconContainer}" TargetType="local:FZMaterial">
        <Setter Property="local:BindingProxy.C" Value="4,4,4,0"/>
        <Style.Resources>
            <local:MultiConverter x:Key="A_Converter_GradientColorCalc">
                <local:MultiConverterEntry>
                    <local:MultiConverterEntry.Converter>
                        <!-- 1/317 is 0.0031545741324921 -->
                        <local:LinearTransformConverter Scale="0.0031545741324921"/>
                    </local:MultiConverterEntry.Converter>
                </local:MultiConverterEntry>
                <local:MultiConverterEntry>
                    <local:MultiConverterEntry.Converter>
                        <local:ColorInterpolationConverter ColorA="{StaticResource A_Color_HorizonEditionGradientB}" ColorB="{StaticResource A_Color_HorizonEditionGradientA}"/>
                    </local:MultiConverterEntry.Converter>
                </local:MultiConverterEntry>
            </local:MultiConverter>
        </Style.Resources>
        <Style.Triggers>
            <DataTrigger Binding="{Binding Rarity}" Value="{x:Static local:XAMLRarity.HorizonEdition}">
                <Setter Property="local:BindingProxy.A" Value="{Binding ActualWidth, RelativeSource={RelativeSource Self}, Converter={StaticResource A_Converter_GradientColorCalc}}"/>
                <Setter Property="local:BindingProxy.B" Value="{StaticResource A_Color_HorizonEditionGradientB}"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="A_FZMaterial_StatusIconContainer_Left" BasedOn="{StaticResource A_FZMaterial_StatusIconContainer}" TargetType="local:FZMaterial">
        <Setter Property="local:BindingProxy.C" Value="4,4,0,4"/>
        <Style.Resources>
            <local:MultiConverter x:Key="A_Converter_GradientColorCalc">
                <local:MultiConverterEntry>
                    <local:MultiConverterEntry.Converter>
                        <!-- 1/317 is 0.0031545741324921 -->
                        <local:LinearTransformConverter Scale="0.0031545741324921"/>
                    </local:MultiConverterEntry.Converter>
                </local:MultiConverterEntry>
                <local:MultiConverterEntry>
                    <local:MultiConverterEntry.Converter>
                        <local:ColorInterpolationConverter ColorA="{StaticResource A_Color_HorizonEditionGradientA}" ColorB="{StaticResource A_Color_HorizonEditionGradientB}"/>
                    </local:MultiConverterEntry.Converter>
                </local:MultiConverterEntry>
            </local:MultiConverter>
        </Style.Resources>
        <Style.Triggers>
            <DataTrigger Binding="{Binding Rarity}" Value="{x:Static local:XAMLRarity.HorizonEdition}">
                <Setter Property="local:BindingProxy.A" Value="{StaticResource A_Color_HorizonEditionGradientA}"/>
                <Setter Property="local:BindingProxy.B" Value="{Binding ActualWidth, RelativeSource={RelativeSource Self}, Converter={StaticResource A_Converter_GradientColorCalc}}"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <local:MappingConverter x:Key="A_Converter_RarityToColor_CarSelectRarityStroke" Default="#FF969696">
        <local:MappingConverterEntry Key="{x:Static local:XAMLRarity.Common}" Value="{StaticResource A_Color_Rarity_Common}" />
        <local:MappingConverterEntry Key="{x:Static local:XAMLRarity.Rare}" Value="{StaticResource A_Color_Rarity_Rare}" />
        <local:MappingConverterEntry Key="{x:Static local:XAMLRarity.Epic}" Value="{StaticResource A_Color_Rarity_Epic}" />
        <local:MappingConverterEntry Key="{x:Static local:XAMLRarity.Legendary}" Value="{StaticResource A_Color_Rarity_Legendary}" />
        <local:MappingConverterEntry Key="{x:Static local:XAMLRarity.HorizonEdition}" Value="#FFFFFFFF" />
    </local:MappingConverter>

    <local:MappingConverter x:Key="A_Converter_HiddenIfValid" Default="{x:Static Visibility.Hidden}" />
    <local:MappingConverter x:Key="A_Converter_VisibleIfValid" Default="{x:Static Visibility.Visible}" />

    <DataTemplate x:Key="A_DataTemplate_CarSelectCarouselItem">
        <Grid x:Name="ItemContentsContainer"
              Width="342"
              Height="213"
              local:ManualPassthroughProperty.Input="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}}"
              local:ManualPassthroughProperty.Allowed="{Binding IsKeyboardFocusWithin, RelativeSource={RelativeSource AncestorType={x:Type ListBoxItem}}}"
              local:ScreenReader.Line="{Binding (local:ManualPassthroughProperty.Output), RelativeSource={RelativeSource Self}}"
              local:ScreenReader.LineType="SelectedItem"
              local:ScreenReader.Event="OnChange"
              local:ScreenReader.ControlType="Button"
              local:ScreenReader.SelectedNumber="{Binding (local:CollectionIndexer.Index), Converter={StaticResource A_IndexToNumberConverter}, FallbackValue=-1}"
              local:ScreenReader.SelectedCount="{Binding Items.Count, RelativeSource={RelativeSource AncestorType={x:Type Selector}}}">
            <local:FZMaterial ImageSource="{Binding BigThumbnail}"
                              Style="{StaticResource A_Style_FrameworkElement_CarSelectItemForeground}"
                              Visibility="{Binding IsBarnFindsScene, FallbackValue=Visible, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}, RelativeSource={RelativeSource AncestorType=Page}}"
                              x:Name="Icon" />
            <Control Template="{StaticResource A_ControlTemplate_BarnFindItemImage}"
                     Style="{StaticResource A_Style_FrameworkElement_CarSelectItemForeground}"
                     Visibility="{Binding IsBarnFindsScene, FallbackValue=Collapsed, Converter={StaticResource A_FZBooleanToVisibilityConverter}, RelativeSource={RelativeSource AncestorType=Page}}" />
            <Grid VerticalAlignment="Top"
                  HorizontalAlignment="Center">
                <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_CarSelectCarouselItem_ItemTitleBackground}"
                                  Width="317"
                                  Height="73"
                                  Margin="12">
                    <Grid Margin="12" >
                        <Decorator x:Name="TitleContainer" Margin="0,-6,0,0">
                            <local:AutoScrollPanel Style="{StaticResource A_Style_AutoScrollPanel_CarSelectCarTitle}"
                                       Orientation="Horizontal"
                                       VerticalAlignment="Top"
                                       HorizontalAlignment="Center"
                                       Height="40"
                                       Width="293"/>
                        </Decorator>
                        <Viewbox StretchDirection="DownOnly"
                                 VerticalAlignment="Bottom"
                                 Visibility="{Binding IsFakeCarRecord, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}">
                            <StackPanel Orientation="Horizontal"
                                        HorizontalAlignment="Center">
                                <local:FZTextBlock Margin="0,0,0,0"
                                                   Style="{StaticResource A_Style_TextBlock_CarSelect_Year}"
                                                   Text="{Binding Year}" />
                                <local:FZTextBlock Margin="6,0,0,0"
                                                   Style="{StaticResource A_Style_FZTextBlock_CarSelectCarousel_Manufacturer}" />
                            </StackPanel>
                        </Viewbox>
                    </Grid>
                </local:FZMaterial>
            </Grid>
            <Grid Margin="6">
                <local:FZMaterial Preset="{Binding Rarity, Converter={StaticResource A_Converter_CarSelect_RarityToPreset}}"
                                  Color="{Binding Rarity, Converter={StaticResource A_Converter_RarityToColor_CarSelectRarityStroke}}"
                                  Visibility="{Binding EliminatorLevel, Converter={StaticResource A_Converter_HiddenIfValid}, FallbackValue={x:Static Visibility.Visible}}" />
                <local:FZMaterial Preset="{StaticResource A_FZMaterialPresetRoundtangleStroke_FlatPanel_Thick_Inner_All}"
                                  Color="{Binding EliminatorLevel, Converter={StaticResource A_Converter_Grade_To_PresetColor_B}}"
                                  Visibility="{Binding EliminatorLevel, Converter={StaticResource A_Converter_VisibleIfValid}, FallbackValue={x:Static Visibility.Collapsed}}" />
            </Grid>
            <Grid x:Name="CarSelectStatusIcons" Margin="6,6,6,7">
                <StackPanel Orientation="Horizontal" >
                    <StackPanel Orientation="Vertical"
                                VerticalAlignment="Bottom"
                                HorizontalAlignment="Left"
                                Visibility="{Binding IsFakeCarRecord, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}, FallbackValue=Collapsed}">
                        <Decorator Visibility="{Binding ShowPhotoInfo, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}, RelativeSource={RelativeSource AncestorType=Page}, FallbackValue=Collapsed}">
                            <local:FZMaterial HorizontalAlignment="Left" VerticalAlignment="Bottom" Style="{StaticResource A_FZMaterial_StatusIconContainer_Left}" 
                                              Visibility="{Binding BlammoType, Converter={StaticResource A_Converter_BlammoTypeToVisibility}, FallbackValue={x:Static Visibility.Collapsed}}" >
                                <local:FZTextBlock Text="{Binding BlammoType, Converter={StaticResource A_Converter_BlammoTypeToText}}"
                                           Style="{StaticResource A_Style_FZTextBlock_CarSelectCarouseItem_StatusText}"
                                           Color="{StaticResource A_Color_Header_Text}"/>
                            </local:FZMaterial>
                        </Decorator>
                        <StackPanel Orientation="Vertical"
                                Visibility="{Binding IsBuyCarScene, Converter={StaticResource A_FZBooleanToVisibilityConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}, FallbackValue=Collapsed}">
                            <local:FZMaterial HorizontalAlignment="Left" VerticalAlignment="Bottom" Style="{StaticResource A_FZMaterial_StatusIconContainer_Left}" 
                                              Visibility="{Binding IsFree, Converter={StaticResource A_FZBooleanToVisibilityConverter}, FallbackValue={x:Static Visibility.Collapsed}}" >
                                <local:FZTextBlock Text="{local:Loc InGameMarketplace.IDS_Free}"
                                           Style="{StaticResource A_Style_FZTextBlock_CarSelectCarouseItem_StatusText}"
                                           Color="{StaticResource A_Color_Header_Text}"/>
                            </local:FZMaterial>
                            <local:FZMaterial HorizontalAlignment="Left" VerticalAlignment="Bottom" Style="{StaticResource A_FZMaterial_StatusIconContainer_Left}" 
                                              Visibility="{Binding IsOnSale, Converter={StaticResource A_FZBooleanToVisibilityConverter}, FallbackValue={x:Static Visibility.Collapsed}}">
                                <local:FZTextBlock Text="{local:Loc InGameMarketplace.IDS_OnSale}"
                                           Style="{StaticResource A_Style_FZTextBlock_CarSelectCarouseItem_StatusText}"
                                           Color="{StaticResource A_Color_Header_Text}" />
                            </local:FZMaterial>
                        </StackPanel>

                        <local:FZMaterial HorizontalAlignment="Left" VerticalAlignment="Bottom" Style="{StaticResource A_FZMaterial_StatusIconContainer_Left}" Visibility="{Binding IsOwned, Converter={StaticResource A_FZBooleanToVisibilityConverter}, FallbackValue={x:Static Visibility.Collapsed}}">
                            <local:FZTextBlock Text="{Binding Source={local:Loc Upgrades_flow.IDS_Owned}, Mode=OneWay, Converter={StaticResource A_StringToUpper}}"
                                               Style="{StaticResource A_Style_FZTextBlock_CarSelectCarouseItem_StatusText}" />
                        </local:FZMaterial>
                    </StackPanel>
                </StackPanel>
                <local:FZMaterial HorizontalAlignment="Right"
                                  VerticalAlignment="Bottom"
                                  Style="{StaticResource A_FZMaterial_StatusIconContainer_Right}"
                                  Visibility="{Binding EliminatorLevel, Converter={StaticResource A_Converter_HiddenIfValid}, FallbackValue={x:Static Visibility.Visible}}">
                    <StackPanel HorizontalAlignment="Right"
                            Orientation="Horizontal"
                            VerticalAlignment="Bottom"
                            Visibility="{Binding IsFakeCarRecord, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}, FallbackValue=Collapsed}"
                            Margin="3,0"
                            Height="33">
                        <Decorator Style="{StaticResource A_Style_FrameworkElement_NewBlammoContainer}">
                            <local:FZTextBlock Text="{local:Loc InGameMarketplace.IDS_New}"
                                           Style="{StaticResource A_Style_FZTextBlock_CarSelectCarouseItem_StatusText}"
                                           Color="{StaticResource A_Color_Header_Text}"
                                           Visibility="{Binding IsNew, Converter={StaticResource A_FZBooleanToVisibilityConverter}, FallbackValue={x:Static Visibility.Collapsed}}" />
                        </Decorator>
                        <Decorator Visibility="{Binding ShowPhotoInfo, Converter={StaticResource A_FZBooleanToVisibilityConverter}, RelativeSource={RelativeSource AncestorType=Page}, FallbackValue=Collapsed}">
                            <local:FZMaterial ImageSource="/ForzaUI;component/Textures/Data_Bound/Promo/Car_Collection/Carousel_CameraIcon.png"
                                              Style="{StaticResource A_Style_FZMaterial_CarSelectCarouselItem_StatusIcon}"
                                              Visibility="{Binding IsPhotoCaptured, Converter={StaticResource A_FZBooleanToVisibilityConverter}, FallbackValue=Collapsed}"/>
                        </Decorator>
                        <local:FZMaterial ImageSource="/ForzaUI;component/Textures/Anthem/A_DLC.png"
                                              Style="{StaticResource A_Style_FZMaterial_CarSelectCarouselItem_StatusIcon}"
                                              Visibility="{Binding IsDLC, Converter={StaticResource A_FZBooleanToVisibilityConverter}, FallbackValue={x:Static Visibility.Collapsed}}"/>
                        <local:FZMaterial ImageSource="/ForzaUI;component/Textures/Anthem/A_Star.png"
                                              Style="{StaticResource A_Style_FZMaterial_CarSelectCarouselItem_StatusIcon}"
                                              Visibility="{Binding IsFavorite, Converter={StaticResource A_FZBooleanToVisibilityConverter}, FallbackValue={x:Static Visibility.Collapsed}}"/>
                        <local:FZMaterial ImageSource="/ForzaUI;component/Textures/Anthem/A_SnowParts.png"
                                              Visibility="{Binding HasSnowParts, Converter={StaticResource A_FZBooleanToVisibilityConverter}, FallbackValue={x:Static Visibility.Collapsed}}"
                                              Style="{StaticResource A_Style_FZMaterial_CarSelectCarouselItem_StatusIcon}" />
                        <local:FZMaterial ImageSource="/ForzaUI;component/Textures/Anthem/A_Tick.png"
                                          Style="{StaticResource A_Style_FZMaterial_CarSelectCarouselItem_StatusIcon}"
                                          Visibility="{Binding IsCurrentlySelected, Converter={StaticResource A_FZBooleanToVisibilityConverter}, FallbackValue={x:Static Visibility.Collapsed}}"/>
                        <local:FZMaterial ImageSource="/ForzaUI;component/Textures/Anthem/A_Current.png"
                                                                       Visibility="{Binding IsCurrent, Converter={StaticResource A_FZBooleanToVisibilityConverter}, FallbackValue={x:Static Visibility.Collapsed}}"
                                                                       Style="{StaticResource A_Style_FZMaterial_CarSelectCarouselItem_StatusIcon}" />
                        <local:FZMaterial ImageSource="/ForzaUI;component/Textures/Data_Bound/UI_Symbols/BarnFind_Stopwatch.png"
                                          Style="{StaticResource A_Style_FZMaterial_CarSelectCarouselItem_StatusIcon_BarnFindInProgress}" />

                        <local:FZTextBlock Text="{Binding Source={local:Loc BarnFind.IDS_CarState_IconReady}, Mode=OneWay, Converter={StaticResource A_StringToUpper}}"
                                               Style="{StaticResource A_Style_FZTextBlock_BarnfindReady}"/>
                    </StackPanel>
                </local:FZMaterial>
            </Grid>
        </Grid>
        <DataTemplate.Triggers>
            <DataTrigger Binding="{Binding IsFakeCarRecord}" Value="True">
                <Setter TargetName="TitleContainer" Property="VerticalAlignment" Value="Center"/>
                <Setter TargetName="TitleContainer" Property="Margin" Value="0"/>
                <Setter TargetName="ItemContentsContainer"
                        Property="local:MultiStringFormatter.Format"
                        Value="{local:Loc Main.IDS_ScreenReader_Format_CarSelect_FakeCarRecord}" />
                <Setter TargetName="ItemContentsContainer"
                        Property="local:MultiStringFormatter.Param0"
                        Value="{Binding Name}" />
            </DataTrigger>
            <DataTrigger Binding="{Binding IsFakeCarRecord}" Value="False">
                <Setter TargetName="ItemContentsContainer"
                        Property="local:MultiStringFormatter.Format"
                        Value="{local:Loc Main.IDS_ScreenReader_Format_CarSelect_CarRecord}" />
                <Setter TargetName="ItemContentsContainer"
                        Property="local:MultiStringFormatter.Param0"
                        Value="{Binding DisplayName}" />
                <Setter TargetName="ItemContentsContainer"
                        Property="local:MultiStringFormatter.Param1"
                        Value="{Binding Year, Converter={StaticResource A_ObjectToStringConverter}}" />
                <Setter TargetName="ItemContentsContainer"
                        Property="local:MultiStringFormatter.Param2"
                        Value="{Binding MakeName}" />
            </DataTrigger>
            <DataTrigger Binding="{Binding BarnFindState, Converter={StaticResource A_Converter_BarnFindStateIsDiscoveredOrLater}}"
                         Value="{StaticResource A_Boolean_False}">
                <Setter TargetName="ItemContentsContainer"
                        Property="local:MultiStringFormatter.Format"
                        Value="{local:Loc Main.IDS_ScreenReader_Format_CarSelect_FakeCarRecord}" />
                <Setter TargetName="ItemContentsContainer"
                       Property="local:MultiStringFormatter.Param0"
                       Value="{local:Loc BarnFind.IDS_CarState_Locked}" />
            </DataTrigger>
            <DataTrigger Binding="{Binding BarnFindState, Converter={StaticResource A_Converter_BarnFindStateIsDiscoveredNotAvailable}}"
                         Value="{StaticResource A_Boolean_True}">
                <Setter TargetName="ItemContentsContainer"
                        Property="local:MultiStringFormatter.Format"
                        Value="{local:Loc Main.IDS_ScreenReader_Format_CarSelect_FakeCarRecord}" />
                <Setter TargetName="ItemContentsContainer"
                       Property="local:MultiStringFormatter.Param0"
                       Value="{local:Loc BarnFind.IDS_CarState_DiscoveredNotAvailable}" />
            </DataTrigger>
        </DataTemplate.Triggers>
    </DataTemplate>

    <DataTemplate x:Key="A_DataTemplate_Carousel_SimpleCarItem">
        <local:FZMaterial x:Name="Icon"
                          ImageSource="{Binding Thumbnail}"
                          Margin="20"
                          Stretch="Uniform" />
    </DataTemplate>

    <DataTemplate x:Key="A_DataTemplate_Carousel_LockableCarItem">
        <Grid>
            <local:FZMaterial x:Name="Icon"
                              ImageSource="{Binding Thumbnail}"
                              Margin="20"
                              Stretch="Uniform" />
            <local:FZMaterial Margin="16,12"
                              ImageSource="/ForzaUI;component/Textures/Anthem/Icons/Livery/VinylGroup_Lock.png"
                              Style="{StaticResource A_Style_FZMaterial_CarSelectCarouselItem_StatusIcon}"
                              Visibility="{Binding IsLocked, Converter={StaticResource A_FZBooleanToVisibilityConverter}, FallbackValue={x:Static Visibility.Collapsed}}"
                              Height="25"
                              Stretch="Uniform"
                              VerticalAlignment="Top"
                              HorizontalAlignment="Right"/>
        </Grid>
    </DataTemplate>

    <Style TargetType="ContentControl"
                   x:Key="A_Style_ContentControl_Default_TabBarItem">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ContentControl">
                    <local:FZButton Content="{Binding Text, Converter={StaticResource A_StringToUpper}}"
                                    Style="{StaticResource A_Style_ContentControl_TabTitle_Default}"
                                    OnClickSoundName="/Master/UI/PauseMenu/HZ2_SFX_UI_PauseMenu_ChangeTab_01"
                                    Command="{Binding OnItemLeftMouseUp, RelativeSource={RelativeSource AncestorType=Selector}}"
                                    CommandParameter="{Binding}"
                                     />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="ContentControl"
                   x:Key="A_Style_ContentControl_CarSelect_TabBarItem">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ContentControl">
                    <local:FZButton Content="{Binding Text, Converter={StaticResource A_StringToUpper}}"
                                    Style="{StaticResource A_Style_ContentControl_TabTitle_Default}"
                                    OnClickSoundName="/Master/UI/PauseMenu/HZ2_SFX_UI_PauseMenu_ChangeTab_01"
                                    Command="{Binding OnItemLeftMouseUp, RelativeSource={RelativeSource AncestorType=Selector}}"
                                    CommandParameter="{Binding}"
                                    local:ScreenReader.SelectedNumber="{Binding Index, Converter={StaticResource A_IndexToNumberConverter}, FallbackValue=0}"
                                     />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <System:Double x:Key="A_Double_TabBar6ItemWidthWithMargin">263</System:Double>

    <Style TargetType="{x:Type local:ItemsSelector}"
                   x:Key="A_Style_Carousel6ItemList_TabBar">
        <Setter Property="FocusVisualStyle"
                        Value="{StaticResource A_Style_BlankVisualStyle}" />
        <Setter Property="IsTabStop"
                        Value="True" />
        <Setter Property="ClipToBounds"
                        Value="True" />
        <Setter Property="Width"
                        Value="1734" />
        <Setter Property="Margin"
                        Value="0,0,0,12" />
        <Setter Property="Height"
                        Value="{StaticResource A_Double_Size_TabMenuItemHeight}" />
        <Setter Property="ItemContainerStyle"
                        Value="{StaticResource A_Style_ContentControl_Default_TabBarItem}" />
        <Setter Property="AlternationCount"
                        Value="10000" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Grid>
                        <local:VirtualizingScrollPanel Style="{StaticResource A_Style_VirtualizingScrollPanel_MotionBlurScrollPanel_TabTitle}"
                                                           ItemHeight="{StaticResource A_Double_Size_TabMenuItemHeight}"
                                                           ItemWidth="{StaticResource A_Double_TabBar6ItemWidthWithMargin}"
                                                           Padding="261,0,0,0"
                                                           VerticalAlignment="Center"
                                                           Margin="79,0"/>
                        <local:FZButton HorizontalAlignment="Right"
                                    Style="{StaticResource A_Style_Button_TabTitleRB_CarSelect}"
                                    Command="{Binding ScrollPageNextCommand, RelativeSource={RelativeSource TemplatedParent}}"
                                    IsEnabled="{Binding CanSelectNext, RelativeSource={RelativeSource TemplatedParent}}"/>
                        <local:FZButton HorizontalAlignment="Left"
                                    Style="{StaticResource A_Style_Button_TabTitleLB_CarSelect}"
                                    Command="{Binding ScrollPagePrevCommand, RelativeSource={RelativeSource TemplatedParent}}"
                                    IsEnabled="{Binding CanSelectPrev, RelativeSource={RelativeSource TemplatedParent}}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type local:FZButton}"
            x:Key="A_Style_Button_TabTitleLB_CarSelect"
            BasedOn="{StaticResource A_Style_Button_TabTitleLB}">
    </Style>

    <Style TargetType="{x:Type local:FZButton}"
            x:Key="A_Style_Button_TabTitleRB_CarSelect"
            BasedOn="{StaticResource A_Style_Button_TabTitleRB}">
    </Style>

    <Style x:Key="A_Style_ListBoxItem_CurrentLargeIcon"
           TargetType="{x:Type ListBoxItem}">
        <Setter Property="Focusable" Value="False" />
    </Style>

    <Style x:Key="A_Style_FZMaterial_CarSelect_CurrentLargeIcon"
           TargetType="{x:Type local:FZMaterial}">
        <Setter Property="Stretch" Value="Uniform" />
        <Setter Property="StretchDirection" Value="DownOnly" />
        <Setter Property="HorizontalAlignment" Value="Center" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="GreedyMeasure" Value="True" />
        <Setter Property="Margin" Value="5" />
    </Style>

    <Style x:Key="A_Style_FZMaterial_CarSelect_CurrentLargeIconContainer"
           TargetType="{x:Type FrameworkElement}">
        <Setter Property="Height" Value="160" />
        <Setter Property="Width" Value="342" />
        <Setter Property="Visibility" Value="Collapsed" />
        <Setter Property="Focusable" Value="False" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding IsSelected, RelativeSource={RelativeSource AncestorType=ListBoxItem}}"
                     Value="True">
                <Setter Property="Visibility"
                        Value="Visible" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <CornerRadius x:Key="A_CornerRadius_Selection">5</CornerRadius>
    <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPresetRoundtangle_Selection"
                                       BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
                                       CornerRadius="{StaticResource A_CornerRadius_Selection}"/>

    <Style x:Key="A_Style_FZMaterial_CarSelect_CurrentLargeIconSelection"
           TargetType="{x:Type local:FZMaterial}">
        <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_Selection}" />
        <Setter Property="Color" Value="#FF3C3C3C" />
        <Setter Property="Width" Value="10" />
        <Setter Property="Height" Value="10" />
        <Setter Property="Margin" Value="5,0,5,0" />
        <Setter Property="Focusable" Value="False" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding IsSelected, RelativeSource={RelativeSource AncestorType=ListBoxItem}}"
                     Value="True">
                <Setter Property="Color"
                        Value="#FFFF3302" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

</ResourceDictionary>