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

    <local:FZBooleanToVisibilityConverter x:Key="A_Converter_BoolToVis" InvertResult="false" />
    <local:FZBooleanToVisibilityConverter x:Key="A_Converter_BoolToVis_Inverted" InvertResult="true" />

    <!--local:DebugValueConverter x:Key="A_DebugValueConverter" /-->

    <!-- Scrollbar -->
    <Color x:Key="A_Color_Scrollbar_Background">#33F5F5F5</Color>
    <Color x:Key="A_Color_Scrollbar_Foreground">#FFCDCDCD</Color>

    <!--Scrollbar Thumbs-->
    <Style TargetType="Thumb">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Thumb">
                    <Grid x:Name="Grid">
                        <Border x:Name="Rectangle1"
                                CornerRadius="0"
                                Background="{TemplateBinding Background}" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="Tag"
                                 Value="Horizontal">
                            <Setter TargetName="Rectangle1"
                                    Property="Width"
                                    Value="Auto" />
                            <Setter TargetName="Rectangle1"
                                    Property="Height"
                                    Value="6" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--ScrollBars-->
    <Style TargetType="ScrollBar"
           BasedOn="{StaticResource A_Style_FrameworkElement_DefaultTransition_0}">
        <Setter Property="Foreground">
            <Setter.Value>
                <SolidColorBrush Color="{StaticResource A_Color_Scrollbar_Foreground}" />
            </Setter.Value>
        </Setter>
        <Setter Property="Background">
            <Setter.Value>
                <SolidColorBrush Color="{StaticResource A_Color_Scrollbar_Background}" />
            </Setter.Value>
        </Setter>
        <Setter Property="Width"
                Value="6" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ScrollBar">
                    <Grid x:Name="GridRoot"
                          Width="6"
                          Margin="-90,0,0,0">
                        <Border x:Name="TrackBackground"
                                CornerRadius="0"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Stretch"
                                Width="4"
                                Height="Auto"
                                Background="{TemplateBinding Background}" />
                        <Track x:Name="PART_Track"
                               Grid.Row="0"
                               IsDirectionReversed="true"
                               Focusable="false"
                               HorizontalAlignment="Stretch"
                               VerticalAlignment="Stretch"
                               Width="Auto"
                               Height="Auto">
                            <Track.Thumb>
                                <Thumb x:Name="Thumb"
                                       Background="{TemplateBinding Foreground}" />
                            </Track.Thumb>
                        </Track>
                    </Grid>

                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter TargetName="Thumb"
                                    Property="Visibility"
                                    Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="Orientation"
                                 Value="Horizontal">
                            <Setter TargetName="GridRoot"
                                    Property="LayoutTransform">
                                <Setter.Value>
                                    <RotateTransform Angle="-90" />
                                </Setter.Value>
                            </Setter>
                            <Setter TargetName="PART_Track"
                                    Property="LayoutTransform">
                                <Setter.Value>
                                    <RotateTransform Angle="-90" />
                                </Setter.Value>
                            </Setter>
                            <Setter Property="Width"
                                    Value="Auto" />
                            <Setter Property="Height"
                                    Value="6" />
                            <Setter TargetName="TrackBackground"
                                    Property="Width"
                                    Value="Auto" />
                            <Setter TargetName="TrackBackground"
                                    Property="Height"
                                    Value="4" />
                            <Setter TargetName="Thumb"
                                    Property="Tag"
                                    Value="Horizontal" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="A_Style_ScrollViewer_TextMenu"
           TargetType="ScrollViewer">
        <Setter Property="Margin"
                Value="-18,0,-18,0" />
    </Style>

    <Thickness x:Key="A_Thickness_ListBox_TextMenu_PanelMargin_Dynamic">18,0,18,0</Thickness>

    <ControlTemplate x:Key="A_ControlTemplate_ListBox_TextMenu_Default" TargetType="{x:Type ListBox}">
        <DockPanel>
            <ScrollBar DockPanel.Dock="Right" HorizontalAlignment="Right"
                       Minimum="0"
                       Maximum="{Binding ScrollableHeight, ElementName=ScrollViewer}"
                       ViewportSize="{Binding ViewportHeight, ElementName=ScrollViewer}"
                       Value="{Binding VerticalOffset, ElementName=ScrollViewer}"
                       Visibility="{Binding ComputedVerticalScrollBarVisibility, ElementName=ScrollViewer}"
                       Style="{StaticResource A_Style_ScrollBar_TextMenu}"
                       Margin="0,0,-18,3" />
            <DockPanel>
                <local:FZScrollViewer DockPanel.Dock="Top"
                                      Style="{StaticResource A_Style_ScrollViewer_TextMenu}"
                                      Template="{StaticResource A_ControlTemplate_ScrollViewer_TextMenu}"
                                      CanContentScroll="True"
                                      HorizontalScrollBarVisibility="Disabled"
                                      VerticalScrollBarVisibility="{Binding Path=(ScrollViewer.VerticalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                                      local:FZScrollViewer.IsAtTop="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(local:FZScrollViewer.IsAtTop), Mode=OneWayToSource}"
                                      local:FZScrollViewer.IsAtBottom="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(local:FZScrollViewer.IsAtBottom), Mode=OneWayToSource}"
                                      Focusable="False"
                                      KeepSelectionOnScreen="True"
                                      VerticalAlignment="Top"
                                      x:Name="ScrollViewer">
                    <VirtualizingStackPanel Margin="{DynamicResource A_Thickness_ListBox_TextMenu_PanelMargin_Dynamic}"
                                            Orientation="Vertical"
                                            IsItemsHost="True"
                                            VirtualizingStackPanel.VirtualizationMode="Recycling"
                                            Focusable="False" />
                </local:FZScrollViewer>
                <StackPanel ClipToBounds="True"
                            x:Name="EmptyItems">
                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_TextMenuEmptyItem}"
                                      Margin="0,0,0,3" />
                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_TextMenuEmptyItem}"
                                      Margin="0,0,0,3" />
                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_TextMenuEmptyItem}"
                                      Margin="0,0,0,3" />
                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_TextMenuEmptyItem}"
                                      Margin="0,0,0,3" />
                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_TextMenuEmptyItem}"
                                      Margin="0,0,0,3" />
                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_TextMenuEmptyItem}"
                                      Margin="0,0,0,3" />
                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_TextMenuEmptyItem}"
                                      Margin="0,0,0,3" />
                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_TextMenuEmptyItem}"
                                      Margin="0,0,0,3" />
                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_TextMenuEmptyItem}"
                                      Margin="0,0,0,3" />
                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_TextMenuEmptyItem}"
                                      Margin="0,0,0,3" />
                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_TextMenuEmptyItem}"
                                      Margin="0,0,0,3" />
                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_TextMenuEmptyItem}"
                                      Margin="0,0,0,3" />
                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_TextMenuEmptyItem}"
                                      Margin="0,0,0,3" />
                </StackPanel>
            </DockPanel>
        </DockPanel>
        <ControlTemplate.Triggers>
            <Trigger Property="Height"
                     Value="auto">
                <Setter TargetName="EmptyItems"
                        Property="Visibility"
                        Value="Collapsed" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <Style x:Key="A_Style_ListBox_TextMenu"
           TargetType="{x:Type local:CommonListBox}">
        <Setter Property="FocusVisualStyle"
                Value="{x:Null}" />
        <Setter Property="AlternationCount"
                Value="10000" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility"
                Value="Auto" />
        <Setter Property="Template"
                Value="{StaticResource A_ControlTemplate_ListBox_TextMenu_Default}" />
    </Style>

    <local:UIStoryboard x:Key="A_StoryBoard_TextMenu_Focus"
                        DurationOverride="{StaticResource A_Duration_Button_Select}">
        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"
                                       Storyboard.TargetName="Background">
            <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="1.03"/>
        </DoubleAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)"
                                       Storyboard.TargetName="Background">
            <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="1.03"/>
        </DoubleAnimationUsingKeyFrames>
    </local:UIStoryboard>
    
    <local:UIStoryboard x:Key="A_StoryBoard_TextMenu_Blur"
                        DurationOverride="{StaticResource A_Duration_Button_Select}">
        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="Background">
            <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="1.0" EasingFunction="{local:CircleEasing}" />
        </DoubleAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="Background">
            <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="1.0" EasingFunction="{local:CircleEasing}" />
        </DoubleAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(local:ZPanel.ZOffset)"
                                       Storyboard.TargetName="Background">
            <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0" EasingFunction="{local:CircleEasing}" />
        </DoubleAnimationUsingKeyFrames>
    </local:UIStoryboard>

    <Style x:Key="A_Style_FZMaterial_TextMenuItemShadow"
           TargetType="{x:Type local:FZMaterial}"
           BasedOn="{StaticResource A_Style_FZMaterial_ShadowBase}">
        <Setter Property="Preset">
            <Setter.Value>
                <local:FZMaterialPresetSelfShadow Softness="20" />
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="local:FZMaterial"
           x:Key="A_Style_FZMaterial_TextMenu_LockIcon">
        <Setter Property="Width"
                Value="32" />
        <Setter Property="Height"
                Value="32" />
        <Setter Property="ImageSourceNoPreload"
                Value="/ForzaUI;component/Textures/Anthem/Icons/Pad_Lock.png" />
        <Setter Property="HorizontalAlignment"
                Value="Right" />
        <Setter Property="VerticalAlignment"
                Value="Center" />
        <Setter Property="Color"
                Value="{StaticResource A_Color_TextMenu_Text_Default}" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding IsKeyboardFocusWithin, RelativeSource={RelativeSource FindAncestor, AncestorType=ListBoxItem}}"
                         Value="True">
                <Setter Property="Color"
                        Value="{StaticResource A_Color_TextMenu_Text_Highlighted}" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <System:Double x:Key="A_Double_TextMenu_Height_Default">48</System:Double>
    <Thickness x:Key="A_Thickness_TextMenu_Content_Margin">18,0</Thickness>

    <local:FZMaterialPresetGlassRoundtangle x:Key="A_FZMaterialPresetGlassRoundtangle_EmptyItem"
                                            BasedOn="{StaticResource A_FZMaterialPresetGlassRoundtangle_GlassPanel_Base}"
                                            CornerRadius="{StaticResource A_CornerRadius_Outer_All}"
                                            GlassColor="#ffffffff"
                                            BlurAmount="High"/>
    
    <Style x:Key="A_Style_FZMaterial_TextMenuEmptyItem"
           TargetType="{x:Type local:FZMaterial}">
        <Setter Property="Focusable" Value="False" />
        <Setter Property="Height"
                Value="{StaticResource A_Double_TextMenu_Height_Default}" />
        <Setter Property="Color"
                Value="#00000000" />
        <Setter Property="Preset"
                Value="{StaticResource A_FZMaterialPresetGlassRoundtangle_EmptyItem}" />
    </Style>

    <Style x:Key="A_Style_FZMaterial_HighlightShadow_Dynamic" TargetType="{x:Type local:FZMaterial}"
           BasedOn="{StaticResource A_Style_FZMaterial_HighlightShadow}">
        <Setter Property="CaptureSubgraph" Value="True"/>
    </Style>

    <ControlTemplate x:Key="A_ControlTemplate_TextMenu_Default" TargetType="ListBoxItem">
        <ControlTemplate.Resources>
            <Style x:Key="A_Style_RoutedEventCommand_MouseLeftButtonUp"
                   TargetType="local:RoutedEventCommand">
                <Setter Property="Command"
                        Value="{Binding ItemFuncCommand}" />
                <Style.Triggers>
                    <DataTrigger Binding="{Binding ItemFuncCommand}"
                                 Value="{x:Null}">
                        <Setter Property="Command"
                                 Value="{Binding SelectCommand, RelativeSource={RelativeSource AncestorType={x:Type Page}}}" />
                    </DataTrigger>
                </Style.Triggers>
            </Style>
        </ControlTemplate.Resources>
        <Grid>
            <Grid x:Name="Background"
                  RenderTransformOrigin="0.5,0.5">
                <Grid.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform />
                        <SkewTransform />
                        <RotateTransform />
                        <TranslateTransform />
                    </TransformGroup>
                </Grid.RenderTransform>
                <local:FZMaterial x:Name="DropShadow"
                                  Style="{StaticResource A_Style_FZMaterial_TextMenuItemShadow}"
                                  IsHitTestVisible="False"
                                  Visibility="Hidden"/>
                <local:RoutedEventCommand x:Name="MouseLeftButtonUpCommand"
                                          RoutedEvent="UIElement.MouseLeftButtonUp"
                                          Style="{StaticResource A_Style_RoutedEventCommand_MouseLeftButtonUp}" />

                <local:FZMaterial x:Name="BackgroundMaterial"
                                  local:RoutedEventCommand.Action="{Binding ElementName=MouseLeftButtonUpCommand}"
                                  Style="{StaticResource A_Style_FZMaterial_FlatPanel_Tile}" />

                <!-- TODO: Clipping the shadows using another capture subgraph causes serious artifacts
                           Need to combine streak shadow with roundtangle to avoid double subgraph capture - want to clip streak to roundtangle -->
                <local:FZMaterial x:Name="FZMaterial_Streak"
                                  Style="{DynamicResource A_Style_FZMaterial_HighlightShadow_Dynamic}"
                                  local:RoutedEventCommand.Action="{Binding ElementName=MouseLeftButtonUpCommand}">
                    <ContentPresenter x:Name="Presenter" />
                </local:FZMaterial>
            </Grid>
        </Grid>

        <ControlTemplate.Triggers>
            <Trigger Property="Tag" Value="GroupHeader">
                <Setter TargetName="BackgroundMaterial"
                        Property="Color"
                        Value="{StaticResource A_Color_TextMenu_Panel_Header}" />
            </Trigger>
            <Trigger Property="Tag" Value="RarityTag">
                <Setter TargetName="BackgroundMaterial" Property="Margin" Value="28,0,0,0"/>
                <Setter TargetName="BackgroundMaterial" Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterRightOnly}"/>
                <Setter TargetName="FZMaterial_Streak" Property="CaptureSubgraph" Value="False"/>
            </Trigger>
            <Trigger Property="Tag" Value="Inactive">
                <Setter TargetName="BackgroundMaterial" Property="Preset" Value="{StaticResource A_FZMaterialPresetGlassRoundtangle_GlassPanel_OuterAll}"/>
                <Setter TargetName="BackgroundMaterial" Property="Color" Value="{StaticResource A_Color_GlassPanel_Interactive}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="BackgroundMaterial" Property="Opacity" Value="0.3" />
            </Trigger>
            <Trigger Property="IsKeyboardFocusWithin"
                         Value="False">
                <Setter TargetName="FZMaterial_Streak"
                        Property="CaptureSubgraph"
                        Value="False" />
            </Trigger>
            <Trigger Property="IsKeyboardFocusWithin"
                         Value="True">
                <Trigger.EnterActions>
                    <BeginStoryboard x:Name="ShowSelected_BeginStoryboard1"
                                     Storyboard="{StaticResource A_StoryBoard_TextMenu_Focus}">
                    </BeginStoryboard>
                </Trigger.EnterActions>
                <Trigger.ExitActions>
                    <BeginStoryboard x:Name="ShowSelected_BeginStoryboard2"
                                     Storyboard="{StaticResource A_StoryBoard_TextMenu_Blur}">
                    </BeginStoryboard>
                </Trigger.ExitActions>
                <Setter Property="Visibility"
                        TargetName="DropShadow"
                        Value="Visible" />
                <Setter Property="IsSelected"
                        Value="True" />
                <Setter Property="Style"
                        TargetName="BackgroundMaterial"
                        Value="{StaticResource A_Style_FZMaterial_FlatPanel_TextItemHighlight}" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsKeyboardFocusWithin"
                         Value="True"/>
                    <Condition Property="Tag"
                         Value="RarityTag"/>
                </MultiTrigger.Conditions>
                <Setter Property="Preset"
                        TargetName="BackgroundMaterial"
                        Value="{StaticResource A_FZMaterialPresetRoundtangle_GradientHighlight_OuterRight}" />
            </MultiTrigger>

            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding Path=Content.Focusable, RelativeSource={RelativeSource Self}}"
                                 Value="False" />
                    <Condition Binding="{Binding Focusable, RelativeSource={RelativeSource Self}}"
                               Value="False" />
                    <Condition Binding="{Binding Tag, RelativeSource={RelativeSource Self}}"
                               Value="{x:Null}" />
                </MultiDataTrigger.Conditions>
                <Setter TargetName="BackgroundMaterial" Property="Visibility" Value="Collapsed" />
            </MultiDataTrigger>
            <!-- This is weird so be careful, in your data template use local:BindingProxy.TunnelIn/TunnelOut to set BindingProxy.C on
                 this list box item. -->
            <Trigger Property="local:BindingProxy.C">
                <Trigger.Value>
                    <System:Boolean>False</System:Boolean>
                </Trigger.Value>
                <Setter TargetName="FZMaterial_Streak"
                        Property="CaptureSubgraph"
                        Value="False"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <Style x:Key="A_Style_ListBoxItem_TextMenu" TargetType="{x:Type ListBoxItem}" BasedOn="{StaticResource A_Style_FrameworkElement_DefaultTransition}">
        <Style.Triggers>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
                <Setter Property="Panel.ZIndex" Value="1" />
                <Setter Property="local:ZPanel.DisableClipping"
                        Value="True" />
            </Trigger>
            <DataTrigger Binding="{Binding Content.Visibility, RelativeSource={RelativeSource Self}}" Value="{x:Static Visibility.Collapsed}">
                <Setter Property="Visibility"
                        Value="Collapsed" />
            </DataTrigger>
        </Style.Triggers>
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="Margin" Value="0,0,0,3" />
        <Setter Property="Focusable" Value="True" />
        <Setter Property="local:UIPageTransitionManager.TransitionIndex" Value="{Binding Path=(ItemsControl.AlternationIndex), RelativeSource={RelativeSource Self}}" />
    </Style>

    <Style x:Key="A_Style_Run_TextMenu_BOLD" TargetType="local:FZRun">
        <Setter Property="FontFamily" Value="Horizon_A"/>
    </Style>

    <DataTemplate x:Key="A_DataTemplate_TextMenu_Default">
        <Grid IsHitTestVisible="False" Height="{StaticResource A_Double_TextMenu_Height_Default}">
            <local:FZTextBlock x:Name="TextBlock"
                               local:TextBlockInlineMarkup.Markup="{Binding Text}"
                               local:TextBlockInlineMarkup.ResourceBaseName="A_Style_Run_TextMenu_" Style="{StaticResource A_Style_FZTextBlock_OptionText}" TextAlignment="Center"
                               local:ScreenReader.Event="OnChange"
                               local:ScreenReader.ControlType="Button"
                               local:ScreenReader.LineType="SelectedItem"
                               local:ScreenReader.SelectedNumber="{Binding (ItemsControl.AlternationIndex), RelativeSource={RelativeSource AncestorType={x:Type ListBoxItem}}, Converter={StaticResource A_IndexToNumberConverter}, FallbackValue=0}"
                               local:ScreenReader.SelectedCount="{Binding Items.Count, RelativeSource={RelativeSource AncestorType={x:Type Selector}}, FallbackValue=0}" />
        </Grid>
        <DataTemplate.Triggers>
            <DataTrigger Binding="{Binding IsKeyboardFocusWithin, RelativeSource={RelativeSource AncestorType=ListBoxItem}}" Value="True">
                <Setter TargetName="TextBlock" Property="local:ScreenReader.Line" Value="{Binding Text, Converter={StaticResource A_Converter_TrimInlineMarkup}}" />
            </DataTrigger>
        </DataTemplate.Triggers>
    </DataTemplate>

    <Style x:Key="A_Style_ListBoxItem_TextMenu_Default"
           BasedOn="{StaticResource A_Style_ListBoxItem_TextMenu}"
           TargetType="{x:Type ListBoxItem}">
        <Setter Property="Template"
                Value="{StaticResource A_ControlTemplate_TextMenu_Default}" />
        <Setter Property="local:FocusOnMouseOverBehaviour.Self"
                Value="True" />
    </Style>

    <Style x:Key="A_Style_ListBoxItem_TextMenu_NotFocusable"
           BasedOn="{StaticResource A_Style_ListBoxItem_TextMenu}" TargetType="ListBoxItem">
        <Setter Property="Focusable" Value="False" />
        <Setter Property="Template"
                Value="{StaticResource A_ControlTemplate_TextMenu_Default}" />
        <Setter Property="local:RecursiveFocusOnMouseOverBehaviour.Self"
                Value="True" />
    </Style>

    <Style x:Key="A_Style_ListBox_TextMenu_Default"
           TargetType="{x:Type local:CommonListBox}"
           BasedOn="{StaticResource A_Style_ListBox_TextMenu}">
        <Setter Property="ItemContainerStyle"
                Value="{StaticResource A_Style_ListBoxItem_TextMenu_Default}" />
        <Setter Property="ItemTemplate"
                Value="{StaticResource A_DataTemplate_TextMenu_Default}" />
    </Style>

    <Style x:Key="A_Style_ListBoxItem_TextMenu_WithRarityTag"
           BasedOn="{StaticResource A_Style_ListBoxItem_TextMenu}"
           TargetType="{x:Type ListBoxItem}">
        <Setter Property="Template"
                Value="{StaticResource A_ControlTemplate_TextMenu_Default}" />
        <Setter Property="local:FocusOnMouseOverBehaviour.Self"
                Value="True" />
        <Setter Property="Tag"
                Value="RarityTag" />
    </Style>

    <Style x:Key="A_Style_ScrollBar_TextMenu" BasedOn="{StaticResource A_Style_ScrollBar_Default}" TargetType="{x:Type ScrollBar}"/>

    <ControlTemplate x:Key="A_ControlTemplate_ScrollViewer_TextMenu"
                     TargetType="ScrollViewer">
        <ScrollContentPresenter x:Name="PART_ScrollContentPresenter"
                                Content="{TemplateBinding Content}"
                                CanContentScroll="{TemplateBinding ScrollViewer.CanContentScroll}"
                                ClipToBounds="True" />
    </ControlTemplate>

    <Style x:Key="A_Style_ListBox_List_Default"
           BasedOn="{StaticResource A_Style_ListBox_TextMenu}"
           TargetType="{x:Type local:CommonListBox}">
        <Setter Property="ItemTemplate"
                Value="{x:Null}" />
        <Setter Property="Height"
                Value="663" />
    </Style>

    <Style x:Key="A_Style_ListBox_List_Default_ScrollBar" 
           TargetType="{x:Type local:CommonListBox}"
           BasedOn="{StaticResource A_Style_ListBox_List_Default}">
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="{x:Static ScrollBarVisibility.Visible}" />
        <Setter Property="AllowMouseWheelScrolling" Value="False" />
        <Setter Property="Margin" Value="0,0,18,0" />
    </Style>

    <Style x:Key="A_Style_ListBox_List_Default_PCOnlyScrollBar"
           TargetType="{x:Type local:CommonListBox}"
           BasedOn="{StaticResource A_Style_ListBox_List_Default}">
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="{x:Static ScrollBarVisibility.Hidden}" />
        <Setter Property="AllowMouseWheelScrolling" Value="False" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding IsPC, RelativeSource={RelativeSource AncestorType=Page}}"
                         Value="True">
                <Setter Property="ScrollViewer.VerticalScrollBarVisibility"
                        Value="{x:Static ScrollBarVisibility.Visible}" />
                <Setter Property="Margin"
                        Value="0,0,18,0" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="A_Style_FZMaterial_ListBoxItemShadow"
           BasedOn="{StaticResource A_Style_FZMaterial_ShadowBase}"
           TargetType="{x:Type local:FZMaterial}">
        <Setter Property="RenderTransformOrigin"
                Value="0.5,0.5" />
        <Setter Property="Color"
                Value="{StaticResource A_Color_UISelfShadow}" />
        <Setter Property="Opacity" Value="1"/>
        <Setter Property="Preset">
            <Setter.Value>
                <local:FZMaterialPresetSelfShadow Softness="10"  />
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="A_Style_Dynamic_FZTextBlock_TextTabMenu"
           TargetType="local:FZTextBlock"
           BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}">
        <Setter Property="Text"
                Value="{Binding Title}" />
        <Setter Property="FontSize"
                Value="{StaticResource A_Double_FontSize_TabMenu}" />
        <Setter Property="Color"
                Value="{StaticResource A_Color_TabBar_ItemText}" />
        <Setter Property="Margin"
                Value="18,0" />
        <Setter Property="StretchDirection"
                Value="DownOnly" />
        <Setter Property="Stretch"
                Value="Uniform" />
        <Setter Property="MaxWidth"
                Value="250" />
        <Setter Property="TextWrapping"
                Value="NoWrap" />
        <Setter Property="VerticalAlignment"
                Value="Center" />
    </Style>

    <DataTemplate x:Key="A_DataTemplate_ListItem_TextTabMenu">
        <local:FZMaterial Color="{StaticResource A_Color_TabBar_ItemDivider}"
                          Focusable="False">
            <Grid x:Name="OuterGrid" Margin="1,0">
                <local:RoutedEventCommand x:Name="TabMenuItemClickRoutedEventCommand"
                                          RoutedEvent="UIElement.MouseLeftButtonUp"
                                          Command="{Binding OnItemLeftMouseUp, RelativeSource={RelativeSource AncestorType=Selector}}" />
                <local:FZMaterial x:Name="FZMaterial_Background" Style="{StaticResource A_Style_FZMaterial_FlatPanel_TabBarItem}" 
                                  VerticalAlignment="Bottom" Height="{StaticResource A_Double_Size_TabMenuItemHeight}"
                                  local:RoutedEventCommand.Action="{Binding ElementName=TabMenuItemClickRoutedEventCommand}">
                    <Grid x:Name="InnerGrid" Margin="0">
                        <local:FZMaterial x:Name="FZMaterial_Shadow"
                            Style="{StaticResource A_Style_FZMaterial_HighlightShadow}"
                            CaptureSubgraph="False">
                            <local:FZTextBlock x:Name="Textblock_Title"
                                               local:ScreenReader.LineType="SelectedGroup"
                                               local:ScreenReader.Event="OnChange"
                                               local:ScreenReader.ControlType="Button"
                                               Style="{DynamicResource A_Style_Dynamic_FZTextBlock_TextTabMenu}"/>
                        </local:FZMaterial>
                    </Grid>
                </local:FZMaterial>
                <Control x:Name="MouseOverControl"
                         Style="{StaticResource A_Style_Control_MouseRollover}" />
            </Grid>
        </local:FZMaterial>
        <DataTemplate.Triggers>
            <DataTrigger Binding="{Binding (Selector.IsSelected), RelativeSource={RelativeSource FindAncestor, AncestorType=ContentControl}}" Value="True">
                <Setter TargetName="FZMaterial_Background" Property="Style" Value="{StaticResource A_Style_FZMaterial_FlatPanel_TabBarHighlight}"/>
                <Setter TargetName="FZMaterial_Shadow" Property="CaptureSubgraph" Value="True"/>
                <Setter TargetName="Textblock_Title" Property="Color" Value="{StaticResource A_Color_TabBar_ItemText_Selected}"/>
                <Setter TargetName="Textblock_Title" Property="local:ScreenReader.Line" Value="{Binding Title}"/>
                <Setter TargetName="OuterGrid" Property="Margin" Value="0"/>
                <Setter TargetName="InnerGrid" Property="Margin" Value="1,0"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding Path=IsMouseOver, RelativeSource={RelativeSource Self}}" Value="True">
                <Setter TargetName="OuterGrid" Property="Margin" Value="0"/>
                <Setter TargetName="InnerGrid" Property="Margin" Value="1,0"/>
            </DataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding Path=(Selector.IsSelected), RelativeSource={RelativeSource AncestorType=Selector}}"
                               Value="False" />
                    <Condition Binding="{Binding Path=IsMouseOver, RelativeSource={RelativeSource Self}}"
                               Value="True" />
                </MultiDataTrigger.Conditions>
                <Setter TargetName="MouseOverControl"
                        Property="Visibility"
                        Value="Visible"/>
            </MultiDataTrigger>
        </DataTemplate.Triggers>
    </DataTemplate>

    <Style x:Key="A_Style_TextTabMenuList" TargetType="{x:Type local:ItemsSelector}">
        <Setter Property="ItemTemplate" Value="{StaticResource A_DataTemplate_ListItem_TextTabMenu}"/>
        <Setter Property="FocusVisualStyle" Value="{StaticResource A_Style_BlankVisualStyle}" />
        <Setter Property="ScrollSelectionIntoView" Value="True"/>
        <Setter Property="PageSize" Value="1"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:ItemsSelector}">
                    <DockPanel HorizontalAlignment="Left" Focusable="False">
                        <local:FZButton Style="{StaticResource A_Style_Button_TabTitleLB}" Focusable="False"
                                        DockPanel.Dock="Left"
                                        Command="{Binding ScrollPagePrevCommand, RelativeSource={RelativeSource TemplatedParent}}"
                                        IsEnabled="{Binding CanSelectPrev, RelativeSource={RelativeSource TemplatedParent}}"/>
                        <local:FZButton Style="{StaticResource A_Style_Button_TabTitleRB}" Focusable="False"
                                        DockPanel.Dock="Right"
                                        Command="{Binding ScrollPageNextCommand, RelativeSource={RelativeSource TemplatedParent}}"
                                        IsEnabled="{Binding CanSelectNext, RelativeSource={RelativeSource TemplatedParent}}"/>
                        <ScrollViewer CanContentScroll="True" Focusable="False" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Disabled" 
                                  ClipToBounds="True">
                            <VirtualizingStackPanel IsItemsHost="True"
                                                Orientation="Horizontal"
                                                VirtualizingStackPanel.VirtualizationMode="Recycling" />
                        </ScrollViewer>
                    </DockPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="A_Style_FZTextBlock_SpinnerItem"
           BasedOn="{StaticResource A_Style_FZTextBlock_HorizonD}" TargetType="local:FZTextBlock">
        <Setter Property="Color"
                Value="{StaticResource A_Color_TextMenu_Text_Default}" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="TextAlignment" Value="Center" />
        <Setter Property="Margin" Value="0" />
        <Setter Property="Stretch" Value="Uniform" />
        <Setter Property="StretchDirection" Value="DownOnly" />
        <Setter Property="FontSize" Value="22" />
    </Style>

    <ControlTemplate x:Key="A_ControlTemplate_Button_TextMenu"
                     TargetType="local:FZButton">
        <ControlTemplate.Resources>
            <Style x:Key="A_Style_FZTextBlock_ButtonText_Dynamic" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_SpinnerItem}">
                <Setter Property="HorizontalAlignment" Value="Center"/>
                <Setter Property="VerticalAlignment" Value="Center"/>
            </Style>
        </ControlTemplate.Resources>
        <Grid Height="{StaticResource A_Double_TextMenu_Height_Default}">
            <Viewbox Stretch="Fill">
                <local:FZMaterial Width="1"
                                  Height="1"
                                  Color="#00000000"
                                  HorizontalAlignment="Stretch"
                                  VerticalAlignment="Stretch" />
            </Viewbox>
            <Grid IsHitTestVisible="False"
                  Height="{StaticResource A_Double_TextMenu_Height_Default}">
                <local:FZTextBlock x:Name="ButtonText"
                                   Text="{TemplateBinding Content}"
                                   Style="{DynamicResource A_Style_FZTextBlock_ButtonText_Dynamic}"
                                   local:ScreenReader.Event="OnChange"
                                   local:ScreenReader.ControlType="Button"
                                   local:ScreenReader.LineType="SelectedItem" />
            </Grid>
        </Grid>

        <ControlTemplate.Triggers>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
                <Setter Property="Color" TargetName="ButtonText" Value="{StaticResource A_Color_TextMenu_Text_Highlighted}"/>
                <Setter TargetName="ButtonText" Property="local:ScreenReader.Line" Value="{Binding Text, ElementName=ButtonText}" />
            </Trigger>
            <DataTrigger Binding="{Binding IsEnabled, RelativeSource={RelativeSource AncestorType=ListBoxItem}, FallbackValue=True}" Value="False">
                <Setter Property="Color" TargetName="ButtonText" Value="{StaticResource A_Color_TextMenu_Text_Locked}"/>
            </DataTrigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Color" TargetName="ButtonText" Value="{StaticResource A_Color_TextMenu_Text_Locked}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <ControlTemplate x:Key="A_ControlTemplate_Button_ToItemSelect_TextMenu"
                     TargetType="local:FZButton">
        <ControlTemplate.Resources>
            <Style x:Key="A_Style_FZTextBlock_ButtonText_Dynamic" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_SpinnerItem}">
                <Setter Property="HorizontalAlignment" Value="Center"/>
                <Setter Property="VerticalAlignment" Value="Center"/>
            </Style>
        </ControlTemplate.Resources>
        <Grid Height="{StaticResource A_Double_TextMenu_Height_Default}">
            <Viewbox Stretch="Fill">
                <local:FZMaterial Width="1"
                                  Height="1"
                                  Color="#00000000"
                                  HorizontalAlignment="Stretch"
                                  VerticalAlignment="Stretch" />
            </Viewbox>
            <Grid IsHitTestVisible="False"
                  Height="{StaticResource A_Double_TextMenu_Height_Default}">
                <ContentPresenter />
            </Grid>
        </Grid>
    </ControlTemplate>

    <ControlTemplate x:Key="A_ControlTemplate_TextMenu_HighlightStroke" TargetType="ListBoxItem">
        <ControlTemplate.Resources>
            <Style x:Key="A_Style_RoutedEventCommand_MouseLeftButtonUp"
                   TargetType="local:RoutedEventCommand">
                <Setter Property="Command"
                        Value="{Binding ItemFuncCommand}" />
                <Style.Triggers>
                    <DataTrigger Binding="{Binding ItemFuncCommand}"
                                 Value="{x:Null}">
                        <Setter Property="Command"
                                 Value="{Binding SelectCommand, RelativeSource={RelativeSource AncestorType={x:Type Page}}}" />
                    </DataTrigger>
                </Style.Triggers>
            </Style>
            <local:FZMaterialPresetRoundtangleStroke x:Key="A_FZMaterialPresetRoundtangleStroke_Rollover_Thick_All"
                                                     BasedOn="{StaticResource A_FZMaterialPresetRoundtangleStroke_Rollover}"
                                                     CornerRadius="16,16,16,16"
                                                     Thickness="8" />
            <Style x:Key="A_Style_FrameworkElement_TextMenuItemContainer_Dynamic"
                   TargetType="{x:Type FrameworkElement}">
                <Style.Triggers>
                    <DataTrigger Binding="{Binding IsEnabled, RelativeSource={RelativeSource AncestorType=ListBoxItem}}" Value="False">
                        <Setter Property="Opacity" Value="0.4" />
                    </DataTrigger>
                </Style.Triggers>
            </Style>
        </ControlTemplate.Resources>
        <Grid>
            <Grid x:Name="Background"
                  RenderTransformOrigin="0.5,0.5"
                  Style="{DynamicResource A_Style_FrameworkElement_TextMenuItemContainer_Dynamic}">
                <Grid.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform />
                        <SkewTransform />
                        <RotateTransform />
                        <TranslateTransform />
                    </TransformGroup>
                </Grid.RenderTransform>
                <local:FZMaterial x:Name="DropShadow"
                                  Style="{DynamicResource A_Style_FZMaterial_TextMenuItemShadow}"
                                  IsHitTestVisible="False"
                                  Visibility="Hidden"/>
                <local:RoutedEventCommand x:Name="MouseLeftButtonUpCommand"
                                          RoutedEvent="UIElement.MouseLeftButtonUp"
                                          Style="{StaticResource A_Style_RoutedEventCommand_MouseLeftButtonUp}" />
                <local:FZMaterial x:Name="HighlightStroke"
                                  Preset="{StaticResource A_FZMaterialPresetRoundtangleStroke_Rollover_Thick_All}"
                                  Visibility="Collapsed"
                                  local:RoutedEventCommand.Action="{Binding ElementName=MouseLeftButtonUpCommand}"
                                  Margin="-8" />
                <local:FZMaterial x:Name="BackgroundMaterial"
                                  local:RoutedEventCommand.Action="{Binding ElementName=MouseLeftButtonUpCommand}"
                                  Style="{StaticResource A_Style_FZMaterial_FlatPanel_Tile}" />
                <ContentPresenter x:Name="Presenter" />
            </Grid>
        </Grid>

        <ControlTemplate.Triggers>
            <Trigger Property="Tag" Value="GroupHeader">
                <Setter TargetName="BackgroundMaterial"
                        Property="Color"
                        Value="{StaticResource A_Color_TextMenu_Panel_Header}" />
            </Trigger>
            <Trigger Property="Tag" Value="Inactive">
                <Setter TargetName="BackgroundMaterial" Property="Preset" Value="{StaticResource A_FZMaterialPresetGlassRoundtangle_GlassPanel_OuterAll}"/>
                <Setter TargetName="BackgroundMaterial" Property="Color" Value="{StaticResource A_Color_GlassPanel_Interactive}"/>
            </Trigger>
            <Trigger Property="IsKeyboardFocusWithin"
                         Value="True">
                <Setter TargetName="HighlightStroke"
                        Property="Visibility"
                        Value="Visible" />
            </Trigger>
            <Trigger Property="IsKeyboardFocusWithin"
                         Value="True">
                <Trigger.EnterActions>
                    <BeginStoryboard x:Name="ShowSelected_BeginStoryboard1"
                                     Storyboard="{StaticResource A_StoryBoard_TextMenu_Focus}">
                    </BeginStoryboard>
                </Trigger.EnterActions>
                <Trigger.ExitActions>
                    <BeginStoryboard x:Name="ShowSelected_BeginStoryboard2"
                                     Storyboard="{StaticResource A_StoryBoard_TextMenu_Blur}">
                    </BeginStoryboard>
                </Trigger.ExitActions>
                <Setter Property="Visibility"
                        TargetName="DropShadow"
                        Value="Visible" />
                <Setter Property="IsSelected"
                        Value="True" />
                <Setter Property="local:ZPanel.DisableClipping"
                        Value="True" />
                <Setter Property="local:ZPanel.ZIndex"
                        Value="20" />
            </Trigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding Path=Content.Focusable, RelativeSource={RelativeSource Self}}"
                                 Value="False" />
                    <Condition Binding="{Binding Focusable, RelativeSource={RelativeSource Self}}"
                               Value="False" />
                    <Condition Binding="{Binding Tag, RelativeSource={RelativeSource Self}}"
                               Value="{x:Null}" />
                </MultiDataTrigger.Conditions>
                <Setter TargetName="BackgroundMaterial" Property="Visibility" Value="Collapsed" />
            </MultiDataTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <Style x:Key="A_Style_ContentControl_ScrollArrowBox"
               TargetType="{x:Type ContentControl}">
        <Setter Property="Height"
                    Value="50" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ContentControl}">
                    <local:FZMaterial x:Name="Background"
                                          Style="{StaticResource A_Style_FZMaterial_GlassPanel_Pill_NonInteractive}">
                        <Grid x:Name="Contents">
                            <local:FZMaterial x:Name="MouseRollover"
                                                  Preset="{StaticResource A_FZMaterialPresetRoundtangleStroke_Rollover_Outer_All}"
                                                  Visibility="Collapsed" />
                            <local:FZMaterial x:Name="ContentShadow"
                                                  Style="{StaticResource A_Style_FZMaterial_FloatingIconShadow}">
                                <ContentPresenter />
                            </local:FZMaterial>
                        </Grid>
                    </local:FZMaterial>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver"
                                         Value="True">
                            <Setter Property="Visibility"
                                        Value="Visible"
                                        TargetName="MouseRollover" />
                        </Trigger>
                        <DataTrigger Binding="{Binding IsControllerActiveInput, RelativeSource={RelativeSource AncestorType=Page}}"
                                         Value="False">
                            <Setter Property="Color"
                                        Value="#FFFFFFFF"
                                        TargetName="Background" />
                        </DataTrigger>
                        <DataTrigger Binding="{Binding (local:BindingProxy.A), RelativeSource={RelativeSource Self}}"
                                         Value="True">
                            <Setter Property="Color"
                                        Value="{StaticResource A_Color_AuctionHouse_DisabledBackgroundGlass}"
                                        TargetName="Background" />
                            <Setter Property="CaptureSubgraph"
                                        Value="False"
                                        TargetName="ContentShadow" />
                            <Setter Property="Visibility"
                                        Value="Collapsed"
                                        TargetName="MouseRollover" />
                        </DataTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="A_Style_FZMaterial_ScrollArrow_TextMenu"
               TargetType="{x:Type local:FZMaterial}"
               BasedOn="{StaticResource A_Style_FZMaterial_ScrollArrow}">
        <Setter Property="Data" Value="{StaticResource A_Geometry_SpinnerArrow}" />
        <Setter Property="Width" Value="21" />
        <Setter Property="Height" Value="13" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding IsControllerActiveInput, RelativeSource={RelativeSource AncestorType=Page}}"
                             Value="False">
                <Setter Property="Color"
                            Value="{StaticResource A_Color_Spinner_ArrowUnselected}" />
            </DataTrigger>
            <DataTrigger Binding="{Binding (local:BindingProxy.A), RelativeSource={RelativeSource AncestorType=ContentControl}}"
                             Value="True">
                <Setter Property="Color"
                            Value="{StaticResource A_Color_Spinner_ArrowUnselected}" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <System:Double x:Key="A_Double_UGCPopupItemWidth_Dynamic">267.66</System:Double>
    <Thickness x:Key="A_Thickness_UGCPopupItemPadding_Dynamic">267.66,0,0,0</Thickness>

    <Style TargetType="{x:Type local:ItemsSelector}"
           x:Key="A_Style_ItemsSelector_UGCPopupTabBar">
        <Style.Resources>
            <Style x:Key="A_Style_Dynamic_FZTextBlock_TextTabMenu"
                   TargetType="local:FZTextBlock"
                   BasedOn="{StaticResource A_Style_Dynamic_FZTextBlock_TextTabMenu}">
                <Setter Property="Text"
                        Value="{Binding Title, Converter={StaticResource A_StringToUpper}}" />
                <Setter Property="TextAlignment"
                        Value="Center" />
            </Style>
            <Style x:Key="A_Style_TabBarItemContainer"
                   TargetType="ContentControl">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="ContentControl">
                            <ContentPresenter />
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
        </Style.Resources>
        <Setter Property="FocusVisualStyle"
                Value="{StaticResource A_Style_BlankVisualStyle}" />
        <Setter Property="Height"
                Value="{StaticResource A_Double_Size_TabMenuItemHeight}" />
        <Setter Property="ItemTemplate"
                Value="{StaticResource A_DataTemplate_ListItem_TextTabMenu}" />
        <Setter Property="ItemContainerStyle"
                Value="{StaticResource A_Style_TabBarItemContainer}" />
        <Setter Property="ClipToBounds"
                Value="True" />
        <Setter Property="Width"
                Value="1764" />
        <Setter Property="Margin"
                Value="0,1,0,12" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Grid>
                        <local:VirtualizingScrollPanel Style="{StaticResource A_Style_VirtualizingScrollPanel_MotionBlurScrollPanel_TabTitle}"
                                                       ItemHeight="{StaticResource A_Double_Size_TabMenuItemHeight}"
                                                       ItemWidth="{DynamicResource A_Double_UGCPopupItemWidth_Dynamic}"
                                                       Padding="{DynamicResource A_Thickness_UGCPopupItemPadding_Dynamic}"
                                                       VerticalAlignment="Center"
                                                       Margin="79,0" />
                        <local:FZButton HorizontalAlignment="Right"
                                        Style="{StaticResource A_Style_Button_TabTitleRB_CarSelect}"
                                        Command="{Binding ScrollPageNextCommand, RelativeSource={RelativeSource TemplatedParent}}"
                                        IsEnabled="{Binding CanSelectNext, RelativeSource={RelativeSource TemplatedParent}}" />
                        <local:FZButton HorizontalAlignment="Left"
                                        Style="{StaticResource A_Style_Button_TabTitleLB_CarSelect}"
                                        Command="{Binding ScrollPagePrevCommand, RelativeSource={RelativeSource TemplatedParent}}"
                                        IsEnabled="{Binding CanSelectPrev, RelativeSource={RelativeSource TemplatedParent}}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>