<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>




    <Style x:Key="A_Style_FZTextBlock_CreatorInfo_Gamertag"
           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" />
        <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="{DynamicResource A_Opacity_Dynamic_CarouselTile}">
                <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}"
                              Color="{StaticResource H_Color_Glass_Purple_60pc}"
                              Margin="{DynamicResource A_Margin_Dynamic_CarouselTile}">
                <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_EqualMargin"
       TargetType="Control"
       BasedOn="{StaticResource A_Style_Control_Carousel_EmptyItemStyle_NoMargin}">
        <Setter Property="Margin"
            Value="4,4,4,4"/>
    </Style>

    <Style x:Key="A_Style_Control_Carousel_EmptyItemStyle_Vertical_Item"
       TargetType="Control"
       BasedOn="{StaticResource A_Style_Control_Carousel_EmptyItemStyle_NoMargin}">
        <Style.Resources>
            <CornerRadius x:Key="A_CornerRadius_Dynamic_CarouselTile">0</CornerRadius>
            <System:Double x:Key="A_Opacity_Dynamic_CarouselTile">0.0</System:Double>
            <Margin x:Key="A_Margin_Dynamic_CarouselTile">0</Margin>
        </Style.Resources>
        <Setter Property="Margin" Value="8,2,0,2"/>
    </Style>


    <Style x:Key="A_Style_Control_Carousel_EmptyItemStyle_Empty"
           TargetType="Control"
           BasedOn="{StaticResource H_Style_TemplatedElement_Empty}"/>

    <Style x:Key="A_Style_VirtualizingScrollPanel_MotionBlurScrollPanel"
           TargetType="{x:Type local:VirtualizingScrollPanel}"
           BasedOn="{StaticResource H_Style_MotionBlurScrollPanel}"/>

    <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>



    <CornerRadius  x:Key="A_CornerRadius_Dynamic_CarouselTile">8</CornerRadius>
    <System:Double x:Key="A_Opacity_Dynamic_CarouselTile">0.3</System:Double>
    <System:Double x:Key="A_Opacity_Dynamic_CarouselTile">0.3</System:Double>
    <Margin        x:Key="A_Margin_Dynamic_CarouselTile">1</Margin>


    <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_FrameworkElement_CarouselSelectionScale"
           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.00" />
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.RenderTransform).(ScaleTransform.ScaleY)">
                                    <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                                            Value="1.00" />
                                </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>

    <Style x:Key="H_Dynamic_Style_StrokeHighlight_Carousel"
           TargetType="{Type StrokeHighlightControl}"
           BasedOn="{StaticResource H_Style_StrokeHighlight_Animated}"/>

    <!-- DataTemplates -->
    <Style x:Key="A_Style_ContentControl_Carousel_ContainerStyle_Internal"
           TargetType="ContentControl">
        <Setter Property="Margin"
                Value="0,0,6,6" />
        <Setter Property="Focusable"
                Value="True" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ContentControl}">
                    <ControlTemplate.Resources>
                        <local:MappingConverter x:Key="A_Converter_InvisibleIfOpaque" Default="0">
                            <local:MappingConverterEntry Key="0" Value="1" />
                        </local:MappingConverter>
                        <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" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(ScaleTransform.ScaleY)"
                                                           Storyboard.TargetName="ShadowScale">
                                <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                                        Value="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.0"
                                                      EasingFunction="{local:CircleEasing}" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(ScaleTransform.ScaleY)"
                                                           Storyboard.TargetName="ShadowScale">
                                <EasingDoubleKeyFrame KeyTime="0:0:0.3"
                                                      Value="0.0"
                                                      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="PART_TransitionOut" />
                        <Style x:Key="H_Style_TemplatedElement_MouseRollover" TargetType="{x:Type Control}" 
                                BasedOn="{StaticResource H_Style_TemplatedElement_MouseRollover_ListBoxItem}"/>
                    </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="{StaticResource A_Style_FrameworkElement_CarouselSelectionScale}">
                            <StrokeHighlightControl x:Name="FocusHighlight"
                                                    Style="{DynamicResource H_Dynamic_Style_StrokeHighlight_Carousel}"
                                                    ContentRadius="{Binding Preset.CornerRadius, ElementName=ItemBackground, FallbackValue=3}"
                                                    Opacity="0" 
                                                    IsEnabled="{Binding (Selector.IsSelected), FallbackValue=False, RelativeSource={RelativeSource TemplatedParent}}"/>
                            <local:FZMaterial x:Name="ItemBackground"
                                              Style="{DynamicResource A_Style_FZMaterial_RaiseFocusItemBackground_Dynamic}">
                                <ContentPresenter />
                            </local:FZMaterial>
                            <Control Style="{DynamicResource H_Style_TemplatedElement_MouseRollover}" Opacity="{Binding IsEnabled, ElementName=FocusHighlight, Converter={StaticResource A_Converter_OpaqueIfIsNotEnabled}, FallbackValue=0}" >
                                <DynamicData.Data>
                                    <DynamicDataSource>
                                        <DynamicDataItem Name="MouseRolloverCornerRadius" Value="{Binding Preset.CornerRadius, ElementName=ItemBackground, FallbackValue=3}"/>
                                    </DynamicDataSource>
                                </DynamicData.Data>
                            </Control>
                        </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.Triggers>
            <!-- It's important this is done this way rather than setting IsSelected directly -->
            <!-- because this way we never directly set it to false, so lists won't lose their -->
            <!-- selected items when they lose focus -->
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
                <Trigger.EnterActions>
                    <RaiseRoutedEvent RoutedEvent="Selector.Selected"/>
                </Trigger.EnterActions>
            </Trigger>
            <Trigger Property="Selector.IsSelected" Value="True">
                <Setter Property="FocusSelf.WhenTrue" Value="True" />
            </Trigger>
        </Style.Triggers>
    </Style>


    <Style x:Key="A_Style_ContentControl_Carousel_ContainerStyle"
           BasedOn="{StaticResource A_Style_ContentControl_Carousel_ContainerStyle_Internal}"
           TargetType="ContentControl">
    </Style>

    <Style x:Key="A_Style_ContentControl_Carousel_ContainerStyle_Vertical_Item"
         BasedOn="{StaticResource A_Style_ContentControl_Carousel_ContainerStyle}"
         TargetType="ContentControl">
        <!--<Setter Property="HorizontalAlignment" Value="Left" />-->

        <Setter Property="Margin" Value="8,2,0,2"/>
    </Style>
    
    <Style x:Key="A_Style_ContentControl_Carousel_ContainerStyle_SelectOnMouseHover"
           BasedOn="{StaticResource A_Style_ContentControl_Carousel_ContainerStyle}"
           TargetType="ContentControl">
        <Setter Property="local:SetSelectedOnMouseOverBehaviour.Self"
                Value="True" />
    </Style>

    <ControlTemplate x:Key="A_ControlTemplate_CarouselItemContent_WithBottomHighlightTag"
                     TargetType="{x:Type ContentControl}">
        <Grid x:Name="RootGrid" VerticalAlignment="Stretch">
            <ContentPresenter />
        </Grid>
    </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="24" />
        <Setter Property="VerticalAlignment"
                Value="Stretch" />
    </Style>

    <Style TargetType="{x:Type local:FZButton}"
           x:Key="A_Style_Button_Carousel_ScrollButton_Vertical">
        <Setter Property="Template"
                Value="{StaticResource A_ControlTemplate_Button_ClickableButtonWithMouseRollover}" />
        <Setter Property="Focusable"
                Value="False" />       
    </Style>

    <Style TargetType="local:FZMaterial"
           x:Key="A_Style_FZMaterial_Carousel_ScrollPageArrow"
           BasedOn="{StaticResource H_Style_ScrollPageArrow}">
        <Setter Property="Width"
                Value="14" />
        <Setter Property="Height"
                Value="15" />
        <Setter Property="Color"
                Value="{StaticResource H_Color_Primary_Black}" />
        <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>

 
        <ControlTemplate x:Key="A_ControlTemplate_NavigationArrows_Vertical"
                     TargetType="{x:Type local:NavigationArrows}">
        <Grid>
            <local:FZButton x:Name="ScrollUpPrevButton"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Top"
                            Style="{StaticResource A_Style_Button_Carousel_ScrollButton_Vertical}"
                            Command="{TemplateBinding ScrollPagePrevCommand}"
                            IsEnabled="{TemplateBinding CanSelectPrev}">
                <local:FZMaterial x:Name="UpArrowMaterial"
                                  Height = "10"
                                  Width = "15"  
                                  Color="{StaticResource H_Color_Primary_Purple}">
                    <local:FZMaterial.Data>
                          <local:FZGeometry Data="M 0,0 L 1,-1, 2,0" />
                    </local:FZMaterial.Data>
                </local:FZMaterial>                
            </local:FZButton>
            <local:FZButton x:Name="ScrollDownNextButton"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Bottom"
                            Style="{StaticResource A_Style_Button_Carousel_ScrollButton_Vertical}"
                            Command="{TemplateBinding ScrollPageNextCommand}"
                            IsEnabled="{TemplateBinding CanSelectNext}">
                 <local:FZMaterial x:Name="DownArrowMaterial"
                                  Height = "10"
                                  Width = "15"  
                                  Color="{StaticResource H_Color_Primary_Purple}">
                    <local:FZMaterial.Data>
                          <local:FZGeometry Data="M 0,0 L 1,1, 2,0" />
                    </local:FZMaterial.Data>
                </local:FZMaterial>
            </local:FZButton>
        </Grid>
    </ControlTemplate>
 
    <Style x:Key="A_Style_Control_NavigationArrows"
           TargetType="{x:Type local:NavigationArrows}">
        <Setter Property="Focusable"
                Value="False" />
        <Setter Property="Margin"
                Value="-28,0,-28,0" />
        <Setter Property="VerticalAlignment"
                Value="Stretch" />
        <Setter Property="Template"
                Value="{StaticResource A_ControlTemplate_NavigationArrows_Horizontal}" />
        <Setter Property="Visibility"
                Value="{Binding IsControllerActiveInput, Converter={FZBooleanToVisibilityConverter InvertResult=True}}" />
    </Style>
 
  <Style x:Key="A_Style_Control_NavigationArrows_Vertical"
           TargetType="{x:Type local:NavigationArrows}">
        <Setter Property="Focusable"
                Value="False" />
        <Setter Property="Height"
                Value="auto" />
        <Setter Property="Margin"
                Value="0,0,0,0" />
        <Setter Property="VerticalAlignment"
                Value="Stretch" />
        <Setter Property="HorizontalAlignment"
                Value="Center" />
        <Setter Property="Template"
                Value="{StaticResource A_ControlTemplate_NavigationArrows_Vertical}" />
        <Setter Property="Visibility"
                Value="{Binding IsControllerActiveInput, Converter={FZBooleanToVisibilityConverter InvertResult=True}}" />
    </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>




    <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>

        </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,9" Width="207" Height="54">
                    <StackPanel  LayoutTransform="{StaticResource A_Transform_Italic}" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_SelectedOutOfText}"
                                       CapHeight="32"
                                       Text="{Binding SelectedIndex, Converter={StaticResource A_NumUnitConverter_ItemNumber1Based}}"
                                       Margin="15,0,0,0" />
                        <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_SelectedOutOfText}"
                                       CapHeight="32"
                                       Text="/"
                                       Margin="1,1,0,0" />
                        <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_SelectedOutOfText}"
                                       CapHeight="32"
                                       Text="{Binding Items.Count}"
                                       Margin="1,0,15,0" />
                    </StackPanel>
                </local:FZMaterial>
            </Grid>
            
            <StackPanel Orientation="Horizontal">
                <local:FZButton x:Name="ScrollPrevButton"
                            HorizontalAlignment="Left"
                            Width="99" Height="36"
                            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="9"/>
                <local:FZButton x:Name="ScrollNextButton"
                            HorizontalAlignment="Right"
                            Width="99" Height="36"
                            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>

    <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="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_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>

            <Thickness x:Key="H_Dynamic_CarouselInnerClip">20</Thickness>
            <Thickness x:Key="H_Dynamic_CarouselOuterClip">40</Thickness>
            
            <Thickness x:Key="H_Thickness_MinusOne">-1</Thickness>
        </ControlTemplate.Resources>
        <Grid 
            MultiDataConversion.Converter="{MathOperationConverter Operation=Add}"
            MultiDataConversion.TargetType="{Type Thickness}"
            MultiDataConversion.Value="{DynamicResource H_Dynamic_CarouselInnerClip}"
            MultiDataConversion.Parameter="{DynamicResource H_Dynamic_CarouselOuterClip}"
            Margin="{Binding Path=(MultiDataConversion.Output), RelativeSource={RelativeSource Self}, Converter={MathOperationConverter Operation=Multiply}, ConverterParameter={StaticResource H_Thickness_MinusOne}}">
                  <!-- Blur is broken and makes every element blurry. Removed for now #pgEOzdemir -->
                  <!-- Effect="{StaticResource A_MotionBlurEffect}"
                  local:MotionBlurEffect.MotionBlurPositionXControl="{Binding Path=(local:BindingProxy.A), ElementName=VirtualizingWrapPanel}"
                  local:MotionBlurEffect.MotionBlurPositionYControl="{Binding Path=(local:BindingProxy.B), ElementName=VirtualizingWrapPanel}" -->
            <Grid ClipToBounds="True"
                  x:Name="MotionBlur">
                <Decorator Margin="{DynamicResource H_Dynamic_CarouselOuterClip}"
                            ClipToBounds="True">
                    <Grid Margin="{DynamicResource H_Dynamic_CarouselInnerClip}"
                            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="{TemplateBinding EmptyItemStyle}"
                                                     SeparatorItemStyle="{StaticResource A_Style_Separator_CarouselItem}"
                                                     local:BlendValue.SkipInitialInputChanges="1"
                                                     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}"
                                                     EnableUnselectableItems="{Binding EnableUnselectableItems, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                                                     x:Name="VirtualizingWrapPanel">
                            <local:EventFire.FzTriggers>
                                <SetProperty EventFireTrigger.Event="fzCollectionChanged" Property="(BlendValue.SkipInitialInputChanges)" Value="{StaticResource A_Int32_One}" />
                            </local:EventFire.FzTriggers>
                        </local: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_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,0">
                <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>


  <ControlTemplate TargetType="{x:Type ContentControl}"
                     x:Key="A_Template_ContentControl_SelectorContainer_PageButtons_Vertical">
        <Grid> 
            <ContentPresenter />
            <Decorator Margin="0,0,0,4">
                <local:NavigationArrows Style="{StaticResource A_Style_Control_NavigationArrows_Vertical}"
                                        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="EmptyItemStyle"
                Value="{StaticResource A_Style_Control_Carousel_EmptyItemStyle}" />
        <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_Carousel_Vertical_Item_Tile_Space">102</System:Double>
    <System:Double x:Key="A_Double_Carousel_Vertical_Item_Tile_Width">110</System:Double>
    <System:Double x:Key="A_Double_Carousel_Vertical_Item_Tile_Height">98</System:Double>
    <System:Double x:Key="A_Double_Carousel_Vertical_Item_Total_Height">788</System:Double>
    <System:Double x:Key="A_Double_Carousel_Vertical_Item_Total_FixedOffset">198</System:Double> <!-- 2x Tile space -->

    <Style TargetType="local:WrapListBox"
           x:Key="A_Style_Carousel_Square_Vertical_Item">
        <Setter Property="Template"
                Value="{StaticResource H_ControlTemplate_Carousel_Default}" />
        <Setter Property="ItemContainerStyle"
                Value="{StaticResource A_Style_ContentControl_Carousel_ContainerStyle_Vertical_Item}" />
        <Setter Property="ItemTemplate"
                Value="{StaticResource A_DataTemplate_ListItem_TileMenu}" />
        <Setter Property="Height"
                Value="{StaticResource A_Double_Carousel_Vertical_Item_Total_Height}" />
        <Setter Property="Width"
                Value="{StaticResource A_Double_Carousel_Vertical_Item_Tile_Width}" />
        <Setter Property="ItemWidth"
                Value="{StaticResource A_Double_Carousel_Vertical_Item_Tile_Space}" />
        <Setter Property="ItemHeight"
                Value="{StaticResource A_Double_Carousel_Vertical_Item_Tile_Height}" />
        <Setter Property="SelectionLimitTop"
                Value="{StaticResource A_Double_Carousel_Vertical_Item_Total_FixedOffset}" />
        <Setter Property="Margin"
                Value="0,4,0,4" />
        <Setter Property="ScrollOrientation"
                Value="Vertical" />               
        <Setter Property="VerticalAlignment"
                Value="Top" />       
        <Setter Property="EmptyItemStyle"
                Value="{StaticResource A_Style_Control_Carousel_EmptyItemStyle_Vertical_Item}" />
    </Style>

    <Style x:Key="H_Style_StatDivider_InfoPanel" TargetType="{Type FZMaterial}">
        <Setter Property="Color" Value="{StaticResource H_Color_Primary_White}"/>
        <Setter Property="Opacity" Value="0.2"/>
        <Setter Property="Height" Value="2"/>
    </Style>

</ResourceDictionary>