<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ForzaUI;assembly="
                    xmlns:System="clr-namespace:System;assembly=mscorlib">
    <!-- Resource dictionary entries should be defined here. -->

    <!-- Doubles -->
    <System:Double x:Key="A_Double_Carousel6ItemWidthWithMargin">295</System:Double>
    <System:Double x:Key="A_Double_Carousel6ItemHeight">178</System:Double>

    <System:Double x:Key="A_Double_Carousel7ItemWidthWithMargin">252.75</System:Double>
    <System:Double x:Key="A_Double_Carousel7ItemHeight">153</System:Double>

    <System:Double x:Key="A_Double_Carousel7HalfItemWidth">120</System:Double>


    <Style x:Key="A_Style_FZTextBlock_CreatorInfo_CreatedDate"
           TargetType="local:FZTextBlock"
           BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}">
        <Setter Property="CapHeight"
                Value="18" />
        <Setter Property="Color" 
                Value="{StaticResource A_Color_Body_Text}" />
        <Setter Property="VerticalAlignment"
                Value="Center" />
    </Style>

    <Style x:Key="A_Style_FZTextBlock_CreatorInfo_Gamertag"
           TargetType="local:FZTextBlock"
           BasedOn="{StaticResource A_Style_FZTextBlock_HorizonB}">
        <Setter Property="CapHeight"
                Value="28" />
        <Setter Property="Color"
                Value="{StaticResource A_Color_Body_Text}" />
        <Setter Property="VerticalAlignment"
                Value="Center" />
        <Setter Property="HorizontalAlignment"
                Value="Center" />
    </Style>

    <ControlTemplate x:Key="A_Template_Control_Carousel_EmptyItemStyle">
        <Grid>
            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_FlatPanel_Tile}"
                              Opacity="0.3">
                <local:FZMaterial.Preset>
                    <local:FZMaterialPresetRoundtangle BasedOn="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterAll}"
                                                       CornerRadius="{DynamicResource A_CornerRadius_Dynamic_CarouselTile}"/>
                </local:FZMaterial.Preset>
            </local:FZMaterial> 
            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_GlassPanel_Pill}"
                              Margin="1">
                <local:FZMaterial.Preset>
                    <local:FZMaterialPresetGlassRoundtangle BasedOn="{StaticResource A_FZMaterialPresetGlassRoundtangle_GlassPanel_OuterAll}"
                                                       CornerRadius="{DynamicResource A_CornerRadius_Dynamic_CarouselTile}"/>
                </local:FZMaterial.Preset>
            </local:FZMaterial> 
        </Grid>
    </ControlTemplate>

    <Style x:Key="A_Style_Control_Carousel_EmptyItemStyle_NoMargin"
           TargetType="Control">
        <Setter Property="Focusable"
                Value="False" />
        <Setter Property="Template"
                Value="{StaticResource A_Template_Control_Carousel_EmptyItemStyle}"/>
    </Style>

    <Style x:Key="A_Style_Control_Carousel_EmptyItemStyle"
           TargetType="Control"
           BasedOn="{StaticResource A_Style_Control_Carousel_EmptyItemStyle_NoMargin}">
        <Setter Property="Margin"
                Value="0,0,6,6"/>
    </Style>

    <Style x:Key="A_Style_Control_Carousel_EmptyItemStyle_Empty"
           TargetType="Control">
        <Setter Property="Focusable"
                Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate />
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="A_Style_Control_TabTitleEmptyItemStyle"
           TargetType="{x:Type Control}">
        <Setter Property="Focusable"
                Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <local:FZMaterial Color="{StaticResource A_Color_TabBar_ItemDivider}">
                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_GlassPanel_Interactive}" />
                    </local:FZMaterial>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="A_Style_VirtualizingScrollPanel_MotionBlurScrollPanel" TargetType="{x:Type local:VirtualizingScrollPanel}" >
        <Setter Property="Effect" Value="{StaticResource A_MotionBlurEffect}" />
        <Setter Property="local:MotionBlurEffect.MotionBlurPositionXControl" Value="{Binding VisualOffset, RelativeSource={RelativeSource Self}}" />
        <Setter Property="ClipToBounds" Value="True" />
        <Setter Property="KeyboardNavigation.DirectionalNavigation" Value="Contained" />
        <Setter Property="IsItemsHost" Value="True" />
        <Setter Property="SlideDuration" Value="0:0:0.267" />
        <Setter Property="FocusItemIndex" Value="1" />
        <Setter Property="EmptyItemStyle" Value="{StaticResource A_Style_Control_Carousel_EmptyItemStyle}" />
    </Style>

    <Style x:Key="A_Style_VirtualizingScrollPanel_MotionBlurScrollPanel_TabTitle" TargetType="{x:Type local:VirtualizingScrollPanel}" BasedOn="{StaticResource A_Style_VirtualizingScrollPanel_MotionBlurScrollPanel}">
        <Setter Property="EmptyItemStyle" Value="{StaticResource A_Style_Control_TabTitleEmptyItemStyle}" />
    </Style>

    <Style x:Key="A_Style_FZMaterial_Carousel_DefaultItemContent"
           TargetType="local:FZMaterial">
        <Setter Property="ImageSource"
                Value="{Binding Thumbnail}" />
        <Setter Property="Preset"
                Value="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterAll}" />
    </Style>

    <DataTemplate x:Key="A_DataTemplate_Carousel_DefaultItemContent">
        <local:FZMaterial x:Name="Icon"
                          Style="{StaticResource A_Style_FZMaterial_Carousel_DefaultItemContent}"
                          Stretch="Uniform" />
    </DataTemplate>

    <DataTemplate x:Key="A_DataTemplate_Carousel_SmallThumbnailItemContent">
        <Grid>
            <local:FZMaterial x:Name="Icon"
                              ImageSource="{Binding SmallThumbnail}"
                              Visibility="{Binding IsReady, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"
                              Margin="20" />
            <ProgressBar x:Name="Loading"
                         IsIndeterminate="True"
                         Style="{StaticResource A_Style_ProgressBar_WaitSpinnerDark}"
                         Visibility="{Binding IsReady, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}"
                         HorizontalAlignment="Center"
                         VerticalAlignment="Center" />
        </Grid>
    </DataTemplate>

    <Color x:Key="A_Color_GlassPanel_NonInteractive_2">#77FFFFFF</Color>

    <CornerRadius x:Key="A_CornerRadius_Dynamic_CarouselTile">8</CornerRadius>

    <Style x:Key="A_Style_FZMaterial_RaiseFocusItemBackground"
           BasedOn="{StaticResource A_Style_FZMaterial_FlatPanel_Tile}"
           TargetType="local:FZMaterial">
        <Setter Property="Preset">
            <Setter.Value>
                <local:FZMaterialPresetRoundtangle BasedOn="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterAll}"
                                                   CornerRadius="{DynamicResource A_CornerRadius_Dynamic_CarouselTile}"/>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <DataTrigger Binding="{Binding UseDarkBg}"
                       Value="1" >
                <Setter Property="Preset">
                    <Setter.Value>
                        <local:FZMaterialPresetGlassRoundtangle BasedOn="{StaticResource A_FZMaterialPresetGlassRoundtangle_GlassPanel_OuterAll}"
                                                           CornerRadius="{DynamicResource A_CornerRadius_Dynamic_CarouselTile}"/>
                    </Setter.Value>
                </Setter>
                <Setter Property="Color"
                        Value="{StaticResource A_Color_GlassPanel_Interactive}"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="A_Style_FZMaterial_RaiseFocusItemBackground_Dynamic"
           BasedOn="{StaticResource A_Style_FZMaterial_RaiseFocusItemBackground}"
           TargetType="local:FZMaterial"/>

    <Style x:Key="A_Style_Control_CarouselItem_MouseRollover_Default"
           BasedOn="{StaticResource A_Style_Control_MouseRollover_Outer_All}"
           TargetType="{x:Type Control}">
        <Setter Property="local:MarkAsHandled.RoutedEvent"
                Value="UIElement.MouseLeftButtonDown" />
        <Setter Property="local:AttachedRoutedEventCommand.Enabled"
                Value="{Binding (Selector.IsSelected), RelativeSource={RelativeSource AncestorType=ListBoxItem}}" />
        <Setter Property="local:AttachedRoutedEventCommand.Command"
                Value="{Binding SelectCommand, RelativeSource={RelativeSource AncestorType=Page}}" />
        <Setter Property="local:AttachedRoutedEventCommand.RoutedEvent"
                Value="UIElement.MouseLeftButtonUp" />
        <Setter Property="local:SelectorSelectedItem.SelectAncestorOnRoutedEvent"
                Value="UIElement.MouseLeftButtonUp" />
        <Setter Property="local:BindingProxy.A"
                Value="{Binding IsMouseOver, RelativeSource={RelativeSource AncestorType=ListBoxItem}}" />
    </Style>

    <Style x:Key="A_Style_Control_CarouselItem_MouseRollover_AlwaysSelectWhenClicked"
           BasedOn="{StaticResource A_Style_Control_CarouselItem_MouseRollover_Default}"
           TargetType="{x:Type Control}">
        <Setter Property="local:AttachedRoutedEventCommand.Enabled"
                Value="True" />
        <Setter Property="local:BindingProxy.A">
            <Setter.Value>
                <System:Boolean>False</System:Boolean>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="A_Style_Control_CarouselItem_MouseRollover_Dynamic"
           BasedOn="{StaticResource A_Style_Control_CarouselItem_MouseRollover_Default}"
           TargetType="{x:Type Control}" />

    <Style x:Key="A_Style_FrameworkElement_CarouselSelectionScale_Dynamic"
           TargetType="FrameworkElement">
        <Setter Property="RenderTransform">
            <Setter.Value>
                <ScaleTransform />
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <DataTrigger Binding="{Binding (Selector.IsSelected), RelativeSource={RelativeSource AncestorType=ListBoxItem}}"
                         Value="True">
                <DataTrigger.EnterActions>
                    <BeginStoryboard HandoffBehavior="SnapshotAndReplace">
                        <BeginStoryboard.Storyboard>
                            <Storyboard>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.RenderTransform).(ScaleTransform.ScaleX)">
                                    <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                                            Value="1.12" />
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.RenderTransform).(ScaleTransform.ScaleY)">
                                    <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                                            Value="1.12" />
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </BeginStoryboard.Storyboard>
                    </BeginStoryboard>
                </DataTrigger.EnterActions>
                <DataTrigger.ExitActions>
                    <BeginStoryboard HandoffBehavior="SnapshotAndReplace">
                        <BeginStoryboard.Storyboard>
                            <Storyboard>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.RenderTransform).(ScaleTransform.ScaleX)">
                                <EasingDoubleKeyFrame KeyTime="0:0:0.3"
                                                      Value="1.0"
                                                      EasingFunction="{local:CircleEasing}" />
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.RenderTransform).(ScaleTransform.ScaleY)">
                                    <EasingDoubleKeyFrame KeyTime="0:0:0.3"
                                                          Value="1.0"
                                                          EasingFunction="{local:CircleEasing}" />
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </BeginStoryboard.Storyboard>
                    </BeginStoryboard>
                </DataTrigger.ExitActions>
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <!-- DataTemplates -->
    <Style x:Key="A_Style_ContentControl_Carousel_ContainerStyle_Internal"
           TargetType="ContentControl">
        <Setter Property="Margin"
                Value="0,0,6,6" />
        <Setter Property="local:FocusSelf.WhenTrue"
                Value="{Binding Path=(Selector.IsSelected), RelativeSource={RelativeSource Self}}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ContentControl}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="SelectItemStory">
                            <Int32AnimationUsingKeyFrames Storyboard.TargetProperty="(local:ZPanel.ClippingBias)">
                                <DiscreteInt32KeyFrame KeyTime="0:0:0.0"
                                                        Value="1" />
                            </Int32AnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                           Storyboard.TargetName="FocusHighlight">
                                <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                                        Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                           Storyboard.TargetName="DropShadow">
                                <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                                        Value="0.6" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(ScaleTransform.ScaleX)"
                                                           Storyboard.TargetName="ShadowScale">
                                <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                                        Value="1.1" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(ScaleTransform.ScaleY)"
                                                           Storyboard.TargetName="ShadowScale">
                                <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                                        Value="1.1" />
                            </DoubleAnimationUsingKeyFrames>
                            <Int32AnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.ZIndex)"
                                                          Storyboard.Target="{Binding RelativeSource={RelativeSource AncestorType=ContentPresenter}}">
                                <DiscreteInt32KeyFrame KeyTime="0:0:0.0"
                                                       Value="20" />
                            </Int32AnimationUsingKeyFrames>
                        </Storyboard>
                        <local:UIStoryboard x:Key="DeselectItemStory"
                                            Duration="{StaticResource A_Duration_Button_Select}">
                            <Int32AnimationUsingKeyFrames Storyboard.TargetProperty="(local:ZPanel.ClippingBias)">
                                <DiscreteInt32KeyFrame KeyTime="0:0:0.0"
                                                        Value="1" />
                                <DiscreteInt32KeyFrame KeyTime="0:0:0.3"
                                                        Value="{x:Static System:Int32.MaxValue}" />
                            </Int32AnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                           Storyboard.TargetName="FocusHighlight">
                                <EasingDoubleKeyFrame KeyTime="0:0:0.3"
                                                      Value="0"
                                                      EasingFunction="{local:CircleEasing}" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                           Storyboard.TargetName="DropShadow">
                                <EasingDoubleKeyFrame KeyTime="0:0:0.3"
                                                      Value="0"
                                                      EasingFunction="{local:CircleEasing}" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(ScaleTransform.ScaleX)"
                                                           Storyboard.TargetName="ShadowScale">
                                <EasingDoubleKeyFrame KeyTime="0:0:0.3"
                                                      Value="0.75"
                                                      EasingFunction="{local:CircleEasing}" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(ScaleTransform.ScaleY)"
                                                           Storyboard.TargetName="ShadowScale">
                                <EasingDoubleKeyFrame KeyTime="0:0:0.3"
                                                      Value="0.75"
                                                      EasingFunction="{local:CircleEasing}" />
                            </DoubleAnimationUsingKeyFrames>
                            <Int32AnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.ZIndex)"
                                                          Storyboard.Target="{Binding RelativeSource={RelativeSource AncestorType=ContentPresenter}}">
                                <EasingInt32KeyFrame KeyTime="0:0:0.3"
                                                     Value="0"
                                                     EasingFunction="{local:CircleEasing}" />
                            </Int32AnimationUsingKeyFrames>
                        </local:UIStoryboard>
                        <Storyboard x:Key="TransitionOut" />
                    </ControlTemplate.Resources>
                    <Grid x:Name="OuterContainer">
                        <local:FZMaterial x:Name="DropShadow"
                                          Style="{DynamicResource A_Style_FZMaterial_ShadowBase_Dynamic}">
                            <local:FZMaterial.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform ScaleX="0"
                                                    ScaleY="0"
                                                    x:Name="ShadowScale" />
                                </TransformGroup>
                            </local:FZMaterial.RenderTransform>
                        </local:FZMaterial>

                        <Grid x:Name="ScaledContainer"
                              RenderTransformOrigin="0.5,0.5"
                              local:ZPanel.ZOffset="0"
                              Style="{DynamicResource A_Style_FrameworkElement_CarouselSelectionScale_Dynamic}">
                            <local:FZMaterial x:Name="FocusHighlight"
                                              Style="{DynamicResource A_FZMaterial_CarouselContainerHighlight_Dynamic}"
                                              Opacity="0" />
                            <!--local:FZMaterial Style="{StaticResource A_Style_FZMaterial_FlatPanel_Tile}" CaptureSubgraph="True"-->
                                <local:FZMaterial x:Name="ItemBackground"
                                                  Style="{DynamicResource A_Style_FZMaterial_RaiseFocusItemBackground_Dynamic}">
                                    <ContentPresenter />
                                </local:FZMaterial>
                            <!--/local:FZMaterial-->
                            <Control Style="{DynamicResource A_Style_Control_CarouselItem_MouseRollover_Dynamic}" />
                        </Grid>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="Selector.IsSelected"
                                 Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard x:Name="ShowSelected_BeginStoryboard2"
                                                 HandoffBehavior="SnapshotAndReplace"
                                                 Storyboard="{StaticResource SelectItemStory}" />
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard x:Name="HideSelected_BeginStoryboard2"
                                                 HandoffBehavior="SnapshotAndReplace"
                                                 Storyboard="{StaticResource DeselectItemStory}" />
                            </Trigger.ExitActions>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <CornerRadius x:Key="A_Dynamic_CornerRadius_Carousel_SelectionStroke">14</CornerRadius>
    <Thickness x:Key="A_Dynamic_Thickness_Carousel_SelectionStroke">8</Thickness>

    <Style x:Key="A_Style_ContentControl_Carousel_ContainerStyle"
           BasedOn="{StaticResource A_Style_ContentControl_Carousel_ContainerStyle_Internal}"
           TargetType="ContentControl">
        <Style.Resources>
            <local:FZMaterialPresetRoundtangleStroke x:Key="A_FZMaterialPresetRoundtangleStroke_CarouselContainerHighlight"
                                                     BasedOn="{StaticResource A_FZMaterialPresetRoundtangleStroke_Rollover}"
                                                     CornerRadius="{DynamicResource A_Dynamic_CornerRadius_Carousel_SelectionStroke}"
                                                     Thickness="{StaticResource A_Dynamic_Thickness_Carousel_SelectionStroke}" />
            <Style x:Key="A_FZMaterial_CarouselContainerHighlight_Dynamic"
                   TargetType="{x:Type local:FZMaterial}">
                <Setter Property="GreedyMeasure" Value="True" />
                <Setter Property="Margin" Value="-6,-6,-6,-6" />
                <Setter Property="IsHitTestVisible" Value="False" />
                <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangleStroke_CarouselContainerHighlight}" />
            </Style>
        </Style.Resources>
    </Style>

    <Style x:Key="A_Style_ContentControl_Carousel_ContainerStyle_SelectOnMouseHover"
           BasedOn="{StaticResource A_Style_ContentControl_Carousel_ContainerStyle}"
           TargetType="ContentControl">
        <Style.Resources>
            <Style x:Key="A_Style_Control_CarouselItem_MouseRollover_Dynamic"
                   BasedOn="{StaticResource A_Style_Control_CarouselItem_MouseRollover_AlwaysSelectWhenClicked}"
                   TargetType="{x:Type Control}" />
        </Style.Resources>
        <Setter Property="local:SetSelectedOnMouseOverBehaviour.Self"
                Value="True" />
    </Style>

    <Style x:Key="A_Style_ContentControl_Carousel_ContainerStyle_HitTestable"
           BasedOn="{StaticResource A_Style_ContentControl_Carousel_ContainerStyle}"
           TargetType="ContentControl">
        <Style.Resources>
            <Style x:Key="A_FZMaterial_CarouselContainerHighlight_Dynamic"
                   TargetType="{x:Type local:FZMaterial}">
                <Setter Property="GreedyMeasure" Value="True" />
                <Setter Property="Margin" Value="-6,-6,-6,-6" />
                <Setter Property="IsHitTestVisible" Value="True" />
                <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangleStroke_CarouselContainerHighlight}" />
            </Style>
        </Style.Resources>
    </Style>

    <ControlTemplate x:Key="A_ControlTemplate_CarouselItemContent_WithBottomHighlightTag"
                     TargetType="{x:Type ContentControl}">
        <StackPanel VerticalAlignment="Top">
            <ContentPresenter />
            <local:FZMaterial x:Name="HighlightLabel"
                              MinHeight="46"
                              Visibility="Collapsed"
                              IsEnabled="{Binding IsEnabled, RelativeSource={RelativeSource TemplatedParent}}"
                              Style="{StaticResource A_Style_FZMaterial_HighlightShadow}">
                <local:FZTextBlock Text="{Binding Tag, RelativeSource={RelativeSource TemplatedParent}}"
                                   Color="{StaticResource A_Color_Body_Text}"
                                   VerticalAlignment="Center"
                                   HorizontalAlignment="Center"
                                   Style="{StaticResource A_Style_FZTextBlock_HorizonB}"
                                   CapHeight="16" />
            </local:FZMaterial>
        </StackPanel>
        <ControlTemplate.Triggers>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding IsEnabled, ElementName=HighlightLabel}" 
                               Value="True" />
                    <Condition Binding="{Binding (Selector.IsSelected), RelativeSource={RelativeSource AncestorType=ListBoxItem}}"
                               Value="True" />
                </MultiDataTrigger.Conditions>
                <Setter TargetName="HighlightLabel"
                        Property="Visibility"
                        Value="Visible" />
            </MultiDataTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <!-- Styles using DataTemplates -->
    <Style x:Key="A_Style_Carousel6ItemList"
           TargetType="{x:Type local:ItemsSelector}">
        <Setter Property="FocusVisualStyle"
                Value="{StaticResource A_Style_BlankVisualStyle}" />
        <Setter Property="IsTabStop"
                Value="True" />
        <Setter Property="ClipToBounds"
                Value="True" />
        <Setter Property="Width"
                Value="1764" />
        <Setter Property="Height"
                Value="300" />
        <Setter Property="Canvas.Top"
                Value="684" />
        <Setter Property="Margin"
                Value="0,-30,0,0" />
        <Setter Property="ItemContainerStyle"
                Value="{StaticResource A_Style_ContentControl_Carousel_ContainerStyle}" />
        <Setter Property="ItemTemplate"
                Value="{StaticResource A_DataTemplate_Carousel_DefaultItemContent}" />
        <Setter Property="OnScrollMoveSoundName"
                Value="/Master/UI/PopUpMenu/HZ2_SFX_HUD_PopUpMenu_Move_01" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <local:VirtualizingScrollPanel Style="{StaticResource A_Style_VirtualizingScrollPanel_MotionBlurScrollPanel}"
                                                   ItemHeight="{StaticResource A_Double_Carousel6ItemHeight}"
                                                   ItemWidth="{StaticResource A_Double_Carousel6ItemWidthWithMargin}"
                                                   Padding="325,60,0,0"
                                                   Margin="-33,0,-30,-30" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type local:FZButton}"
           x:Key="A_Style_Button_Carousel_ScrollButton_Horizontal">
        <Setter Property="Template"
                Value="{StaticResource A_ControlTemplate_Button_ClickableButtonWithMouseRollover}" />
        <Setter Property="Focusable"
                Value="False" />
        <Setter Property="MinWidth"
                Value="50" />
        <Setter Property="VerticalAlignment"
                Value="Stretch" />
    </Style>

    <Style TargetType="local:FZMaterial"
           x:Key="A_Style_FZMaterial_Carousel_ScrollPageArrow"
           BasedOn="{StaticResource A_Style_FZMaterial_TabBar_ScrollPageArrow}">
        <Setter Property="Width"
                Value="20" />
        <Setter Property="Height"
                Value="30" />
        <Setter Property="Color"
                Value="{StaticResource A_Color_NavArrow_Foreground}" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding IsPressed, RelativeSource={RelativeSource AncestorType=Button}}"
                         Value="True">
                <Setter Property="Color"
                        Value="{StaticResource A_Color_Acrylic_Highlight}" />
            </DataTrigger>
            <DataTrigger Binding="{Binding IsEnabled, RelativeSource={RelativeSource AncestorType=Button}}"
                         Value="False">
                <Setter Property="Opacity"
                        Value="0.3" />
                <Setter Property="Color"
                        Value="#FFFFFFFF" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <ControlTemplate x:Key="A_ControlTemplate_NavigationArrows_Horizontal"
                     TargetType="{x:Type local:NavigationArrows}">
        <Grid>
            <local:FZButton x:Name="ScrollPrevButton"
                            HorizontalAlignment="Left"
                            Style="{StaticResource A_Style_Button_Carousel_ScrollButton_Horizontal}"
                            Command="{TemplateBinding ScrollPagePrevCommand}"
                            IsEnabled="{TemplateBinding CanSelectPrev}">
                <local:FZMaterial x:Name="LeftArrowMaterial"
                                  ImageSource="/ForzaUI;component/Textures/Anthem/Icons/scroll_page_arrow_left.png"
                                  Style="{StaticResource A_Style_FZMaterial_Carousel_ScrollPageArrow}" />
            </local:FZButton>
            <local:FZButton x:Name="ScrollNextButton"
                            HorizontalAlignment="Right"
                            Style="{StaticResource A_Style_Button_Carousel_ScrollButton_Horizontal}"
                            Command="{TemplateBinding ScrollPageNextCommand}"
                            IsEnabled="{TemplateBinding CanSelectNext}">
                <local:FZMaterial x:Name="RightArrowMaterial"
                                  ImageSource="/ForzaUI;component/Textures/Anthem/Icons/scroll_page_arrow_right.png"
                                  Style="{StaticResource A_Style_FZMaterial_Carousel_ScrollPageArrow}" />
            </local:FZButton>
        </Grid>
    </ControlTemplate>

    <Style x:Key="A_Style_Control_NavigationArrows"
           TargetType="{x:Type local:NavigationArrows}">
        <Setter Property="Focusable"
                Value="False" />
        <Setter Property="Height"
                Value="83" />
        <Setter Property="Margin"
                Value="-22,0,-22,0" />
        <Setter Property="VerticalAlignment"
                Value="Center" />
        <Setter Property="Template"
                Value="{StaticResource A_ControlTemplate_NavigationArrows_Horizontal}" />
        <Setter Property="Visibility"
                Value="{Binding IsPC, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_FZBooleanToVisibilityConverter}}" />
    </Style>

    <!-- DEPRECATED: We should be using A_Style_Carousel_7Item on a commonlistbox instead -->
    <Style TargetType="{x:Type local:ItemsSelector}"
           x:Key="A_Style_Carousel7ItemList">
        <Setter Property="FocusVisualStyle"
                Value="{StaticResource A_Style_BlankVisualStyle}" />
        <Setter Property="IsTabStop"
                Value="True" />
        <Setter Property="Width"
                Value="1764" />
        <Setter Property="Height"
                Value="180" />
        <Setter Property="ItemContainerStyle"
                Value="{StaticResource A_Style_ContentControl_Carousel_ContainerStyle}" />
        <Setter Property="OnScrollMoveSoundName"
                Value="/Master/UI/PopUpMenu/HZ2_SFX_HUD_PopUpMenu_Move_01" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:ItemsSelector}">
                    <Grid>
                        <Grid Width="1764"
                              ClipToBounds="True">
                            <local:VirtualizingScrollPanel Style="{StaticResource A_Style_VirtualizingScrollPanel_MotionBlurScrollPanel}"
                                                           ItemHeight="{StaticResource A_Double_Carousel7ItemHeight}"
                                                           ItemWidth="{StaticResource A_Double_Carousel7ItemWidthWithMargin}"
                                                           Padding="283,15,0,0"
                                                           VerticalAlignment="Center"
                                                           Margin="-30,0,-30,0" />
                        </Grid>
                        <Decorator Margin="0,0,0,6">
                            <local:NavigationArrows Style="{StaticResource A_Style_Control_NavigationArrows}"
                                                    CanSelectPrev="{TemplateBinding CanSelectPrev}"
                                                    CanSelectNext="{TemplateBinding CanSelectNext}"
                                                    ScrollPagePrevCommand="{TemplateBinding ScrollPagePrevCommand}"
                                                    ScrollPageNextCommand="{TemplateBinding ScrollPageNextCommand}" />
                        </Decorator>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="A_Style_FZMaterial_Carousel_ScrollArrow"
           TargetType="local:FZMaterial"
           BasedOn="{StaticResource A_Style_FZMaterial_ScrollArrow}">
        <Setter Property="Data"
                Value="{StaticResource A_Geometry_SpinnerArrow}" />
        <Setter Property="Width"
                Value="40" />
        <Setter Property="Height"
                Value="24" />
        <Setter Property="RenderTransformOrigin"
                Value="0.5,0.5" />
        <Setter Property="HorizontalAlignment"
                Value="Center" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding IsPressed, RelativeSource={RelativeSource AncestorType=Button}}"
                         Value="True">
                <Setter Property="Color"
                        Value="{StaticResource A_Color_Acrylic_Highlight}" />
            </DataTrigger>
            <DataTrigger Binding="{Binding IsEnabled, RelativeSource={RelativeSource AncestorType=Button}}"
                         Value="False">
                <Setter Property="Opacity"
                        Value="0.25" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Thickness x:Key="A_Thickness_LargeCarouselTileMargin">3.5,0,3.5,0</Thickness>
    <System:Double x:Key="A_Double_LargeCarouselTileWidth">558</System:Double>
    <System:Double x:Key="A_Double_LargeCarouselTileWidthWithMargin">565</System:Double>
    <System:Double x:Key="A_Double_LargeCarouselTileHeight">560</System:Double>

    <Style x:Key="A_Style_Control_LargeCarouselEmptyItemStyle"
           TargetType="{x:Type Control}">
        <Setter Property="Focusable"
                Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_AcrylicPanel_EmptyItem}"
                                      Width="{StaticResource A_Double_LargeCarouselTileWidth}"
                                      Height="{StaticResource A_Double_LargeCarouselTileHeight}"
                                      VerticalAlignment="Bottom"
                                      Margin="{StaticResource A_Thickness_LargeCarouselTileMargin}" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="A_Button_LargeCarouselMouseScrollButton"
           TargetType="local:FZButton">
        <Setter Property="MinWidth"
                Value="48" />
        <Setter Property="Width"
                Value="48" />
        <Setter Property="Height"
                Value="561" />
        <Setter Property="Visibility"
                Value="{Binding Path=IsPC, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_FZBooleanToVisibilityConverter}}" />
        <Setter Property="Template"
                Value="{StaticResource A_ControlTemplate_Button_ClickableButtonWithMouseRollover}" />
    </Style>

    <Style x:Key="A_Style_LargeCarousel3ItemList" TargetType="local:CommonListBox">
        <Setter Property="PageSize"
                Value="1" />
        <Setter Property="Width"
                Value="2240" />
        <Setter Property="Height"
                Value="590" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:CommonListBox">
                    <StackPanel Orientation="Horizontal">
                        <local:FZButton Style="{StaticResource A_Button_LargeCarouselMouseScrollButton}"
                                Command="{TemplateBinding ScrollPagePrevCommand}"
                                Margin="0,0,8,2"
                                IsEnabled="{Binding CanSelectPrev, RelativeSource={RelativeSource AncestorType=local:CommonListBox}}">
                            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_Carousel_ScrollArrow}">
                                <local:FZMaterial.RenderTransform>
                                    <RotateTransform Angle="90"/>
                                </local:FZMaterial.RenderTransform>
                            </local:FZMaterial>
                        </local:FZButton>
                        <Grid x:Name="ItemsPanelContainer"
                              Width="2240">
                            <local:FZScrollViewer Focusable="False" 
                                                  HorizontalScrollBarVisibility="Disabled" 
                                                  VerticalScrollBarVisibility="Disabled"
                                                  AllowMouseWheelScrolling="False">
                                <local:VirtualizingScrollPanel Style="{StaticResource A_Style_VirtualizingScrollPanel_MotionBlurScrollPanel}"
                                                               ItemHeight="{StaticResource A_Double_LargeCarouselTileHeight}"
                                                               ItemWidth="{StaticResource A_Double_LargeCarouselTileWidthWithMargin}"
                                                               Padding="678,14,0,35"
                                                               FocusItemIndex="2"
                                                               EmptyItemStyle="{StaticResource A_Style_Control_LargeCarouselEmptyItemStyle}"
                                                               Width="1920"
                                                               x:Name="ItemsPanel"/>
                            </local:FZScrollViewer>
                        </Grid>
                        <local:FZButton Style="{StaticResource A_Button_LargeCarouselMouseScrollButton}"
                                Command="{TemplateBinding ScrollPageNextCommand}"
                                Margin="8,0,0,2"
                                IsEnabled="{Binding CanSelectNext, RelativeSource={RelativeSource AncestorType=local:CommonListBox}}">
                            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_Carousel_ScrollArrow}">
                                <local:FZMaterial.RenderTransform>
                                    <RotateTransform Angle="270"/>
                                </local:FZMaterial.RenderTransform>
                            </local:FZMaterial>
                        </local:FZButton>
                    </StackPanel>
                    <ControlTemplate.Triggers>
                        <DataTrigger Binding="{Binding IsPC, RelativeSource={RelativeSource AncestorType=Page}}"
                                     Value="True">
                            <!-- On PC we reduce the width to 3 items wide & clip the rest -->
                            <Setter Property="Width"
                                    Value="1802" />
                            <Setter TargetName="ItemsPanelContainer"
                                    Property="Width"
                                    Value="1690" />
                            <Setter TargetName="ItemsPanel"
                                    Property="Padding"
                                    Value="560,14,0,35" />
                        </DataTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <ControlTemplate x:Key="A_ControlTemplate_InWorldScrollWidget">
        <ControlTemplate.Resources>
            <local:NumUnitConverter x:Key="A_NumUnitConverter_ItemNumber1Based"
                                    Add="1"
                                    FractionDigits="0"
                                    ShowUnit="False"
                                    PositiveSign="False" />
            <Style x:Key="A_Style_FZTextBlock_SelectedOutOfText"
                   TargetType="local:FZTextBlock"
                   BasedOn="{StaticResource A_Style_FZTextBlock_Heading_ExtraSmall_Tight}">
                <Setter Property="VerticalAlignment"
                        Value="Center" />
                <Setter Property="Color"
                        Value="{StaticResource A_Color_White}" />
                <Setter Property="Margin"
                        Value="4,0" />
                <Setter Property="FontSize"
                        Value="36" />
            </Style>

            <Style x:Key="A_Style_Button_InWorldScrollWidgetButton"
                   TargetType="{x:Type local:FZButton}">
                <Setter Property="Width"
                        Value="55" />
                <Setter Property="Height"
                        Value="55" />
                <Setter Property="MinWidth"
                        Value="55" />
                <Setter Property="MinHeight"
                        Value="55" />
                <Setter Property="Focusable"
                        Value="False" />
                <Setter Property="Template"
                        Value="{StaticResource A_ControlTemplate_Button_ClickableButtonWithMouseRollover}" />
            </Style>
        </ControlTemplate.Resources>
        <DockPanel x:Name="MouseScrollWidget"
                   Visibility="{Binding IsControllerActiveInput, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}, RelativeSource={RelativeSource AncestorType=Page}}"
                   Focusable="False">
            <Grid DockPanel.Dock="Top"
                  IsHitTestVisible="False">
                <local:FZMaterial x:Name="PositionBackground"
                                  Style="{StaticResource A_Style_FZMaterial_FlatPanel_HeaderPill}"
                                  IsHitTestVisible="False" Margin="0,0,0,6" Width="208" Height="51">
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_SelectedOutOfText}"
                                       Text="{Binding SelectedIndex, Converter={StaticResource A_NumUnitConverter_ItemNumber1Based}}"
                                       Margin="15,0,0,0" />
                        <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_SelectedOutOfText}"
                                       Text="/"
                                       Margin="1,1,0,0" />
                        <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_SelectedOutOfText}"
                                       Text="{Binding Items.Count}"
                                       Margin="1,0,15,0" />
                    </StackPanel>
                </local:FZMaterial>
            </Grid>
            
            <StackPanel Orientation="Horizontal">
                <local:FZButton x:Name="ScrollPrevButton"
                            HorizontalAlignment="Left"
                            Width="100" Height="51"
                            Style="{StaticResource A_Style_Button_Carousel_ScrollButton_Horizontal}"
                            Command="{Binding ScrollPagePrevCommand}"
                            IsEnabled="{Binding CanSelectPrev}">
                    <local:FZMaterial x:Name="LeftArrowMaterial"
                                  ImageSource="/ForzaUI;component/Textures/Anthem/Icons/scroll_page_arrow_left.png"
                                  Style="{StaticResource A_Style_FZMaterial_Carousel_ScrollPageArrow}" />
                </local:FZButton>
                <Decorator Width="6"/>
                <local:FZButton x:Name="ScrollNextButton"
                            HorizontalAlignment="Right"
                            Width="100" Height="51"
                            Style="{StaticResource A_Style_Button_Carousel_ScrollButton_Horizontal}"
                            Command="{Binding ScrollPageNextCommand}"
                            IsEnabled="{Binding CanSelectNext}">
                    <local:FZMaterial x:Name="RightArrowMaterial"
                                  ImageSource="/ForzaUI;component/Textures/Anthem/Icons/scroll_page_arrow_right.png"
                                  Style="{StaticResource A_Style_FZMaterial_Carousel_ScrollPageArrow}" />
                </local:FZButton>

            </StackPanel>
        </DockPanel>
    </ControlTemplate>


    <System:Double x:Key="ListItemWidthScale">-1</System:Double>

    <ControlTemplate x:Key="A_Template_Separator_CarouselItem">
        <ControlTemplate.Resources>
            <CornerRadius x:Key="A_CornerRadius_Car_Select_SeparatorLine_Inner">2</CornerRadius>
            <local:FZMaterialPresetGlassRoundtangle x:Key="A_FZMaterialPresetRoundtangle_FlatPanel_CarSelect_SeparatorLine_Inner"
                                                    BasedOn="{StaticResource A_FZMaterialPresetGlassRoundtangle_GlassPanel_Base}"
                                                    CornerRadius="{StaticResource A_CornerRadius_Car_Select_SeparatorLine_Inner}" />

            <Style x:Key="A_Style_FZMaterial_FlatPanel_Separator_Inner"
                   TargetType="{x:Type local:FZMaterial}"
                   BasedOn="{StaticResource A_Style_FZMaterial_FlatPanel_Base}">
                <Setter Property="Preset"
                        Value="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_CarSelect_SeparatorLine_Inner}" />
                <Setter Property="Color"
                        Value="{StaticResource A_Color_GlassPanel_Interactive}" />
            </Style>

        </ControlTemplate.Resources>
        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_FlatPanel_Separator_Inner}"
                          Width="3"
                          Margin="0,138,0,138" />
    </ControlTemplate>

    <Style x:Key="A_Style_Separator_CarouselItem"
           TargetType="ListBoxItem">
        <Setter Property="Focusable"
                Value="False" />
        <Setter Property="Width"
                Value="16" />
        <Setter Property="Template"
                Value="{StaticResource A_Template_Separator_CarouselItem}"/>
    </Style>

    <Storyboard x:Key="A_Storyboard_Carousel_InstantScroll">
        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(local:BlendValue.Blend)"
                                       Storyboard.TargetName="{x:Null}"
                                       FillBehavior="Stop">
            <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                    Value="0" />
            <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                  Value="1"/>
        </DoubleAnimationUsingKeyFrames>
    </Storyboard>

    <Storyboard x:Key="A_Storyboard_Carousel_SmoothScroll" >
        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(local:BlendValue.Blend)"
                                       Storyboard.TargetName="{x:Null}"
                                       FillBehavior="Stop">
            <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                    Value="0" />
            <EasingDoubleKeyFrame KeyTime="0:0:0.267"
                                  Value="1"
                                  EasingFunction="{local:QuarticEasing EasingMode=EaseOut}" />
        </DoubleAnimationUsingKeyFrames>
    </Storyboard>

    <System:Int32 x:Key="A_Int32_DisableMotionBlur">0</System:Int32>
    <System:Int32 x:Key="A_Int32_EnableMotionBlur">1</System:Int32>

    <Storyboard x:Key="A_Storyboard_Carousel_SmoothScrollWithMotionBlur" >
        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(local:BlendValue.Blend)"
                                       Storyboard.TargetName="{x:Null}"
                                       FillBehavior="Stop">
            <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                    Value="0" />
            <EasingDoubleKeyFrame KeyTime="0:0:0.267"
                                  Value="1"
                                  EasingFunction="{local:QuarticEasing EasingMode=EaseOut}" />
        </DoubleAnimationUsingKeyFrames>
        <Int32AnimationUsingKeyFrames Storyboard.TargetProperty="(local:MaxValue.A)"
                                       Storyboard.TargetName="{x:Null}"
                                       FillBehavior="Stop">
            <DiscreteInt32KeyFrame KeyTime="0:0:0"
                                    Value="{StaticResource A_Int32_EnableMotionBlur}"/>
            <DiscreteInt32KeyFrame KeyTime="0:0:0.267"
                                    Value="{StaticResource A_Int32_EnableMotionBlur}"/>
        </Int32AnimationUsingKeyFrames>
    </Storyboard>
    

    <local:LinearTransformConverter x:Key="A_Converter_Carousel_ScrollOffset"
                                    Scale="{StaticResource ListItemWidthScale}" />

    <DataTemplate x:Key="A_DataTemplate_ListItem_TileMenu">
        <Grid>
            <Grid RenderTransformOrigin="0.5,0.5"
                  local:ZPanel.ZOffset="0">
                <local:FZMaterial x:Name="Icon"
                                  Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterAll}"
                                  ImageSource="{Binding IconPath}"
                                  Stretch="Uniform" />
                <StackPanel Orientation="Horizontal"
                            HorizontalAlignment="Right"
                            VerticalAlignment="Top"
                            Margin="8">
                    <local:FZMaterial x:Name="SnowIcon"
                                      Visibility="{Binding IsSnowPart, Converter={StaticResource A_FZBooleanToVisibilityConverter}, FallbackValue={x:Static Visibility.Collapsed}}"
                                      Style="{StaticResource A_Style_FZMaterial_CarSelectCarouselItem_StatusIconBackground}">
                        <local:FZMaterial ImageSource="/ForzaUI;component/Textures/Anthem/A_SnowParts.png"
                                          Style="{StaticResource A_Style_FZMaterial_CarSelectCarouselItem_StatusIcon}" />
                    </local:FZMaterial>
                    <local:FZMaterial x:Name="BasketIcon"
                                      Visibility="Collapsed"
                                      Style="{StaticResource A_Style_FZMaterial_CarSelectCarouselItem_StatusIconBackground}"
                                      Margin="4,0,0,0">
                        <local:FZMaterial ImageSource="/ForzaUI;component/Textures/Anthem/Icons/Garage/Basket_Icon_Carousel.png"
                                          Style="{StaticResource A_Style_FZMaterial_CarSelectCarouselItem_StatusIcon}" />
                    </local:FZMaterial>
                    <local:FZMaterial x:Name="NewBlammo"
                                      Visibility="Collapsed"
                                      Style="{StaticResource A_Style_FZMaterial_CarSelectCarouselItem_StatusIconBackground}"
                                      Margin="4,0,0,0">
                        <Decorator Margin="6,0,6,0">
                            <local:FZTextBlock Text="{local:Loc InGameMarketplace.IDS_New}"
                                               MaxWidth="68"
                                               Style="{StaticResource A_Style_FZTextBlock_HorizonA}"
                                               Color="{StaticResource A_Color_Body_Text}"
                                               FontSize="20"
                                               VerticalAlignment="Center"/>
                        </Decorator>
                    </local:FZMaterial>
                </StackPanel>

                <Decorator x:Name="UpgradedPartInfo" 
                            Visibility="Collapsed"
                                HorizontalAlignment="Right"
                                VerticalAlignment="Bottom"
                                Margin="8">
                    <local:FZMaterial Style="{StaticResource A_Style_FZTextBlock_UpgradeStat_TextBackground}"
                                        Tag="{Binding UpgradeSummary.Quality, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}"
                                        Visibility="{Binding UpgradeSummary.Change, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}, Converter={StaticResource A_StringVisConverter}, FallbackValue={x:Static Visibility.Collapsed}}">
                        <Viewbox Margin="6"
                                 StretchDirection="DownOnly">
                            <StackPanel Orientation="Horizontal">
                                <StackPanel Orientation="Horizontal"
                                            Visibility="{Binding UpgradeSummary.Dimension, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}, Converter={StaticResource A_StringVisConverter}, FallbackValue={x:Static Visibility.Collapsed}}">
                                    <local:FZTextBlock Text="{Binding UpgradeSummary.Dimension, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}"
                                                       Tag="{Binding UpgradeSummary.Quality, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}"
                                                       Style="{StaticResource A_Style_FZTextBlock_UpgradeStat_TextForeground}"
                                                       FontSize="20"
                                                       VerticalAlignment="Center" />
                                    <Decorator Width="6" />
                                </StackPanel>
                                <local:FZTextBlock Text="{Binding UpgradeSummary.Change, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}"
                                                   Tag="{Binding UpgradeSummary.Quality, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}"
                                                   Style="{StaticResource A_Style_FZTextBlock_UpgradeStat_TextForeground}"
                                                   FontSize="20"
                                                   VerticalAlignment="Center" />
                            </StackPanel>
                        </Viewbox>
                    </local:FZMaterial>
                </Decorator>
            </Grid>
        </Grid>
        <DataTemplate.Triggers>
            <DataTrigger Binding="{Binding Path=(Selector.IsSelected), RelativeSource={RelativeSource TemplatedParent}}"
                         Value="True">
                <Setter TargetName="UpgradedPartInfo"
                        Property="Visibility"
                        Value="Visible" />
            </DataTrigger>
            <DataTrigger Binding="{Binding InBasket}"
                         Value="1">
                <Setter TargetName="BasketIcon"
                        Property="Visibility"
                        Value="Visible" />
            </DataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding IsNew}"
                               Value="1" />
                    <Condition Binding="{Binding HasRolledOverNewItem, RelativeSource={RelativeSource AncestorType={x:Type Page}}}"
                               Value="False" />
                </MultiDataTrigger.Conditions>
                <MultiDataTrigger.Setters>
                    <Setter TargetName="NewBlammo"
                            Property="Visibility"
                            Value="Visible" />
                </MultiDataTrigger.Setters>
            </MultiDataTrigger>
        </DataTemplate.Triggers>
    </DataTemplate>

    <Style x:Key="A_VirtualizingWrapPanel_Default"
           TargetType="local:VirtualizingWrapPanel">
        <!-- This prevents the initial selection animation being visible. -->
        <Setter Property="local:BlendValue.Input"
                Value="{Binding SelectionWindowOffset, RelativeSource={RelativeSource Self}, Converter={StaticResource A_Converter_Carousel_ScrollOffset}}" />
        <Setter Property="local:BlendValue.InputChangedStoryboard"
                Value="{StaticResource A_Storyboard_Carousel_SmoothScroll}" />
        <Setter Property="local:BindingProxy.A" Value="0.0"/>
        <Setter Property="local:BindingProxy.B" Value="0.0"/>
        <Setter Property="RenderTransform">
            <Setter.Value>
                <TranslateTransform X="{Binding Path=(local:BindingProxy.A), RelativeSource={RelativeSource AncestorType=local:VirtualizingWrapPanel}}"
                                    Y="{Binding Path=(local:BindingProxy.B), RelativeSource={RelativeSource AncestorType=local:VirtualizingWrapPanel}}"/>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="SelectionWindowOffset"
                     Value="0"> 
                <Setter Property="local:BlendValue.InputChangedStoryboard"
                        Value="{StaticResource A_Storyboard_Carousel_InstantScroll}" />
            </Trigger>
            <Trigger Property="ScrollOrientation"
                     Value="Horizontal">
                <Setter Property="local:BindingProxy.A"
                        Value="{Binding Path=(local:BlendValue.Output), RelativeSource={RelativeSource Self}}" />
            </Trigger>
            <Trigger Property="ScrollOrientation"
                     Value="Vertical">
                <Setter Property="local:BindingProxy.B"
                        Value="{Binding Path=(local:BlendValue.Output), RelativeSource={RelativeSource Self}}" />
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="A_VirtualizingWrapPanel_Default_Dynamic"
        TargetType="local:VirtualizingWrapPanel"
        BasedOn="{StaticResource A_VirtualizingWrapPanel_Default}">
        <Setter Property="local:MaxValue.A" Value="{StaticResource A_Int32_EnableMotionBlur}"/>
        <Setter Property="local:MaxValue.B" Value="{StaticResource A_Int32_EnableMotionBlur}"/>
    </Style>
    
    <ControlTemplate x:Key="A_ControlTemplate_Carousel_Default"
                     TargetType="{x:Type local:WrapListBox}">
        <ControlTemplate.Resources>
            <Style x:Key="A_Style_Control_Carousel_EmptyItemStyle_Dynamic"
                   BasedOn="{StaticResource A_Style_Control_Carousel_EmptyItemStyle}"
                   TargetType="Control" />
                   
            <Style x:Key="A_Style_FZMaterial_ShadowBase_Dynamic"
                    TargetType="local:FZMaterial"
                    BasedOn="{StaticResource A_Style_FZMaterial_ShadowBase_Dynamic}">
                <Setter Property="Preset">
                    <Setter.Value>
                        <local:FZMaterialPresetRoundtangle Softness="20" CornerRadius="25" AlphaMode="MultiplyInvColorOnly" Unlit="True" />
                    </Setter.Value>
                </Setter>
            </Style>
        </ControlTemplate.Resources>
        <Grid Margin="-60">
            <Grid Effect="{StaticResource A_MotionBlurEffect}"
                  local:MotionBlurEffect.MotionBlurPositionXControl="{Binding Path=(local:BindingProxy.A), ElementName=VirtualizingWrapPanel}"
                  local:MotionBlurEffect.MotionBlurPositionYControl="{Binding Path=(local:BindingProxy.B), ElementName=VirtualizingWrapPanel}"
                  ClipToBounds="True"
                  x:Name="MotionBlur">
                <Decorator Margin="40"
                            ClipToBounds="True">
                    <Grid Margin="20"
                            ClipToBounds="True"
                            x:Name="ScrollClipper">
                        <local:VirtualizingWrapPanel IsItemsHost="True"
                                                     KeyboardNavigation.DirectionalNavigation="Contained"
                                                     OverrideAcrossNavigation="{TemplateBinding OverrideAcrossNavigation}"
                                                     ScrollOrientation="{TemplateBinding ScrollOrientation}"
                                                     Margin="0"
                                                     Style="{DynamicResource A_VirtualizingWrapPanel_Default_Dynamic}"
                                                     ItemWidth="{TemplateBinding ItemWidth}"
                                                     ItemHeight="{TemplateBinding ItemHeight}"
                                                     EmptyItemStyle="{DynamicResource A_Style_Control_Carousel_EmptyItemStyle_Dynamic}"
                                                     SeparatorItemStyle="{StaticResource A_Style_Separator_CarouselItem}"
                                                     local:BlendValue.ShouldSkipInitialInputChange="True"
                                                     local:BlendValue.BlendFromPreviousOutput="True"
                                                     SelectionLimitTop="{TemplateBinding SelectionLimitTop}"
                                                     SelectionLimitBottom="{TemplateBinding SelectionLimitBottom}"
                                                     ScrollWindowMin="{Binding ScrollWindowMin, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWayToSource}"
                                                     ScrollWindowMax="{Binding ScrollWindowMax, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWayToSource}"
                                                     ScrollWindowSize="{Binding ScrollWindowSize, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWayToSource}"
                                                     ScrollWindowValue="{Binding ScrollWindowValue, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                                                     x:Name="VirtualizingWrapPanel" />
                    </Grid>
                </Decorator>
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <DataTrigger Binding="{Binding (local:MaxValue.Result), ElementName=VirtualizingWrapPanel}" Value="0">
                <Setter Property="Effect" TargetName="MotionBlur" Value="{x:Null}"/>
            </DataTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <System:Double x:Key="A_Double_Carousel_Square_10Item_Tile_Space">174</System:Double>
    <System:Double x:Key="A_Double_Carousel_Square_10Item_Total_Width">1734</System:Double>
    <System:Double x:Key="A_Double_Carousel_Square_10Item_FixedOffset">348</System:Double> <!-- 2x Tile space -->
    
    <Style TargetType="local:WrapListBox"
           x:Key="A_Style_Carousel_Square_10Item">
        <Setter Property="Template"
                Value="{StaticResource A_ControlTemplate_Carousel_Default}" />
        <Setter Property="ItemContainerStyle"
                Value="{StaticResource A_Style_ContentControl_Carousel_ContainerStyle}" />
        <Setter Property="ItemTemplate"
                Value="{StaticResource A_DataTemplate_ListItem_TileMenu}" />
        <Setter Property="Height"
                Value="{StaticResource A_Double_Carousel_Square_10Item_Tile_Space}" />
        <Setter Property="Width"
                Value="{StaticResource A_Double_Carousel_Square_10Item_Total_Width}" />
        <Setter Property="ItemWidth"
                Value="{StaticResource A_Double_Carousel_Square_10Item_Tile_Space}" />
        <Setter Property="ItemHeight"
                Value="{StaticResource A_Double_Carousel_Square_10Item_Tile_Space}" />
        <Setter Property="SelectionLimitTop"
                Value="{StaticResource A_Double_Carousel_Square_10Item_FixedOffset}" />
    </Style>

    <System:Double x:Key="A_Double_Carousel_7Item_Tile_Width">252</System:Double>
    <System:Double x:Key="A_Double_Carousel_7Item_Tile_Height">156</System:Double>
    <System:Double x:Key="A_Double_Carousel_7Item_Total_Width">1764</System:Double>

    <ControlTemplate TargetType="{x:Type ContentControl}"
                     x:Key="A_Template_ContentControl_SelectorContainer_PageButtons">
        <Grid>
            <ContentPresenter />
            <Decorator Margin="0,0,0,6">
                <local:NavigationArrows Style="{StaticResource A_Style_Control_NavigationArrows}"
                                        CanSelectPrev="{Binding Content.CanSelectPrev, RelativeSource={RelativeSource TemplatedParent}}"
                                        CanSelectNext="{Binding Content.CanSelectNext, RelativeSource={RelativeSource TemplatedParent}}"
                                        ScrollPagePrevCommand="{Binding Content.ScrollPagePrevCommand, RelativeSource={RelativeSource TemplatedParent}}"
                                        ScrollPageNextCommand="{Binding Content.ScrollPageNextCommand, RelativeSource={RelativeSource TemplatedParent}}" />
            </Decorator>
        </Grid>
    </ControlTemplate>

    <Style TargetType="local:WrapListBox"
           x:Key="A_Style_Carousel_7Item">
        <Setter Property="Template"
                Value="{StaticResource A_ControlTemplate_Carousel_Default}" />
        <Setter Property="ItemContainerStyle"
                Value="{StaticResource A_Style_ContentControl_Carousel_ContainerStyle}" />
        <Setter Property="ItemTemplate"
                Value="{StaticResource A_DataTemplate_ListItem_TileMenu}" />
        <Setter Property="Height"
                Value="{StaticResource A_Double_Carousel_7Item_Tile_Height}" />
        <Setter Property="Width"
                Value="{StaticResource A_Double_Carousel_7Item_Total_Width}" />
        <Setter Property="ItemWidth"
                Value="{StaticResource A_Double_Carousel_7Item_Tile_Width}" />
        <Setter Property="ItemHeight"
                Value="{StaticResource A_Double_Carousel_7Item_Tile_Height}" />
        <Setter Property="SelectionLimitTop"
                Value="{StaticResource A_Double_Carousel_7Item_Tile_Width}" />
    </Style>

    <System:Double x:Key="A_Double_FullScreenCarousel_ListItemWidthScale">-1</System:Double>
    <System:Double x:Key="A_Double_FullScreenCarousel_ListItemWidthOffset">568</System:Double>
    <System:Double x:Key="A_Double_FullScreenCarousel_ListItemWidth">348</System:Double>
    <System:Double x:Key="A_Double_FullScreenCarousel_ListItemHeight">219</System:Double>
    <System:Double x:Key="A_Double_FullScreenCarousel_ListHeight">660</System:Double>

    <local:LinearTransformConverter x:Key="A_Converter_FullScreenCarousel_HorizontalScrollMod"
                                    Scale="{StaticResource A_Double_FullScreenCarousel_ListItemWidthScale}"
                                    Add="{StaticResource A_Double_FullScreenCarousel_ListItemWidthOffset}"/>

    <Style x:Key="A_Style_ListBoxItem_FullScreenCarousel_SeparatorItemStyle"
           TargetType="ListBoxItem">
        <Setter Property="Focusable" Value="False" />
        <Setter Property="Width" Value="24" />
        <Setter Property="Height" Value="{StaticResource A_Double_FullScreenCarousel_ListHeight}" />
        <Setter Property="Margin" Value="-6,0,0,0" /> <!-- Items have a 6 right-margin on them as padding, counter for this so we're centered -->
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <ControlTemplate.Resources>
                        <CornerRadius x:Key="A_CornerRadius_FullScreenCarousel_SeparatorLine_Inner">2</CornerRadius>
                        <local:FZMaterialPresetGlassRoundtangle x:Key="A_FZMaterialPresetRoundtangle_FlatPanel_FullScreenCarousel_SeparatorLine_Inner"
                                                                BasedOn="{StaticResource A_FZMaterialPresetGlassRoundtangle_GlassPanel_Base}"
                                                                CornerRadius="{StaticResource A_CornerRadius_FullScreenCarousel_SeparatorLine_Inner}"/>

                        <Style x:Key="A_Style_FZMaterial_FlatPanel_Separator_Inner"
                               TargetType="{x:Type local:FZMaterial}"
                               BasedOn="{StaticResource A_Style_FZMaterial_FlatPanel_Base}">
                            <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_FullScreenCarousel_SeparatorLine_Inner}"/>
                            <Setter Property="Color" Value="{StaticResource A_Color_GlassPanel_Interactive}"/>
                        </Style>

                    </ControlTemplate.Resources>
                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_FlatPanel_Separator_Inner}"
                                      Width="3"
                                      Margin="0,138,0,138" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <ControlTemplate x:Key="A_ControlTemplate_FullScreenCarousel_WrapPanel" TargetType="{x:Type local:CommonListBox}">
        <local:VirtualizingWrapPanel IsItemsHost="True"
                                     ScrollOrientation="Horizontal"
                                     ItemWidth="{StaticResource A_Double_FullScreenCarousel_ListItemWidth}"
                                     ItemHeight="{StaticResource A_Double_FullScreenCarousel_ListItemHeight}"
                                     EmptyItemStyle="{StaticResource A_Style_Control_Carousel_EmptyItemStyle}"
                                     SeparatorItemStyle="{StaticResource A_Style_ListBoxItem_FullScreenCarousel_SeparatorItemStyle}"
                                     SeparatorPlacement="{Binding SeparatorPlacementFunc, RelativeSource={RelativeSource AncestorType=Page}}"
                                     SelectionLimitTop="{StaticResource A_Double_FullScreenCarousel_ListItemWidthOffset}"
                                     Style="{StaticResource A_VirtualizingWrapPanel_Default}">
                               <!-- TODO: Add motion blur effect, it looks very low res when added to this panel
                                  local:MotionBlurEffect.MotionBlurPositionXControl="{Binding (UIElement.RenderTransform).(TranslateTransform.X), RelativeSource={RelativeSource Self}}"
                                  Effect="{StaticResource A_MotionBlurEffect}"
                               -->
            <local:VirtualizingWrapPanel.RenderTransform>
                <TranslateTransform X="{Binding Path=(local:BlendValue.Output), RelativeSource={RelativeSource AncestorType=VirtualizingWrapPanel}}" />
            </local:VirtualizingWrapPanel.RenderTransform>
        </local:VirtualizingWrapPanel>
    </ControlTemplate>

    <Style x:Key="A_Style_CommonListBox_FullScreenCarousel"
           TargetType="{x:Type local:CommonListBox}">
        <Setter Property="Template"
                Value="{StaticResource A_ControlTemplate_FullScreenCarousel_WrapPanel}" />
        <Setter Property="VerticalAlignment" 
                Value="Center" />
        <Setter Property="HorizontalAlignment" 
                Value="Center" />
        <Setter Property="ItemContainerStyle"
                Value="{StaticResource A_Style_ContentControl_Carousel_ContainerStyle}" />
        <Setter Property="ScrollViewer.CanContentScroll" 
                Value="False" />
        <Setter Property="Height" 
                Value="{StaticResource A_Double_FullScreenCarousel_ListHeight}" />
        <Setter Property="Margin" 
                Value="-93,0,0,-7" />
        <Setter Property="Width" 
                Value="{Binding Width, RelativeSource={RelativeSource AncestorType=Page}}" />
    </Style>

    <System:Double x:Key="A_Double_FullScreenCarousel_SidePanelHeight">699</System:Double>

    <Style x:Key="A_Style_FrameworkElement_FullScreenCarousel_SidePanel"
           TargetType="{x:Type FrameworkElement}">
        <Setter Property="Height"
                Value="{StaticResource A_Double_FullScreenCarousel_SidePanelHeight}" />
        <Setter Property="Width"
                Value="342" />
    </Style>

</ResourceDictionary>