<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="using:CharacterMap.Controls"
    xmlns:core="using:CharacterMap.Core"
    xmlns:cv="using:CharacterMap.Converters"
    xmlns:helpers="using:CharacterMap.Helpers"
    xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
    xmlns:toolkit="using:Microsoft.Toolkit.Uwp.UI.Controls">

    <CharacterCasing x:Key="TitleCasing">Lower</CharacterCasing>
    <x:Boolean x:Key="LowercaseTitles">True</x:Boolean>
    <x:Boolean x:Key="SupportsFluentAnimation">False</x:Boolean>
    <x:Boolean x:Key="SupportsDarkTheme">False</x:Boolean>
    <x:Boolean x:Key="SupportsShadows">False</x:Boolean>
    <x:Boolean x:Key="SupportsTabs">False</x:Boolean>
    <Duration x:Key="BrushDuration">0:0:0.1</Duration>
    <BrushTransition x:Key="DefaultBrushTransition" Duration="0:0:0.1" />
    <SolidColorBrush x:Key="PaneCollapsedBackgroundBrush" Color="{ThemeResource SystemChromeMediumColor}" />
    <x:Double x:Key="MinTitleBarHeight">32</x:Double>
    <CornerRadius x:Key="CardCornerRadius">0</CornerRadius>
    <CornerRadius x:Key="InfoBarCornerRadius">0</CornerRadius>
    <CornerRadius x:Key="CommandToggleCornerRadius">0</CornerRadius>



    <!--  SYSTEM BRUSHES  -->

    <Color x:Key="SystemAccentColor">#F10DA2</Color>
    <Color x:Key="SystemAltHighColor">#FFFFFFFF</Color>
    <Color x:Key="SystemAltLowColor">#FFFFFFFF</Color>
    <Color x:Key="SystemAltMediumColor">#FFFFFFFF</Color>
    <Color x:Key="SystemAltMediumHighColor">#FFFFFFFF</Color>
    <Color x:Key="SystemAltMediumLowColor">#FFFFFFFF</Color>
    <Color x:Key="SystemBaseHighColor">#FF000000</Color>
    <Color x:Key="SystemBaseLowColor">#FFCCCCCC</Color>
    <Color x:Key="SystemBaseMediumColor">#FF898989</Color>
    <Color x:Key="SystemBaseMediumHighColor">#FF5D5D5D</Color>
    <Color x:Key="SystemBaseMediumLowColor">#FF737373</Color>
    <Color x:Key="SystemChromeAltLowColor">#FF5D5D5D</Color>
    <Color x:Key="SystemChromeBlackHighColor">#FF000000</Color>
    <Color x:Key="SystemChromeBlackLowColor">#FFCCCCCC</Color>
    <Color x:Key="SystemChromeBlackMediumColor">#FF5D5D5D</Color>
    <Color x:Key="SystemChromeBlackMediumLowColor">#FF898989</Color>
    <Color x:Key="SystemChromeDisabledHighColor">#FFCCCCCC</Color>
    <Color x:Key="SystemChromeDisabledLowColor">#FF898989</Color>
    <Color x:Key="SystemChromeGrayColor">#FF737373</Color>
    <Color x:Key="SystemChromeHighColor">#FFCCCCCC</Color>
    <Color x:Key="SystemChromeLowColor">#FFECECEC</Color>
    <Color x:Key="SystemChromeMediumColor">#FFE6E6E6</Color>
    <Color x:Key="SystemChromeMediumLowColor">#FFECECEC</Color>
    <Color x:Key="SystemChromeWhiteColor">#FFFFFFFF</Color>
    <Color x:Key="SystemListLowColor">#FFE6E6E6</Color>
    <Color x:Key="SystemListMediumColor">#FFCCCCCC</Color>
    <Color x:Key="SystemChromeAltMediumHighColor">#CCFFFFFF</Color>
    <Color x:Key="SystemChromeAltHighColor">#FFCCCCCC</Color>
    <Color x:Key="SystemRevealListLowColor">#FFE6E6E6</Color>
    <Color x:Key="SystemRevealListMediumColor">#FFCCCCCC</Color>
    <AcrylicBrush
        x:Key="SystemControlAcrylicWindowBrush"
        BackgroundSource="HostBackdrop"
        FallbackColor="{ThemeResource SystemChromeMediumColor}"
        TintColor="{ThemeResource SystemChromeAltHighColor}"
        TintOpacity="0.8" />

    <!--  Override system generated accent colors  -->
    <Color x:Key="SystemAccentColorLight1">#FFF42AAF</Color>
    <Color x:Key="SystemAccentColorLight2">#FFF748BB</Color>
    <Color x:Key="SystemAccentColorLight3">#FFF965C8</Color>
    <Color x:Key="SystemAccentColorDark1">#FFDB0A90</Color>
    <Color x:Key="SystemAccentColorDark2">#FFC6087F</Color>
    <Color x:Key="SystemAccentColorDark3">#FFB0056D</Color>
    <RevealBackgroundBrush
        x:Key="SystemControlHighlightListLowRevealBackgroundBrush"
        FallbackColor="{StaticResource SystemListMediumColor}"
        TargetTheme="Light"
        Color="{ThemeResource SystemRevealListMediumColor}" />
    <Color x:Key="RegionColor">#FFFFFFFF</Color>
    <SolidColorBrush x:Key="RegionBrush" Color="{StaticResource RegionColor}" />

    <SolidColorBrush x:Key="TextControlBorder" Color="#BEBEBE" />
    <SolidColorBrush x:Key="TextControlPlaceholderForeground" Color="#828689" />
    <SolidColorBrush x:Key="TabViewItemHeaderBackgroundSelected" Color="Transparent" />




    <!--  FONTS  -->
    <FontFamily x:Key="ThemeFontFamily">Zegoe UI, XamlAutoFontFamily</FontFamily>
    <FontFamily x:Key="ContentControlThemeFontFamily">Zegoe UI, XamlAutoFontFamily</FontFamily>
    <FontFamily x:Key="SymbolThemeFontFamily">Segoe MDL2 Assets</FontFamily>




    <!--  MISC RESOURCES  -->
    <x:Double x:Key="ScrollBarSize">8</x:Double>
    <x:Double x:Key="ScrollBarButtonArrowIconFontSize">6</x:Double>
    <x:Double x:Key="FontListFlyoutFontSize">13.333</x:Double>
    <x:Double x:Key="ControlContentThemeFontSize">13.333</x:Double>
    <x:Double x:Key="FontListFontSize">12</x:Double>

    <cv:UpperConverter x:Name="Upper" />
    <cv:LowerConverter x:Key="TitleConverter" />
    <CornerRadius x:Key="PopupCornerRadius">0</CornerRadius>
    <StaticResource x:Key="FontSelectorTitleConverter" ResourceKey="TitleConverter" />




    <!--  BRUSHES  -->

    <ImageBrush
        x:Key="DefaultPageBackgroundBrush"
        ImageSource="/Assets/ZBG.png"
        Stretch="Fill" />

    <SolidColorBrush x:Key="DefaultHostBrush" Color="Transparent" />
    <SolidColorBrush x:Key="ScrollBarBorderBrush" Color="#B8B5B5" />
    <SolidColorBrush x:Key="ControlFocusedAccentBrush" Color="#FA6EC9" />
    <SolidColorBrush x:Key="CheckBoxBorderBrush" Color="#FF000000" />
    <SolidColorBrush x:Key="ControlPointerOverForegroundBrush" Color="#828689" />

    <SolidColorBrush x:Key="DefaultControlForegroundBrush" Color="#373A3D" />
    <SolidColorBrush x:Key="ButtonForegroundBrush" Color="Black" />
    <SolidColorBrush x:Key="ButtonForegroundPointerOverBrush" Color="#A3A3A3" />
    <SolidColorBrush x:Key="FlyoutPresenterBackground" Color="White" />
    <SolidColorBrush x:Key="FlyoutBorderThemeBrush" Color="#AFAAAC" />

    <!--<StaticResource x:Key="CardStrokeColorDefaultBrush" ResourceKey="ComboBoxBorderBrush" />-->

    <SolidColorBrush x:Key="ControlForegroundBrush" Color="#373A3D" />
    <SolidColorBrush x:Key="AltHostBrush" Color="Transparent" />
    <SolidColorBrush x:Key="ComboBoxBorderBrush" Color="#C2C2C2" />
    <SolidColorBrush x:Key="ComboBoxForeground" Color="#FF454545" />
    <SolidColorBrush x:Key="TextForegroundBrush" Color="#9e000000" />
    <SolidColorBrush x:Key="ComboBoxDropDownBorderBrush" Color="#A6A6A6" />
    <SolidColorBrush x:Key="SelectedBackgroundBrush" Color="#D8D8D9" />
    <SolidColorBrush x:Key="SelectedPointerOverBackgroundBrush" Color="#E7E8E8" />
    <SolidColorBrush x:Key="ControlGlyphBrush" Color="#555555" />
    <SolidColorBrush x:Key="ControlContentPointerOverForeground" Color="#B1B4B6" />
    <SolidColorBrush x:Key="InfoBarBackgroundBrush" Color="Transparent" />

    <LinearGradientBrush x:Key="ComboBoxBackground" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Offset="1" Color="#FFD8D8D8" />
        <GradientStop Offset="0" Color="White" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="ButtonBackgroundBrush" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Offset="0.121" Color="#FFF7F7F7" />
        <GradientStop Offset="1" Color="#FFDFDFDF" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="ButtonPointerOverBackgroundBrush" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Offset="0.121" Color="#EAEAEA" />
        <GradientStop Offset="1" Color="#D4D4D4" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="CheckBoxBackgroundBrush" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Offset="0.121" Color="#FFE6E6E6" />
        <GradientStop Offset="1" Color="#FFF" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="CardBackgroundBrush" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Offset="0" Color="#FFFFFF" />
        <GradientStop Offset="1" Color="#F0F0F0" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="FlairBrush" StartPoint="0 0.5" EndPoint="1 0.5">
        <GradientStop Offset="0" Color="#F58C20" />
        <GradientStop Offset="0.5" Color="#DD606F" />
        <GradientStop Offset="1" Color="#EC1293" />
    </LinearGradientBrush>

    <StaticResource x:Key="RepeatButtonBackgroundPointerOver" ResourceKey="ButtonPointerOverBackgroundBrush" />
    <StaticResource x:Key="RepeatButtonBorderBrushPointerOver" ResourceKey="ComboBoxBorderBrush" />


    <Style TargetType="controls:ButtonGroup">
        <Setter Property="BorderBrush" Value="{ThemeResource ComboBoxBorderBrush}" />
        <Setter Property="FontWeight" Value="Light" />
    </Style>



    <!--  TEXT STYLES  -->

    <CharacterCasing x:Key="UpperCasing">Upper</CharacterCasing>

    <Style x:Key="FontFilterTitleStyle" TargetType="TextBlock">
        <Setter Property="FontSize" Value="16" />
        <Setter Property="FontWeight" Value="Light" />
        <Setter Property="Foreground" Value="{ThemeResource DefaultControlForegroundBrush}" />
        <Setter Property="FontFamily" Value="{StaticResource ThemeFontFamily}" />
    </Style>

    <Style x:Key="TitleTextStyle" TargetType="TextBlock">
        <Setter Property="FontFamily" Value="{StaticResource ThemeFontFamily}" />
        <Setter Property="FontSize" Value="26" />
        <Setter Property="FontWeight" Value="Light" />
    </Style>

    <Style x:Key="DescriptionStyle" BasedOn="{StaticResource BaseTextStyle}" TargetType="TextBlock">
        <Setter Property="Opacity" Value="0.7" />
        <Setter Property="FontFamily" Value="{StaticResource ThemeFontFamily}" />
        <Setter Property="FontWeight" Value="SemiBold" />
        <Setter Property="Foreground" Value="{ThemeResource DefaultControlForegroundBrush}" />
        <Setter Property="Margin" Value="0 0 0 8" />
        <Setter Property="OpticalMarginAlignment" Value="TrimSideBearings" />
    </Style>

    <Style x:Key="DescriptionContentStyle" TargetType="ContentPresenter">
        <Setter Property="Opacity" Value="0.7" />
        <Setter Property="FontFamily" Value="{StaticResource ThemeFontFamily}" />
        <Setter Property="FontWeight" Value="SemiBold" />
        <Setter Property="Foreground" Value="{ThemeResource DefaultControlForegroundBrush}" />
        <Setter Property="Margin" Value="0 0 0 8" />
        <Setter Property="FontSize" Value="13.333" />
        <Setter Property="FontWeight" Value="SemiBold" />
        <Setter Property="Foreground" Value="{ThemeResource TextForegroundBrush}" />
        <Setter Property="OpticalMarginAlignment" Value="TrimSideBearings" />
        <Setter Property="TextWrapping" Value="Wrap" />
        <Setter Property="LineStackingStrategy" Value="MaxHeight" />
        <Setter Property="TextLineBounds" Value="Full" />
    </Style>

    <Style x:Key="HintStyle" BasedOn="{StaticResource DescriptionStyle}" TargetType="TextBlock">
        <Setter Property="Margin" Value="0 4 0 2" />
        <Setter Property="Foreground" Value="{ThemeResource DefaultControlForegroundBrush}" />
        <Setter Property="FontStyle" Value="Italic" />
        <Setter Property="OpticalMarginAlignment" Value="None" />
    </Style>

    <Style x:Key="HeaderStyle" TargetType="TextBlock">
        <Setter Property="OpticalMarginAlignment" Value="TrimSideBearings" />
        <Setter Property="Foreground" Value="{ThemeResource DefaultControlForegroundBrush}" />
        <Setter Property="FontWeight" Value="SemiBold" />
        <Setter Property="FontSize" Value="16" />
        <Setter Property="Margin" Value="0 20 0 4" />
    </Style>

    <Style x:Key="SectionHeaderTextBlockStyle" BasedOn="{StaticResource SubheaderTextBlockStyle}" TargetType="TextBlock">
        <Setter Property="Foreground" Value="{ThemeResource DefaultControlForegroundBrush}" />
        <Setter Property="Visibility" Value="Collapsed" />
    </Style>

    <Style x:Key="BodyTextBlockStyle" TargetType="TextBlock">
        <Setter Property="FontSize" Value="13.333" />
        <Setter Property="FontFamily" Value="{StaticResource ThemeFontFamily}" />
        <Setter Property="FontWeight" Value="SemiBold" />
        <Setter Property="Foreground" Value="{ThemeResource TextForegroundBrush}" />
        <Setter Property="OpticalMarginAlignment" Value="TrimSideBearings" />
    </Style>

    <Style x:Key="BaseTextStyle" TargetType="TextBlock">
        <Setter Property="FontSize" Value="13.333" />
        <Setter Property="FontFamily" Value="{StaticResource ThemeFontFamily}" />
        <Setter Property="FontWeight" Value="SemiBold" />
        <Setter Property="Foreground" Value="{ThemeResource TextForegroundBrush}" />
        <Setter Property="OpticalMarginAlignment" Value="TrimSideBearings" />
        <Setter Property="TextTrimming" Value="None" />
        <Setter Property="TextWrapping" Value="Wrap" />
        <Setter Property="LineStackingStrategy" Value="MaxHeight" />
        <Setter Property="TextLineBounds" Value="Full" />
    </Style>




    <!--  DEFAULT TEMPLATES  -->

    <Style TargetType="controls:PreviewTip">
        <Setter Property="Foreground" Value="{StaticResource ControlForegroundBrush}" />
        <Setter Property="Background" Value="{StaticResource CardBackgroundBrush}" />
        <Setter Property="BackgroundSizing" Value="InnerBorderEdge" />
        <Setter Property="BorderBrush" Value="{StaticResource ComboBoxBorderBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="FontFamily" Value="{StaticResource ThemeFontFamily}" />
        <Setter Property="FontSize" Value="12" />
        <Setter Property="CornerRadius" Value="0" />
    </Style>

    <Style TargetType="ToolTip">
        <Setter Property="Foreground" Value="{StaticResource ControlForegroundBrush}" />
        <Setter Property="Background" Value="{StaticResource CardBackgroundBrush}" />
        <Setter Property="BackgroundSizing" Value="InnerBorderEdge" />
        <Setter Property="BorderBrush" Value="{StaticResource ComboBoxBorderBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="FontFamily" Value="{StaticResource ThemeFontFamily}" />
        <Setter Property="FontSize" Value="12" />
        <Setter Property="FontWeight" Value="SemiBold" />
        <Setter Property="CornerRadius" Value="0" />
        <Setter Property="MaxWidth" Value="450" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ToolTip">
                    <ContentPresenter
                        x:Name="LayoutRoot"
                        MaxWidth="{TemplateBinding MaxWidth}"
                        Padding="{TemplateBinding Padding}"
                        Background="{TemplateBinding Background}"
                        BackgroundSizing="{TemplateBinding BackgroundSizing}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Content="{TemplateBinding Content}"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        ContentTransitions="{TemplateBinding ContentTransitions}"
                        CornerRadius="{TemplateBinding CornerRadius}"
                        TextWrapping="Wrap">
                        <ContentPresenter.RenderTransform>
                            <CompositeTransform />
                        </ContentPresenter.RenderTransform>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="OpenStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition From="Opened" To="Closed">
                                        <Storyboard>
                                            <DoubleAnimation
                                                Storyboard.TargetName="LayoutRoot"
                                                Storyboard.TargetProperty="Opacity"
                                                To="0"
                                                Duration="0:0:0.1" />
                                        </Storyboard>
                                    </VisualTransition>
                                    <VisualTransition From="Closed" To="Opened">
                                        <Storyboard>
                                            <!-- Shadow needs some opacity to start -->
                                            <DoubleAnimation
                                                Storyboard.TargetName="LayoutRoot"
                                                Storyboard.TargetProperty="Opacity"
                                                From="0.001"
                                                To="1"
                                                Duration="0:0:0.07" />
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)">
                                                <EasingDoubleKeyFrame KeyTime="0" Value="10" />
                                                <SplineDoubleKeyFrame KeySpline="0.1 0.9 0.2 1" KeyTime="0:0:0.7" Value="0" />
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualTransition>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Closed">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Storyboard.TargetName="LayoutRoot"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0"
                                            Duration="0:0:0" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Opened" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                    </ContentPresenter>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="SettingsMenuStyle" TargetType="StackPanel">
        <Setter Target="Spacing" Value="8" />
        <Setter Target="Padding" Value="20 0 0 0" />
    </Style>

    <Style x:Key="FontListStyle" TargetType="Border" />

    <Style x:Key="CharacterMapStyle" TargetType="GridView">
        <Setter Property="Padding" Value="10 10 6 10" />
    </Style>

    <Style TargetType="controls:ModalPagePresenter">
        <Setter Property="ContentBackground" Value="Transparent" />
        <Setter Property="TitleBackgroundBrush" Value="Transparent" />
        <Setter Property="AllowShadows" Value="False" />
        <Setter Property="Background" Value="{ThemeResource DefaultPageBackgroundBrush}" />
    </Style>

    <Style x:Key="DefaultContentStyle" TargetType="ContentPresenter">
        <Setter Property="Foreground" Value="{ThemeResource DefaultControlForegroundBrush}" />
        <Setter Property="FontFamily" Value="{StaticResource ThemeFontFamily}" />
        <Setter Property="FontWeight" Value="SemiBold" />
    </Style>

    <Style x:Key="DefaultSettingsPresenterStyle" TargetType="controls:SettingsPresenter">
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Padding" Value="0,14,16,14" />
        <Setter Property="CornerRadius" Value="0" />
        <Setter Property="MinHeight" Value="67" />
        <Setter Property="IconSize" Value="24" />
        <Setter Property="FontSize" Value="20" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Margin" Value="0 4" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:SettingsPresenter">
                    <Grid
                        Padding="{TemplateBinding Padding}"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}">

                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="PlacementGroups">
                                <VisualState x:Name="RightPlacementState" />
                                <VisualState x:Name="BottomPlacementState">
                                    <VisualState.Setters>
                                        <Setter Target="Presenter.(Grid.Row)" Value="1" />
                                        <Setter Target="Presenter.(Grid.Column)" Value="0" />
                                        <Setter Target="Presenter.Margin" Value="0 12 0 0" />
                                    </VisualState.Setters>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="IconStates">
                                <VisualState x:Name="NoIconState" />
                                <VisualState x:Name="IconState" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="DescriptionStates">
                                <VisualState x:Name="NoDescriptionState" />
                                <VisualState x:Name="DescriptionState">
                                    <VisualState.Setters>
                                        <Setter Target="Description.Visibility" Value="Visible" />
                                    </VisualState.Setters>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ItemsGroup">
                                <VisualState x:Name="NoItemsState" />
                                <VisualState x:Name="HasItemsState">
                                    <VisualState.Setters>
                                        <Setter Target="ItemsRoot.Visibility" Value="Visible" />
                                    </VisualState.Setters>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>

                        <StackPanel VerticalAlignment="Center" Spacing="8">
                            <ContentPresenter
                                HorizontalAlignment="Stretch"
                                Content="{TemplateBinding Title}"
                                FontSize="{TemplateBinding FontSize}"
                                FontWeight="SemiBold"
                                Foreground="{ThemeResource DefaultControlForegroundBrush}"
                                OpticalMarginAlignment="TrimSideBearings" />
                            <ContentPresenter
                                x:Name="Description"
                                x:Load="False"
                                Content="{TemplateBinding Description}"
                                Style="{StaticResource DescriptionContentStyle}"
                                Visibility="Collapsed" />
                        </StackPanel>

                        <ContentPresenter
                            x:Name="Presenter"
                            Grid.Column="1"
                            Margin="18 0 0 0"
                            Content="{TemplateBinding Content}" />

                        <Border
                            x:Name="ItemsRoot"
                            x:Load="False"
                            Grid.Row="2"
                            Grid.ColumnSpan="2"
                            core:Properties.ClipToBounds="True"
                            Visibility="Collapsed">
                            <Border
                                Margin="20 8 0 0"
                                BorderBrush="{ThemeResource ComboBoxBorderBrush}"
                                BorderThickness="1 0 0 0">
                                <ItemsPresenter Margin="0 -8 0 0" />
                            </Border>
                        </Border>

                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style BasedOn="{StaticResource DefaultSettingsPresenterStyle}" TargetType="controls:SettingsPresenter" />

    <Style x:Key="SubItemSettingsPresenterStyle" BasedOn="{StaticResource DefaultSettingsPresenterStyle}" TargetType="controls:SettingsPresenter">
        <Setter Property="Padding" Value="20 14 0 14" />
        <Setter Property="FontSize" Value="16.666" />
    </Style>

    <Style TargetType="toolkit:GridSplitter">
        <Setter Property="IsTabStop" Value="True" />
        <Setter Property="UseSystemFocusVisuals" Value="True" />
        <Setter Property="HorizontalAlignment" Value="Stretch" />
        <Setter Property="VerticalAlignment" Value="Stretch" />
        <Setter Property="IsFocusEngagementEnabled" Value="True" />
        <Setter Property="MinWidth" Value="12" />
        <Setter Property="MinHeight" Value="16" />
        <Setter Property="BorderThickness" Value="0 0" />
        <Setter Property="Background" Value="{ThemeResource SystemControlHighlightChromeHighBrush}" />
        <Setter Property="GripperForeground" Value="{ThemeResource SystemControlForegroundAltHighBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="toolkit:GridSplitter">
                    <Grid
                        x:Name="RootGrid"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="GridSplitterStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="PointerOver">
                                    <VisualState.Setters>
                                        <Setter Target="RootGrid.Background" Value="{ThemeResource AppBarButtonBackgroundPointerOver}" />
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <VisualState.Setters>
                                        <Setter Target="RootGrid.Background" Value="{ThemeResource AppBarButtonBackgroundPressed}" />
                                    </VisualState.Setters>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <ContentPresenter
                            HorizontalContentAlignment="Stretch"
                            VerticalContentAlignment="Stretch"
                            Content="{TemplateBinding Element}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>




    <!--  GRIDVIEW  -->

    <ImageBrush x:Key="TileOverlayBrush" ImageSource="ms-appx:///Assets/ZuneAssets/HoverOverlay.png" />

    <Style x:Key="DefaultGridViewItemStyle" TargetType="GridViewItem">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseHighBrush}" />
        <Setter Property="TabNavigation" Value="Local" />
        <Setter Property="IsHoldingEnabled" Value="False" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="Margin" Value="0,0,4,4" />
        <Setter Property="AllowDrop" Value="False" />
        <Setter Property="UseSystemFocusVisuals" Value="True" />
        <Setter Property="FocusVisualMargin" Value="-2" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="GridViewItem">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />

                                <VisualState x:Name="PointerOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource CheckBoxBorderBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ImageHover" Storyboard.TargetProperty="Opacity">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="0.8" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>

                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource CheckBoxBorderBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>

                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource CheckBoxBorderBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>

                                <VisualState x:Name="PointerOverSelected">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource CheckBoxBorderBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ImageHover" Storyboard.TargetProperty="Opacity">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="1" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>

                                <VisualState x:Name="PressedSelected">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource CheckBoxBorderBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <ContentPresenter
                            x:Name="ContentPresenter"
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            ContentTransitions="{TemplateBinding ContentTransitions}"
                            Control.IsTemplateFocusTarget="True"
                            FocusVisualMargin="{TemplateBinding FocusVisualMargin}"
                            FocusVisualSecondaryBrush="{ThemeResource SystemControlHighlightListLowBrush}"
                            FocusVisualSecondaryThickness="2" />

                        <Rectangle
                            x:Name="ImageHover"
                            x:Load="False"
                            helpers:CompositionFactory.OpacityDuration="0:0:0.08"
                            Fill="{StaticResource TileOverlayBrush}"
                            IsHitTestVisible="False"
                            Opacity="0" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="DefaultThemeGridViewItemStyle" BasedOn="{StaticResource DefaultGridViewItemStyle}" TargetType="GridViewItem" />

    <Style x:Key="FontListGridViewItemStyle" BasedOn="{StaticResource DefaultGridViewItemStyle}" TargetType="GridViewItem" />

    <Style BasedOn="{StaticResource DefaultGridViewItemStyle}" TargetType="GridViewItem" />




    <!--  DATA TEMPLATES  -->

    <DataTemplate x:Key="FontListGroupHeaderTemplate">
        <GridViewItem
            x:Name="Root"
            Margin="0"
            Padding="0"
            HorizontalAlignment="Stretch"
            HorizontalContentAlignment="Stretch"
            BorderBrush="Transparent"
            BorderThickness="0"
            IsHitTestVisible="True">
            <Grid>
                <TextBlock
                    Padding="15,14,15,4"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    FontSize="30"
                    FontWeight="Light"
                    Text="{Binding Key, Converter={StaticResource TitleConverter}}" />
            </Grid>
        </GridViewItem>
    </DataTemplate>

    <DataTemplate x:Key="DefaultControlHeaderTemplate">
        <ContentPresenter
            Content="{Binding Converter={StaticResource Upper}}"
            FontFamily="Zegoe Caps, XamlAutoFontFamily"
            FontSize="11"
            FontWeight="Black"
            Foreground="#828689" />
    </DataTemplate>




    <!--  BUTTONS  -->

    <Style x:Key="DefaultMenuButtonStyle" TargetType="controls:MenuButton">
        <Setter Property="FontSize" Value="12" />
        <Setter Property="FontWeight" Value="Bold" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Foreground" Value="#373A3D" />
        <Setter Property="HorizontalAlignment" Value="Stretch" />
        <Setter Property="Padding" Value="0 4" />
        <Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:MenuButton">
                    <StackPanel
                        x:Name="RootGrid"
                        Padding="{TemplateBinding Padding}"
                        Background="{TemplateBinding Background}"
                        Orientation="Horizontal"
                        Spacing="6"
                        ToolTipService.ToolTip="{TemplateBinding Content}">

                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal">
                                    <Storyboard />
                                </VisualState>

                                <VisualState x:Name="PointerOver">
                                    <VisualState.Setters />
                                    <Storyboard />
                                </VisualState>

                                <VisualState x:Name="Pressed">
                                    <Storyboard />
                                </VisualState>

                                <VisualState x:Name="Disabled">
                                    <VisualState.Setters>
                                        <Setter Target="RootGrid.Opacity" Value="0.5" />
                                    </VisualState.Setters>
                                </VisualState>

                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CheckStates">
                                <VisualState x:Name="Checked">
                                    <VisualState.Setters>
                                        <Setter Target="CheckGlyph.Opacity" Value="1" />
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="Unchecked">
                                    <VisualState.Setters>
                                        <Setter Target="CheckGlyph.Opacity" Value="0" />
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="Indeterminate">
                                    <VisualState.Setters>
                                        <Setter Target="CheckGlyph.Opacity" Value="0" />
                                    </VisualState.Setters>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <Path
                            x:Name="CheckGlyph"
                            Canvas.Left="0"
                            Canvas.Top="6.10352e-005"
                            Width="7"
                            Height="13"
                            Data="F1 M 6.99908,7.49908L 0,6.10352e-005L 0,14.9981L 6.99908,7.49908 Z "
                            Fill="#170F03"
                            Opacity="0"
                            Stretch="Fill" />

                        <ContentPresenter
                            VerticalAlignment="Center"
                            Content="{Binding Converter={StaticResource Upper}, RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Content}"
                            TextLineBounds="Tight" />

                    </StackPanel>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="LabelAppBarButtonStyle" TargetType="AppBarButton">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Foreground" Value="{ThemeResource AppBarButtonForeground}" />
        <Setter Property="BorderBrush" Value="{ThemeResource ComboBoxBorderBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="HorizontalAlignment" Value="Left" />
        <Setter Property="VerticalAlignment" Value="Stretch" />
        <Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
        <Setter Property="FontWeight" Value="SemiBold" />
        <Setter Property="Foreground" Value="{ThemeResource DefaultControlForegroundBrush}" />
        <Setter Property="Padding" Value="12" />
        <Setter Property="MaxWidth" Value="NaN" />
        <Setter Property="Width" Value="NaN" />
        <Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}" />
        <Setter Property="AllowFocusOnInteraction" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="AppBarButton">
                    <Grid x:Name="Root" Background="{TemplateBinding Background}">

                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="PointerOver">
                                    <VisualState.Setters>
                                        <Setter Target="Border.Opacity" Value="1" />
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <VisualState.Setters>
                                        <Setter Target="Border.Opacity" Value="1" />
                                        <Setter Target="Border.Background" Value="{ThemeResource SelectedPointerOverBackgroundBrush}" />
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <VisualState.Setters>
                                        <Setter Target="Root.Opacity" Value="0.5" />
                                    </VisualState.Setters>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <Border
                            x:Name="Border"
                            helpers:CompositionFactory.OpacityDuration="0:0:0.1"
                            Background="White"
                            BackgroundTransition="{StaticResource DefaultBrushTransition}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Opacity="0" />

                        <StackPanel Padding="{TemplateBinding Padding}" Orientation="Horizontal">
                            <ContentPresenter
                                x:Name="Content"
                                Content="{TemplateBinding Icon}"
                                Foreground="{TemplateBinding Foreground}" />

                            <TextBlock
                                Margin="12 -2 0 0"
                                VerticalAlignment="Center"
                                FontFamily="{StaticResource ContentControlThemeFontFamily}"
                                FontSize="12"
                                FontWeight="Bold"
                                Text="{Binding Label, Converter={StaticResource Upper}, RelativeSource={RelativeSource Mode=TemplatedParent}}" />
                        </StackPanel>


                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="TransparentButton" TargetType="controls:UXButton">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Foreground" Value="{ThemeResource ButtonForegroundBrush}" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Padding" Value="8,4,8,5" />
        <Setter Property="HorizontalAlignment" Value="Stretch" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
        <Setter Property="FontWeight" Value="Normal" />
        <Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
        <Setter Property="FocusVisualMargin" Value="-3" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:UXButton">
                    <Grid
                        x:Name="RootGrid"
                        helpers:CompositionFactory.OpacityDuration="0:0:0.1"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}">

                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="PointerOver">
                                    <VisualState.Setters>
                                        <Setter Target="ContentPresenter.Foreground" Value="{ThemeResource ButtonForegroundPointerOverBrush}" />
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="Pressed" />
                                <VisualState x:Name="Disabled">
                                    <VisualState.Setters>
                                        <Setter Target="RootGrid.Opacity" Value="0.4" />
                                        <Setter Target="DropDownGlyph.Opacity" Value="0" />
                                    </VisualState.Setters>
                                </VisualState>
                            </VisualStateGroup>

                            <VisualStateGroup x:Name="ActiveStates">
                                <VisualState x:Name="IsActive">
                                    <VisualState.Setters>
                                        <Setter Target="RootGrid.BorderBrush" Value="{ThemeResource ComboBoxBorderBrush}" />
                                        <Setter Target="RootGrid.Background" Value="{ThemeResource ButtonBackgroundBrush}" />
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="IsNotActive" />
                            </VisualStateGroup>


                            <VisualStateGroup x:Name="HintStates">
                                <VisualState x:Name="HintHidden" />
                                <VisualState x:Name="HintVisible">
                                    <VisualState.Setters>
                                        <Setter Target="HintColumn.Width" Value="20" />
                                        <Setter Target="DropDownGlyph.Visibility" Value="Visible" />
                                    </VisualState.Setters>
                                </VisualState>
                            </VisualStateGroup>

                            <VisualStateGroup x:Name="LabelStates">
                                <VisualState x:Name="LabelHidden" />
                                <VisualState x:Name="LabelVisible">
                                    <VisualState.Setters>
                                        <Setter Target="ContentPresenter.Height" Value="32" />
                                        <Setter Target="ContentPresenter.VerticalAlignment" Value="Top" />
                                        <Setter Target="LabelPresenter.Visibility" Value="Visible" />
                                    </VisualState.Setters>
                                </VisualState>
                            </VisualStateGroup>

                        </VisualStateManager.VisualStateGroups>

                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition x:Name="HintColumn" Width="0" />
                        </Grid.ColumnDefinitions>

                        <ContentPresenter
                            x:Name="ContentPresenter"
                            Padding="{TemplateBinding Padding}"
                            HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                            AutomationProperties.AccessibilityView="Raw"
                            Content="{TemplateBinding Content}"
                            ContentTemplate="{TemplateBinding ContentTemplate}"
                            ContentTransitions="{TemplateBinding ContentTransitions}" />

                        <TextBlock
                            x:Name="LabelPresenter"
                            x:Load="False"
                            Margin="0 0 0 6"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Bottom"
                            FontSize="10"
                            FontWeight="SemiBold"
                            Foreground="{ThemeResource DefaultControlForegroundBrush}"
                            Text="{Binding TemplateSettings.EffectiveLabel, RelativeSource={RelativeSource Mode=TemplatedParent}}"
                            Visibility="Collapsed" />

                        <FontIcon
                            x:Name="DropDownGlyph"
                            x:Load="False"
                            Grid.Column="1"
                            Margin="0,2,10,0"
                            HorizontalAlignment="Right"
                            VerticalAlignment="Center"
                            helpers:CompositionFactory.OpacityDuration="0:0:0.1"
                            AutomationProperties.AccessibilityView="Raw"
                            FontFamily="{ThemeResource SymbolThemeFontFamily}"
                            FontSize="9"
                            Foreground="{TemplateBinding Foreground}"
                            Glyph="&#xE936;"
                            IsHitTestVisible="False"
                            Visibility="Collapsed" />
                    </Grid>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="TransparentHintButton" BasedOn="{StaticResource TransparentButton}" TargetType="controls:UXButton">
        <Setter Property="IsHintVisible" Value="True" />
    </Style>

    <Style BasedOn="{StaticResource DefaultThemeButtonStyle}" TargetType="controls:UXButton" />

    <Style x:Key="MapInfoButtonStyle" BasedOn="{StaticResource TransparentButton}" TargetType="controls:UXButton">
        <Setter Property="Height" Value="47" />
        <Setter Property="MinWidth" Value="47" />
    </Style>

    <Style x:Key="DefaultThemeAppBarButtonStyle" BasedOn="{StaticResource TransparentButton}" TargetType="controls:UXButton">
        <Setter Property="HorizontalAlignment" Value="Left" />
        <Setter Property="VerticalAlignment" Value="Top" />
        <Setter Property="Width" Value="50" />
        <Setter Property="Padding" Value="0" />
    </Style>

    <Style x:Key="DevToolsAppBarButtonStyle" BasedOn="{StaticResource DefaultThemeAppBarButtonStyle}" TargetType="controls:UXButton">
        <Setter Property="Height" Value="52" />
        <Setter Property="IsLabelVisible" Value="True" />
        <Setter Property="LabelCasing" Value="Upper" />
    </Style>

    <Style x:Key="CopyButtonStyle" BasedOn="{StaticResource DefaultThemeAppBarButtonStyle}" TargetType="controls:UXButton">
        <Setter Property="Height" Value="50" />
        <Setter Property="Width" Value="50" />
    </Style>

    <Style x:Key="DefaultThemeButtonStyle" TargetType="Button">
        <Setter Property="Background" Value="{ThemeResource ButtonBackgroundBrush}" />
        <Setter Property="Foreground" Value="{ThemeResource ControlForegroundBrush}" />
        <Setter Property="BorderBrush" Value="{ThemeResource ComboBoxBorderBrush}" />
        <Setter Property="BorderThickness" Value="{ThemeResource ButtonRevealBorderThemeThickness}" />
        <Setter Property="Padding" Value="12 4" />
        <Setter Property="FontSize" Value="10.667" />
        <Setter Property="HorizontalAlignment" Value="Left" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
        <Setter Property="FontWeight" Value="Black" />
        <Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}" />
        <Setter Property="FocusVisualMargin" Value="-3" />
        <Setter Property="CornerRadius" Value="4" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Grid
                        x:Name="RootGrid"
                        Background="{TemplateBinding Background}"
                        BackgroundTransition="{StaticResource RootBackgroundTransition}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{TemplateBinding CornerRadius}">

                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal">
                                    <Storyboard>
                                        <PointerUpThemeAnimation Storyboard.TargetName="ContentPresenter" />
                                    </Storyboard>
                                </VisualState>

                                <VisualState x:Name="PointerOver">
                                    <VisualState.Setters>
                                        <Setter Target="RootGrid.Background" Value="{ThemeResource ButtonPointerOverBackgroundBrush}" />
                                    </VisualState.Setters>
                                    <Storyboard>
                                        <PointerUpThemeAnimation Storyboard.TargetName="ContentPresenter" />
                                    </Storyboard>
                                </VisualState>

                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <PointerDownThemeAnimation Storyboard.TargetName="ContentPresenter" />
                                    </Storyboard>
                                </VisualState>

                                <VisualState x:Name="Disabled">
                                    <VisualState.Setters>
                                        <Setter Target="RootGrid.Background" Value="{ThemeResource ButtonRevealBackgroundDisabled}" />
                                        <Setter Target="RootGrid.BorderBrush" Value="{ThemeResource ButtonRevealBorderBrushDisabled}" />
                                        <Setter Target="ContentPresenter.Foreground" Value="{ThemeResource ButtonForegroundDisabled}" />
                                    </VisualState.Setters>
                                    <Storyboard>
                                        <PointerUpThemeAnimation Storyboard.TargetName="ContentPresenter" />
                                    </Storyboard>
                                </VisualState>

                            </VisualStateGroup>

                        </VisualStateManager.VisualStateGroups>
                        <ContentPresenter
                            x:Name="ContentPresenter"
                            Padding="{TemplateBinding Padding}"
                            HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                            AutomationProperties.AccessibilityView="Raw"
                            Content="{Binding Converter={StaticResource Upper}, RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Content}"
                            ContentTemplate="{TemplateBinding ContentTemplate}"
                            ContentTransitions="{TemplateBinding ContentTransitions}" />

                    </Grid>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style BasedOn="{StaticResource DefaultThemeButtonStyle}" TargetType="Button" />

    <Style x:Key="AccentButtonStyle" BasedOn="{StaticResource DefaultThemeButtonStyle}" TargetType="Button" />

    <Style x:Key="QuickCompareContainerStyle" TargetType="Button">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Foreground" Value="{ThemeResource ButtonForeground}" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="HorizontalAlignment" Value="Stretch" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
        <Setter Property="FontWeight" Value="Normal" />
        <Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
        <Setter Property="FocusVisualMargin" Value="-3" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal">
                                    <Storyboard>
                                        <PointerUpThemeAnimation Storyboard.TargetName="ContentPresenter" />
                                    </Storyboard>
                                </VisualState>

                                <VisualState x:Name="PointerOver">
                                    <Storyboard>
                                        <PointerUpThemeAnimation Storyboard.TargetName="ContentPresenter" />
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ImageHover" Storyboard.TargetProperty="Opacity">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="0.8" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>

                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <PointerDownThemeAnimation Storyboard.TargetName="ContentPresenter" />
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ImageHover" Storyboard.TargetProperty="Opacity">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="0.8" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>

                                <VisualState x:Name="Disabled">
                                    <VisualState.Setters>
                                        <Setter Target="RootGrid.Opacity" Value="0.5" />
                                    </VisualState.Setters>
                                </VisualState>

                            </VisualStateGroup>

                        </VisualStateManager.VisualStateGroups>
                        <ContentPresenter
                            x:Name="ContentPresenter"
                            Padding="{TemplateBinding Padding}"
                            HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                            AutomationProperties.AccessibilityView="Raw"
                            Background="{TemplateBinding Background}"
                            Content="{TemplateBinding Content}"
                            ContentTemplate="{TemplateBinding ContentTemplate}"
                            ContentTransitions="{TemplateBinding ContentTransitions}" />
                        <Rectangle
                            x:Name="ImageHover"
                            x:Load="False"
                            Margin="-8 0 0 0"
                            helpers:CompositionFactory.OpacityDuration="0:0:0.08"
                            Fill="{StaticResource TileOverlayBrush}"
                            IsHitTestVisible="False"
                            Opacity="0" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <DataTemplate x:Key="LabelButtonContentTemplate">
        <Grid ColumnSpacing="12" Margin="4 0 0 0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>

            <FontIcon
                FontFamily="{ThemeResource SymbolThemeFontFamily}"
                FontSize="30"
                Glyph="{Binding Glyph}" />

            <StackPanel
                Grid.Column="1"
                Margin="0 -2 0 0"
                Spacing="2">
                <TextBlock FontWeight="Light">
                    <Run FontSize="18" Text="{Binding Title, Converter={StaticResource FontSelectorTitleConverter}}" />
                    <Run
                        FontSize="14"
                        FontWeight="SemiLight"
                        Foreground="{ThemeResource TextFillColorSecondaryBrush}"
                        Text="{Binding Shortcut, Converter={StaticResource FontSelectorTitleConverter}}" />
                </TextBlock>
                <TextBlock
                    FontSize="11"
                    FontWeight="SemiBold"
                    Foreground="{ThemeResource TextFillColorSecondaryBrush}"
                    Text="{Binding Description, Converter={StaticResource Upper}}"
                    TextWrapping="Wrap" />
            </StackPanel>
        </Grid>
    </DataTemplate>

    <DataTemplate x:Key="CompactLabelButtonContentTemplate">
        <StackPanel Spacing="8">
            <FontIcon
                HorizontalAlignment="Center"
                FontFamily="{ThemeResource SymbolThemeFontFamily}"
                FontSize="24"
                Glyph="{Binding Glyph}" />
            <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
                <TextBlock FontWeight="Light" TextAlignment="Center">
                    <Run FontSize="14" Text="{Binding Title, Converter={StaticResource FontSelectorTitleConverter}}" />
                    <Run
                        FontSize="12"
                        FontWeight="SemiLight"
                        Foreground="{ThemeResource ButtonDisabledForegroundThemeBrush}"
                        Text="{Binding Shortcut, Converter={StaticResource FontSelectorTitleConverter}}" />
                </TextBlock>
            </StackPanel>
        </StackPanel>
    </DataTemplate>


    <!--  SCROLLING  -->

    <Style TargetType="ScrollBar">
        <Setter Property="MinWidth" Value="12" />
        <Setter Property="MinHeight" Value="{ThemeResource ScrollBarSize}" />
        <Setter Property="Background" Value="{ThemeResource ScrollBarBackground}" />
        <Setter Property="Foreground" Value="{ThemeResource ScrollBarForeground}" />
        <Setter Property="BorderBrush" Value="{ThemeResource ScrollBarBorderBrush}" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ScrollBar">
                    <Grid x:Name="Root">

                        <Grid.Resources>
                            <ControlTemplate x:Key="RepeatButtonTemplate" TargetType="RepeatButton">
                                <Grid x:Name="Root" Background="Transparent">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualState x:Name="Normal" />
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>

                                </Grid>
                            </ControlTemplate>
                            <ControlTemplate x:Key="HorizontalIncrementTemplate" TargetType="RepeatButton">
                                <Grid
                                    x:Name="Root"
                                    Background="{ThemeResource ScrollBarButtonBackground}"
                                    BorderBrush="{ThemeResource ScrollBarButtonBorderBrush}">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualState x:Name="Normal" />
                                            <VisualState x:Name="PointerOver">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Background">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarButtonBackgroundPointerOver}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="BorderBrush">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarButtonBorderBrushPointerOver}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Arrow" Storyboard.TargetProperty="Foreground">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarButtonArrowForegroundPointerOver}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Background">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarButtonBackgroundPressed}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="BorderBrush">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarButtonBorderBrushPressed}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Arrow" Storyboard.TargetProperty="Foreground">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarButtonArrowForegroundPressed}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Background">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarButtonBackgroundPressed}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="BorderBrush">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarButtonBorderBrushDisabled}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Arrow" Storyboard.TargetProperty="Foreground">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarButtonArrowForegroundDisabled}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <FontIcon
                                        x:Name="Arrow"
                                        FontFamily="{ThemeResource SymbolThemeFontFamily}"
                                        FontSize="{ThemeResource ScrollBarButtonArrowIconFontSize}"
                                        Foreground="{ThemeResource ScrollBarButtonArrowForeground}"
                                        Glyph="&#xE937;"
                                        MirroredWhenRightToLeft="True" />

                                </Grid>
                            </ControlTemplate>
                            <ControlTemplate x:Key="HorizontalDecrementTemplate" TargetType="RepeatButton">
                                <Grid
                                    x:Name="Root"
                                    Background="{ThemeResource ScrollBarButtonBackground}"
                                    BorderBrush="{ThemeResource ScrollBarButtonBorderBrush}">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualState x:Name="Normal" />
                                            <VisualState x:Name="PointerOver">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Background">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarButtonBackgroundPointerOver}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="BorderBrush">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarButtonBorderBrushPointerOver}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Arrow" Storyboard.TargetProperty="Foreground">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarButtonArrowForegroundPointerOver}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Background">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarButtonBackgroundPressed}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="BorderBrush">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarButtonBorderBrushPressed}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Arrow" Storyboard.TargetProperty="Foreground">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarButtonArrowForegroundPressed}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Background">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarButtonBackgroundPressed}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="BorderBrush">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarButtonBorderBrushDisabled}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Arrow" Storyboard.TargetProperty="Foreground">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarButtonArrowForegroundDisabled}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <FontIcon
                                        x:Name="Arrow"
                                        FontFamily="{ThemeResource SymbolThemeFontFamily}"
                                        FontSize="{ThemeResource ScrollBarButtonArrowIconFontSize}"
                                        Foreground="{ThemeResource ScrollBarButtonArrowForeground}"
                                        Glyph="&#xE938;"
                                        MirroredWhenRightToLeft="True" />

                                </Grid>
                            </ControlTemplate>
                            <ControlTemplate x:Key="VerticalIncrementTemplate" TargetType="RepeatButton">
                                <Grid
                                    x:Name="Root"
                                    Background="{ThemeResource ScrollBarButtonBackground}"
                                    BorderBrush="{ThemeResource ScrollBarButtonBorderBrush}">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualState x:Name="Normal" />
                                            <VisualState x:Name="PointerOver">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Background">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarButtonBackgroundPointerOver}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="BorderBrush">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarButtonBorderBrushPointerOver}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Arrow" Storyboard.TargetProperty="Foreground">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarButtonArrowForegroundPointerOver}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Background">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarButtonBackgroundPressed}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="BorderBrush">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarButtonBorderBrushPressed}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Arrow" Storyboard.TargetProperty="Foreground">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarButtonArrowForegroundPressed}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Background">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarButtonBackgroundPressed}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="BorderBrush">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarButtonBorderBrushDisabled}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Arrow" Storyboard.TargetProperty="Foreground">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarButtonArrowForegroundDisabled}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <FontIcon
                                        x:Name="Arrow"
                                        FontFamily="{ThemeResource SymbolThemeFontFamily}"
                                        FontSize="{ThemeResource ScrollBarButtonArrowIconFontSize}"
                                        Foreground="{ThemeResource ScrollBarButtonArrowForeground}"
                                        Glyph="&#xE936;" />

                                </Grid>
                            </ControlTemplate>
                            <ControlTemplate x:Key="VerticalDecrementTemplate" TargetType="RepeatButton">
                                <Grid
                                    x:Name="Root"
                                    Background="{ThemeResource ScrollBarButtonBackground}"
                                    BorderBrush="{ThemeResource ScrollBarButtonBorderBrush}">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualState x:Name="Normal" />
                                            <VisualState x:Name="PointerOver">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Background">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarButtonBackgroundPointerOver}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="BorderBrush">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarButtonBorderBrushPointerOver}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Arrow" Storyboard.TargetProperty="Foreground">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarButtonArrowForegroundPointerOver}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Background">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarButtonBackgroundPressed}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="BorderBrush">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarButtonBorderBrushPressed}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Arrow" Storyboard.TargetProperty="Foreground">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarButtonArrowForegroundPressed}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Background">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarButtonBackgroundPressed}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="BorderBrush">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarButtonBorderBrushDisabled}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Arrow" Storyboard.TargetProperty="Foreground">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarButtonArrowForegroundDisabled}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <FontIcon
                                        x:Name="Arrow"
                                        FontFamily="{ThemeResource SymbolThemeFontFamily}"
                                        FontSize="{ThemeResource ScrollBarButtonArrowIconFontSize}"
                                        Foreground="{ThemeResource ScrollBarButtonArrowForeground}"
                                        Glyph="&#xE935;" />

                                </Grid>
                            </ControlTemplate>
                            <ControlTemplate x:Key="VerticalThumbTemplate" TargetType="Thumb">
                                <Rectangle x:Name="ThumbVisual" Fill="{TemplateBinding Background}">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualState x:Name="Normal" />
                                            <VisualState x:Name="PointerOver">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ThumbVisual" Storyboard.TargetProperty="Fill">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="Black" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ThumbVisual" Storyboard.TargetProperty="Fill">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarThumbFillPressed}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ThumbVisual" Storyboard.TargetProperty="Fill">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarThumbFillDisabled}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <DoubleAnimation
                                                        Storyboard.TargetName="ThumbVisual"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="0"
                                                        Duration="0" />
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                </Rectangle>
                            </ControlTemplate>
                            <ControlTemplate x:Key="HorizontalThumbTemplate" TargetType="Thumb">
                                <Rectangle x:Name="ThumbVisual" Fill="{TemplateBinding Background}">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualState x:Name="Normal" />
                                            <VisualState x:Name="PointerOver">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ThumbVisual" Storyboard.TargetProperty="Fill">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarThumbFillPointerOver}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ThumbVisual" Storyboard.TargetProperty="Fill">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarThumbFillPressed}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ThumbVisual" Storyboard.TargetProperty="Fill">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ScrollBarThumbFillDisabled}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <DoubleAnimation
                                                        Storyboard.TargetName="ThumbVisual"
                                                        Storyboard.TargetProperty="Opacity"
                                                        To="0"
                                                        Duration="0" />
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                </Rectangle>
                            </ControlTemplate>
                        </Grid.Resources>

                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />

                                <VisualState x:Name="Disabled">
                                    <VisualState.Setters>
                                        <Setter Target="Root.Background" Value="{ThemeResource ScrollBarBackgroundDisabled}" />
                                        <Setter Target="Root.BorderBrush" Value="{ThemeResource ScrollBarBorderBrushDisabled}" />
                                        <Setter Target="Root.Opacity" Value="0.5" />
                                        <Setter Target="HorizontalTrackRect.Stroke" Value="{ThemeResource ScrollBarTrackStrokeDisabled}" />
                                        <Setter Target="VerticalTrackRect.Stroke" Value="{ThemeResource ScrollBarTrackStrokeDisabled}" />
                                        <Setter Target="HorizontalTrackRect.Fill" Value="{ThemeResource ScrollBarTrackFillDisabled}" />
                                        <Setter Target="VerticalTrackRect.Fill" Value="{ThemeResource ScrollBarTrackFillDisabled}" />
                                        <Setter Target="HorizontalPanningThumb.Background" Value="{ThemeResource ScrollBarPanningThumbBackgroundDisabled}" />
                                        <Setter Target="VerticalPanningThumb.Background" Value="{ThemeResource ScrollBarPanningThumbBackgroundDisabled}" />
                                    </VisualState.Setters>
                                </VisualState>

                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ScrollingIndicatorStates">
                                <VisualState x:Name="TouchIndicator">
                                    <VisualState.Setters>
                                        <Setter Target="HorizontalRoot.Visibility" Value="Collapsed" />
                                        <Setter Target="VerticalRoot.Visibility" Value="Collapsed" />
                                        <Setter Target="HorizontalPanningRoot.Opacity" Value="1" />
                                        <Setter Target="VerticalPanningRoot.Opacity" Value="1" />
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="MouseIndicator">
                                    <VisualState.Setters>
                                        <Setter Target="HorizontalPanningRoot.Visibility" Value="Collapsed" />
                                        <Setter Target="VerticalPanningRoot.Visibility" Value="Collapsed" />
                                        <Setter Target="HorizontalRoot.IsHitTestVisible" Value="True" />
                                        <Setter Target="VerticalRoot.IsHitTestVisible" Value="True" />
                                        <Setter Target="HorizontalThumb.Opacity" Value="1" />
                                        <Setter Target="VerticalThumb.Opacity" Value="1" />
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="NoIndicator">

                                    <Storyboard>
                                        <ColorAnimation
                                            Storyboard.TargetName="HorizontalThumb"
                                            Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)"
                                            To="{ThemeResource ScrollBarPanningThumbBackgroundColor}"
                                            Duration="{ThemeResource ScrollBarContractDuration}" />
                                        <ColorAnimation
                                            Storyboard.TargetName="VerticalThumb"
                                            Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)"
                                            To="{ThemeResource ScrollBarPanningThumbBackgroundColor}"
                                            Duration="{ThemeResource ScrollBarContractDuration}" />
                                        <DoubleAnimation
                                            Storyboard.TargetName="VerticalThumbTransform"
                                            Storyboard.TargetProperty="ScaleX"
                                            To="{ThemeResource SmallScrollThumbScale}"
                                            Duration="{ThemeResource ScrollBarContractDuration}" />
                                        <DoubleAnimation
                                            Storyboard.TargetName="VerticalThumbTransform"
                                            Storyboard.TargetProperty="TranslateX"
                                            To="{ThemeResource SmallScrollThumbOffset}"
                                            Duration="{ThemeResource ScrollBarContractDuration}" />
                                        <DoubleAnimation
                                            Storyboard.TargetName="HorizontalThumbTransform"
                                            Storyboard.TargetProperty="ScaleY"
                                            To="{ThemeResource SmallScrollThumbScale}"
                                            Duration="{ThemeResource ScrollBarContractDuration}" />
                                        <DoubleAnimation
                                            Storyboard.TargetName="HorizontalThumbTransform"
                                            Storyboard.TargetProperty="TranslateY"
                                            To="{ThemeResource SmallScrollThumbOffset}"
                                            Duration="{ThemeResource ScrollBarContractDuration}" />
                                        <DoubleAnimation
                                            Storyboard.TargetName="VerticalSmallIncrease"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0"
                                            Duration="{ThemeResource ScrollBarContractDuration}" />
                                        <DoubleAnimation
                                            Storyboard.TargetName="VerticalLargeIncrease"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0"
                                            Duration="{ThemeResource ScrollBarContractDuration}" />
                                        <DoubleAnimation
                                            Storyboard.TargetName="VerticalLargeDecrease"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0"
                                            Duration="{ThemeResource ScrollBarContractDuration}" />
                                        <DoubleAnimation
                                            Storyboard.TargetName="VerticalThumb"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0"
                                            Duration="{ThemeResource ScrollBarContractDuration}" />
                                        <DoubleAnimation
                                            Storyboard.TargetName="VerticalSmallDecrease"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0"
                                            Duration="{ThemeResource ScrollBarContractDuration}" />
                                        <DoubleAnimation
                                            Storyboard.TargetName="VerticalTrackRect"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0"
                                            Duration="{ThemeResource ScrollBarContractDuration}" />
                                        <DoubleAnimation
                                            Storyboard.TargetName="HorizontalSmallIncrease"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0"
                                            Duration="{ThemeResource ScrollBarContractDuration}" />
                                        <DoubleAnimation
                                            Storyboard.TargetName="HorizontalLargeIncrease"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0"
                                            Duration="{ThemeResource ScrollBarContractDuration}" />
                                        <DoubleAnimation
                                            Storyboard.TargetName="HorizontalLargeDecrease"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0"
                                            Duration="{ThemeResource ScrollBarContractDuration}" />
                                        <DoubleAnimation
                                            Storyboard.TargetName="HorizontalThumb"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0"
                                            Duration="{ThemeResource ScrollBarContractDuration}" />
                                        <DoubleAnimation
                                            Storyboard.TargetName="HorizontalSmallDecrease"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0"
                                            Duration="{ThemeResource ScrollBarContractDuration}" />
                                        <DoubleAnimation
                                            Storyboard.TargetName="HorizontalTrackRect"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0"
                                            Duration="{ThemeResource ScrollBarContractDuration}" />
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalRoot" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="{ThemeResource ScrollBarContractDuration}">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalRoot" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="{ThemeResource ScrollBarContractDuration}">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation
                                            Storyboard.TargetName="HorizontalPanningRoot"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0"
                                            Duration="{ThemeResource ScrollBarContractDuration}" />
                                        <DoubleAnimation
                                            Storyboard.TargetName="VerticalPanningRoot"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0"
                                            Duration="{ThemeResource ScrollBarContractDuration}" />
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalPanningRoot" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="{ThemeResource ScrollBarContractDuration}">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalPanningRoot" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="{ThemeResource ScrollBarContractDuration}">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>

                            </VisualStateGroup>
                            <!--<VisualStateGroup x:Name="ConsciousStates">

                                <VisualStateGroup.Transitions>
                                    <VisualTransition From="Expanded" To="Collapsed">

                                        <Storyboard>
                                            <ColorAnimation
                                                BeginTime="{ThemeResource ScrollBarContractBeginTime}"
                                                Storyboard.TargetName="HorizontalThumb"
                                                Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)"
                                                To="{ThemeResource ScrollBarPanningThumbBackgroundColor}"
                                                Duration="{ThemeResource ScrollBarContractDuration}" />
                                            <ColorAnimation
                                                BeginTime="{ThemeResource ScrollBarContractBeginTime}"
                                                Storyboard.TargetName="VerticalThumb"
                                                Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)"
                                                To="{ThemeResource ScrollBarPanningThumbBackgroundColor}"
                                                Duration="{ThemeResource ScrollBarContractDuration}" />
                                            <DoubleAnimation
                                                BeginTime="{ThemeResource ScrollBarContractBeginTime}"
                                                Storyboard.TargetName="VerticalThumbTransform"
                                                Storyboard.TargetProperty="ScaleX"
                                                To="{ThemeResource SmallScrollThumbScale}"
                                                Duration="{ThemeResource ScrollBarContractDuration}" />
                                            <DoubleAnimation
                                                BeginTime="{ThemeResource ScrollBarContractBeginTime}"
                                                Storyboard.TargetName="VerticalThumbTransform"
                                                Storyboard.TargetProperty="TranslateX"
                                                To="{ThemeResource SmallScrollThumbOffset}"
                                                Duration="{ThemeResource ScrollBarContractDuration}" />
                                            <DoubleAnimation
                                                BeginTime="{ThemeResource ScrollBarContractBeginTime}"
                                                Storyboard.TargetName="HorizontalThumbTransform"
                                                Storyboard.TargetProperty="ScaleY"
                                                To="{ThemeResource SmallScrollThumbScale}"
                                                Duration="{ThemeResource ScrollBarContractDuration}" />
                                            <DoubleAnimation
                                                BeginTime="{ThemeResource ScrollBarContractBeginTime}"
                                                Storyboard.TargetName="HorizontalThumbTransform"
                                                Storyboard.TargetProperty="TranslateY"
                                                To="{ThemeResource SmallScrollThumbOffset}"
                                                Duration="{ThemeResource ScrollBarContractDuration}" />
                                            <DoubleAnimation
                                                BeginTime="{ThemeResource ScrollBarContractBeginTime}"
                                                Storyboard.TargetName="VerticalSmallIncrease"
                                                Storyboard.TargetProperty="Opacity"
                                                To="0"
                                                Duration="{ThemeResource ScrollBarContractDuration}" />
                                            <DoubleAnimation
                                                BeginTime="{ThemeResource ScrollBarContractBeginTime}"
                                                Storyboard.TargetName="VerticalLargeIncrease"
                                                Storyboard.TargetProperty="Opacity"
                                                To="0"
                                                Duration="{ThemeResource ScrollBarContractDuration}" />
                                            <DoubleAnimation
                                                BeginTime="{ThemeResource ScrollBarContractBeginTime}"
                                                Storyboard.TargetName="VerticalLargeDecrease"
                                                Storyboard.TargetProperty="Opacity"
                                                To="0"
                                                Duration="{ThemeResource ScrollBarContractDuration}" />
                                            <DoubleAnimation
                                                BeginTime="{ThemeResource ScrollBarContractBeginTime}"
                                                Storyboard.TargetName="VerticalSmallDecrease"
                                                Storyboard.TargetProperty="Opacity"
                                                To="0"
                                                Duration="{ThemeResource ScrollBarContractDuration}" />
                                            <DoubleAnimation
                                                BeginTime="{ThemeResource ScrollBarContractBeginTime}"
                                                Storyboard.TargetName="VerticalTrackRect"
                                                Storyboard.TargetProperty="Opacity"
                                                To="0"
                                                Duration="{ThemeResource ScrollBarContractDuration}" />
                                            <DoubleAnimation
                                                BeginTime="{ThemeResource ScrollBarContractBeginTime}"
                                                Storyboard.TargetName="HorizontalSmallIncrease"
                                                Storyboard.TargetProperty="Opacity"
                                                To="0"
                                                Duration="{ThemeResource ScrollBarContractDuration}" />
                                            <DoubleAnimation
                                                BeginTime="{ThemeResource ScrollBarContractBeginTime}"
                                                Storyboard.TargetName="HorizontalLargeIncrease"
                                                Storyboard.TargetProperty="Opacity"
                                                To="0"
                                                Duration="{ThemeResource ScrollBarContractDuration}" />
                                            <DoubleAnimation
                                                BeginTime="{ThemeResource ScrollBarContractBeginTime}"
                                                Storyboard.TargetName="HorizontalLargeDecrease"
                                                Storyboard.TargetProperty="Opacity"
                                                To="0"
                                                Duration="{ThemeResource ScrollBarContractDuration}" />
                                            <DoubleAnimation
                                                BeginTime="{ThemeResource ScrollBarContractBeginTime}"
                                                Storyboard.TargetName="HorizontalSmallDecrease"
                                                Storyboard.TargetProperty="Opacity"
                                                To="0"
                                                Duration="{ThemeResource ScrollBarContractDuration}" />
                                            <DoubleAnimation
                                                BeginTime="{ThemeResource ScrollBarContractBeginTime}"
                                                Storyboard.TargetName="HorizontalTrackRect"
                                                Storyboard.TargetProperty="Opacity"
                                                To="0"
                                                Duration="{ThemeResource ScrollBarContractDuration}" />
                                        </Storyboard>
                                    </VisualTransition>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Collapsed" />

                                <VisualState x:Name="Expanded">
                                    <VisualState.Setters>
                                        <Setter Target="Root.Background" Value="{ThemeResource ScrollBarBackgroundPointerOver}" />
                                        <Setter Target="Root.BorderBrush" Value="{ThemeResource ScrollBarBorderBrushPointerOver}" />
                                        <Setter Target="HorizontalTrackRect.Stroke" Value="{ThemeResource ScrollBarTrackStrokePointerOver}" />
                                        <Setter Target="VerticalTrackRect.Stroke" Value="{ThemeResource ScrollBarTrackStrokePointerOver}" />
                                        <Setter Target="HorizontalTrackRect.Fill" Value="{ThemeResource ScrollBarTrackFillPointerOver}" />
                                        <Setter Target="VerticalTrackRect.Fill" Value="{ThemeResource ScrollBarTrackFillPointerOver}" />
                                    </VisualState.Setters>

                                    <Storyboard>
                                        <ColorAnimation
                                            BeginTime="{ThemeResource ScrollBarExpandBeginTime}"
                                            Storyboard.TargetName="HorizontalThumb"
                                            Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)"
                                            To="{ThemeResource ScrollBarThumbBackgroundColor}"
                                            Duration="{ThemeResource ScrollBarExpandDuration}" />
                                        <ColorAnimation
                                            BeginTime="{ThemeResource ScrollBarExpandBeginTime}"
                                            Storyboard.TargetName="VerticalThumb"
                                            Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)"
                                            To="{ThemeResource ScrollBarThumbBackgroundColor}"
                                            Duration="{ThemeResource ScrollBarExpandDuration}" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarExpandBeginTime}"
                                            Storyboard.TargetName="VerticalThumbTransform"
                                            Storyboard.TargetProperty="ScaleX"
                                            To="1.0"
                                            Duration="{ThemeResource ScrollBarExpandDuration}" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarExpandBeginTime}"
                                            Storyboard.TargetName="VerticalThumbTransform"
                                            Storyboard.TargetProperty="TranslateX"
                                            To="0"
                                            Duration="{ThemeResource ScrollBarExpandDuration}" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarExpandBeginTime}"
                                            Storyboard.TargetName="HorizontalThumbTransform"
                                            Storyboard.TargetProperty="ScaleY"
                                            To="1.0"
                                            Duration="{ThemeResource ScrollBarExpandDuration}" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarExpandBeginTime}"
                                            Storyboard.TargetName="HorizontalThumbTransform"
                                            Storyboard.TargetProperty="TranslateY"
                                            To="0"
                                            Duration="{ThemeResource ScrollBarExpandDuration}" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarExpandBeginTime}"
                                            Storyboard.TargetName="VerticalSmallIncrease"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="{ThemeResource ScrollBarExpandDuration}" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarExpandBeginTime}"
                                            Storyboard.TargetName="VerticalLargeIncrease"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="{ThemeResource ScrollBarExpandDuration}" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarExpandBeginTime}"
                                            Storyboard.TargetName="VerticalLargeDecrease"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="{ThemeResource ScrollBarExpandDuration}" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarExpandBeginTime}"
                                            Storyboard.TargetName="VerticalSmallDecrease"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="{ThemeResource ScrollBarExpandDuration}" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarExpandBeginTime}"
                                            Storyboard.TargetName="VerticalTrackRect"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="{ThemeResource ScrollBarExpandDuration}" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarExpandBeginTime}"
                                            Storyboard.TargetName="HorizontalSmallIncrease"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="{ThemeResource ScrollBarExpandDuration}" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarExpandBeginTime}"
                                            Storyboard.TargetName="HorizontalLargeIncrease"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="{ThemeResource ScrollBarExpandDuration}" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarExpandBeginTime}"
                                            Storyboard.TargetName="HorizontalLargeDecrease"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="{ThemeResource ScrollBarExpandDuration}" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarExpandBeginTime}"
                                            Storyboard.TargetName="HorizontalSmallDecrease"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="{ThemeResource ScrollBarExpandDuration}" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarExpandBeginTime}"
                                            Storyboard.TargetName="HorizontalTrackRect"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="{ThemeResource ScrollBarExpandDuration}" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ExpandedWithoutAnimation">
                                    <VisualState.Setters>
                                        <Setter Target="Root.Background" Value="{ThemeResource ScrollBarBackgroundPointerOver}" />
                                        <Setter Target="Root.BorderBrush" Value="{ThemeResource ScrollBarBorderBrushPointerOver}" />
                                        <Setter Target="HorizontalTrackRect.Stroke" Value="{ThemeResource ScrollBarTrackStrokePointerOver}" />
                                        <Setter Target="VerticalTrackRect.Stroke" Value="{ThemeResource ScrollBarTrackStrokePointerOver}" />
                                        <Setter Target="HorizontalTrackRect.Fill" Value="{ThemeResource ScrollBarTrackFillPointerOver}" />
                                        <Setter Target="VerticalTrackRect.Fill" Value="{ThemeResource ScrollBarTrackFillPointerOver}" />
                                    </VisualState.Setters>
                            -->
                            <!--
                                The storyboard below cannot be moved to a transition since transitions
                                will not be run by the framework when animations are disabled in the system
                            -->
                            <!--

                                    <Storyboard>
                                        <ColorAnimation
                                            BeginTime="{ThemeResource ScrollBarExpandBeginTime}"
                                            Storyboard.TargetName="HorizontalThumb"
                                            Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)"
                                            To="{ThemeResource ScrollBarThumbBackgroundColor}"
                                            Duration="0" />
                                        <ColorAnimation
                                            BeginTime="{ThemeResource ScrollBarExpandBeginTime}"
                                            Storyboard.TargetName="VerticalThumb"
                                            Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)"
                                            To="{ThemeResource ScrollBarThumbBackgroundColor}"
                                            Duration="0" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarExpandBeginTime}"
                                            Storyboard.TargetName="VerticalThumbTransform"
                                            Storyboard.TargetProperty="ScaleX"
                                            To="1.0"
                                            Duration="0" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarExpandBeginTime}"
                                            Storyboard.TargetName="VerticalThumbTransform"
                                            Storyboard.TargetProperty="TranslateX"
                                            To="0"
                                            Duration="0" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarExpandBeginTime}"
                                            Storyboard.TargetName="HorizontalThumbTransform"
                                            Storyboard.TargetProperty="ScaleY"
                                            To="1.0"
                                            Duration="0" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarExpandBeginTime}"
                                            Storyboard.TargetName="HorizontalThumbTransform"
                                            Storyboard.TargetProperty="TranslateY"
                                            To="0"
                                            Duration="0" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarExpandBeginTime}"
                                            Storyboard.TargetName="VerticalSmallIncrease"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarExpandBeginTime}"
                                            Storyboard.TargetName="VerticalLargeIncrease"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarExpandBeginTime}"
                                            Storyboard.TargetName="VerticalLargeDecrease"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarExpandBeginTime}"
                                            Storyboard.TargetName="VerticalSmallDecrease"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarExpandBeginTime}"
                                            Storyboard.TargetName="VerticalTrackRect"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarExpandBeginTime}"
                                            Storyboard.TargetName="HorizontalSmallIncrease"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarExpandBeginTime}"
                                            Storyboard.TargetName="HorizontalLargeIncrease"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarExpandBeginTime}"
                                            Storyboard.TargetName="HorizontalLargeDecrease"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarExpandBeginTime}"
                                            Storyboard.TargetName="HorizontalSmallDecrease"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarExpandBeginTime}"
                                            Storyboard.TargetName="HorizontalTrackRect"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="CollapsedWithoutAnimation">
                            -->
                            <!--
                                The storyboard below cannot be moved to a transition since transitions
                                will not be run by the framework when animations are disabled in the system
                            -->
                            <!--

                                    <Storyboard>
                                        <ColorAnimation
                                            BeginTime="{ThemeResource ScrollBarContractBeginTime}"
                                            Storyboard.TargetName="HorizontalThumb"
                                            Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)"
                                            To="{ThemeResource ScrollBarPanningThumbBackgroundColor}"
                                            Duration="0" />
                                        <ColorAnimation
                                            BeginTime="{ThemeResource ScrollBarContractBeginTime}"
                                            Storyboard.TargetName="VerticalThumb"
                                            Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)"
                                            To="{ThemeResource ScrollBarPanningThumbBackgroundColor}"
                                            Duration="0" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarContractBeginTime}"
                                            Storyboard.TargetName="VerticalThumbTransform"
                                            Storyboard.TargetProperty="ScaleX"
                                            To="{ThemeResource SmallScrollThumbScale}"
                                            Duration="0" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarContractBeginTime}"
                                            Storyboard.TargetName="VerticalThumbTransform"
                                            Storyboard.TargetProperty="TranslateX"
                                            To="{ThemeResource SmallScrollThumbOffset}"
                                            Duration="0" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarContractBeginTime}"
                                            Storyboard.TargetName="HorizontalThumbTransform"
                                            Storyboard.TargetProperty="ScaleY"
                                            To="{ThemeResource SmallScrollThumbScale}"
                                            Duration="0" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarContractBeginTime}"
                                            Storyboard.TargetName="HorizontalThumbTransform"
                                            Storyboard.TargetProperty="TranslateY"
                                            To="{ThemeResource SmallScrollThumbOffset}"
                                            Duration="0" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarContractBeginTime}"
                                            Storyboard.TargetName="VerticalSmallIncrease"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0"
                                            Duration="0" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarContractBeginTime}"
                                            Storyboard.TargetName="VerticalLargeIncrease"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0"
                                            Duration="0" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarContractBeginTime}"
                                            Storyboard.TargetName="VerticalLargeDecrease"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0"
                                            Duration="0" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarContractBeginTime}"
                                            Storyboard.TargetName="VerticalSmallDecrease"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0"
                                            Duration="0" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarContractBeginTime}"
                                            Storyboard.TargetName="VerticalTrackRect"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0"
                                            Duration="0" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarContractBeginTime}"
                                            Storyboard.TargetName="HorizontalSmallIncrease"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0"
                                            Duration="0" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarContractBeginTime}"
                                            Storyboard.TargetName="HorizontalLargeIncrease"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0"
                                            Duration="0" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarContractBeginTime}"
                                            Storyboard.TargetName="HorizontalLargeDecrease"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0"
                                            Duration="0" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarContractBeginTime}"
                                            Storyboard.TargetName="HorizontalSmallDecrease"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0"
                                            Duration="0" />
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollBarContractBeginTime}"
                                            Storyboard.TargetName="HorizontalTrackRect"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0"
                                            Duration="0" />
                                    </Storyboard>
                                </VisualState>

                            </VisualStateGroup>-->

                        </VisualStateManager.VisualStateGroups>
                        <Grid
                            x:Name="HorizontalRoot"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="0 0 0 1"
                            IsHitTestVisible="False">

                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Rectangle
                                x:Name="HorizontalTrackRect"
                                Grid.ColumnSpan="5"
                                Margin="0"
                                Fill="{ThemeResource ScrollBarTrackFill}"
                                Opacity="0"
                                Stroke="{ThemeResource ScrollBarTrackStroke}"
                                StrokeThickness="{ThemeResource ScrollBarTrackBorderThemeThickness}" />
                            <RepeatButton
                                x:Name="HorizontalSmallDecrease"
                                Grid.Column="0"
                                Width="16"
                                MinHeight="{ThemeResource ScrollBarSize}"
                                Margin="0"
                                VerticalAlignment="Center"
                                AllowFocusOnInteraction="False"
                                Interval="50"
                                IsTabStop="False"
                                Opacity="1"
                                Template="{StaticResource HorizontalDecrementTemplate}" />
                            <RepeatButton
                                x:Name="HorizontalLargeDecrease"
                                Grid.Column="1"
                                Width="0"
                                HorizontalAlignment="Stretch"
                                VerticalAlignment="Stretch"
                                AllowFocusOnInteraction="False"
                                Interval="50"
                                IsTabStop="False"
                                Opacity="0"
                                Template="{StaticResource RepeatButtonTemplate}" />
                            <Thumb
                                x:Name="HorizontalThumb"
                                Grid.Column="2"
                                Height="{ThemeResource ScrollBarSize}"
                                MinWidth="{ThemeResource ScrollBarSize}"
                                VerticalAlignment="Bottom"
                                AutomationProperties.AccessibilityView="Raw"
                                Background="{ThemeResource ScrollBarBorderBrush}"
                                Opacity="0"
                                RenderTransformOrigin="0.5,1"
                                Template="{StaticResource HorizontalThumbTemplate}">
                                <Thumb.RenderTransform>
                                    <CompositeTransform
                                        x:Name="HorizontalThumbTransform"
                                        ScaleX="1.0"
                                        ScaleY="1.0"
                                        TranslateX="0"
                                        TranslateY="0" />
                                </Thumb.RenderTransform>
                            </Thumb>
                            <RepeatButton
                                x:Name="HorizontalLargeIncrease"
                                Grid.Column="3"
                                HorizontalAlignment="Stretch"
                                VerticalAlignment="Stretch"
                                AllowFocusOnInteraction="False"
                                Interval="50"
                                IsTabStop="False"
                                Opacity="0"
                                Template="{StaticResource RepeatButtonTemplate}" />
                            <RepeatButton
                                x:Name="HorizontalSmallIncrease"
                                Grid.Column="4"
                                Width="16"
                                MinHeight="{ThemeResource ScrollBarSize}"
                                Margin="0"
                                VerticalAlignment="Center"
                                AllowFocusOnInteraction="False"
                                Interval="50"
                                IsTabStop="False"
                                Opacity="1"
                                Template="{StaticResource HorizontalIncrementTemplate}" />

                        </Grid>
                        <Grid
                            x:Name="HorizontalPanningRoot"
                            MinWidth="24"
                            Opacity="0"
                            Visibility="Collapsed">
                            <Border
                                x:Name="HorizontalPanningThumb"
                                Height="2"
                                MinWidth="32"
                                Margin="0,2,0,2"
                                HorizontalAlignment="Left"
                                VerticalAlignment="Bottom"
                                Background="{ThemeResource ScrollBarPanningThumbBackground}"
                                BorderThickness="0" />

                        </Grid>
                        <Grid
                            x:Name="VerticalRoot"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="0 0 1 0"
                            IsHitTestVisible="False">

                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="*" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Rectangle
                                x:Name="VerticalTrackRect"
                                Grid.RowSpan="5"
                                Margin="0"
                                Fill="{ThemeResource ScrollBarTrackFill}"
                                Opacity="0"
                                Stroke="{ThemeResource ScrollBarTrackStroke}"
                                StrokeThickness="{ThemeResource ScrollBarTrackBorderThemeThickness}" />
                            <RepeatButton
                                x:Name="VerticalSmallDecrease"
                                Grid.Row="0"
                                Height="16"
                                MinWidth="{ThemeResource ScrollBarSize}"
                                Margin="0"
                                HorizontalAlignment="Center"
                                Interval="50"
                                IsTabStop="False"
                                Opacity="1"
                                Template="{StaticResource VerticalDecrementTemplate}" />
                            <RepeatButton
                                x:Name="VerticalLargeDecrease"
                                Grid.Row="1"
                                Height="0"
                                HorizontalAlignment="Stretch"
                                VerticalAlignment="Stretch"
                                AllowFocusOnInteraction="False"
                                Interval="50"
                                IsTabStop="False"
                                Opacity="0"
                                Template="{StaticResource RepeatButtonTemplate}" />
                            <Thumb
                                x:Name="VerticalThumb"
                                Grid.Row="2"
                                Width="{ThemeResource ScrollBarSize}"
                                MinHeight="{ThemeResource ScrollBarSize}"
                                AutomationProperties.AccessibilityView="Raw"
                                Background="{ThemeResource ScrollBarBorderBrush}"
                                Opacity="0"
                                RenderTransformOrigin="1,0.5"
                                Template="{StaticResource VerticalThumbTemplate}">
                                <Thumb.RenderTransform>
                                    <CompositeTransform
                                        x:Name="VerticalThumbTransform"
                                        ScaleX="1.0"
                                        ScaleY="1.0"
                                        TranslateY="0" />
                                </Thumb.RenderTransform>
                            </Thumb>
                            <RepeatButton
                                x:Name="VerticalLargeIncrease"
                                Grid.Row="3"
                                HorizontalAlignment="Stretch"
                                VerticalAlignment="Stretch"
                                AllowFocusOnInteraction="False"
                                Interval="50"
                                IsTabStop="False"
                                Opacity="0"
                                Template="{StaticResource RepeatButtonTemplate}" />
                            <RepeatButton
                                x:Name="VerticalSmallIncrease"
                                Grid.Row="4"
                                Height="16"
                                MinWidth="{ThemeResource ScrollBarSize}"
                                Margin="0"
                                HorizontalAlignment="Center"
                                Interval="50"
                                IsTabStop="False"
                                Opacity="1"
                                Template="{StaticResource VerticalIncrementTemplate}" />

                        </Grid>
                        <Grid
                            x:Name="VerticalPanningRoot"
                            MinHeight="24"
                            Opacity="0"
                            Visibility="Collapsed">
                            <Border
                                x:Name="VerticalPanningThumb"
                                Width="2"
                                MinHeight="32"
                                Margin="2,0,2,0"
                                HorizontalAlignment="Right"
                                VerticalAlignment="Top"
                                Background="{ThemeResource ScrollBarPanningThumbBackground}"
                                BorderThickness="0" />

                        </Grid>

                    </Grid>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="ScrollViewer">
        <Setter Property="HorizontalScrollMode" Value="Auto" />
        <Setter Property="VerticalScrollMode" Value="Auto" />
        <Setter Property="IsHorizontalRailEnabled" Value="True" />
        <Setter Property="IsVerticalRailEnabled" Value="True" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="ZoomMode" Value="Disabled" />
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="VerticalContentAlignment" Value="Top" />
        <Setter Property="VerticalScrollBarVisibility" Value="Visible" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ScrollViewer">
                    <Border
                        x:Name="Root"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{TemplateBinding CornerRadius}">

                        <VisualStateManager.VisualStateGroups>
                            <!--<VisualStateGroup x:Name="ScrollingIndicatorStates">

                                <VisualStateGroup.Transitions>
                                    <VisualTransition From="MouseIndicator" To="NoIndicator">

                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalScrollBar" Storyboard.TargetProperty="IndicatorMode">
                                                <DiscreteObjectKeyFrame KeyTime="{ThemeResource ScrollViewerSeparatorContractDelay}">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <ScrollingIndicatorMode>None</ScrollingIndicatorMode>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalScrollBar" Storyboard.TargetProperty="IndicatorMode">
                                                <DiscreteObjectKeyFrame KeyTime="{ThemeResource ScrollViewerSeparatorContractDelay}">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <ScrollingIndicatorMode>None</ScrollingIndicatorMode>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualTransition>
                                    <VisualTransition From="MouseIndicatorFull" To="NoIndicator">

                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalScrollBar" Storyboard.TargetProperty="IndicatorMode">
                                                <DiscreteObjectKeyFrame KeyTime="{ThemeResource ScrollViewerSeparatorContractDelay}">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <ScrollingIndicatorMode>None</ScrollingIndicatorMode>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalScrollBar" Storyboard.TargetProperty="IndicatorMode">
                                                <DiscreteObjectKeyFrame KeyTime="{ThemeResource ScrollViewerSeparatorContractDelay}">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <ScrollingIndicatorMode>None</ScrollingIndicatorMode>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualTransition>
                                    <VisualTransition From="MouseIndicatorFull" To="MouseIndicator">

                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalScrollBar" Storyboard.TargetProperty="IndicatorMode">
                                                <DiscreteObjectKeyFrame KeyTime="{ThemeResource ScrollViewerSeparatorContractDelay}">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <ScrollingIndicatorMode>MouseIndicator</ScrollingIndicatorMode>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalScrollBar" Storyboard.TargetProperty="IndicatorMode">
                                                <DiscreteObjectKeyFrame KeyTime="{ThemeResource ScrollViewerSeparatorContractDelay}">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <ScrollingIndicatorMode>MouseIndicator</ScrollingIndicatorMode>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualTransition>
                                    <VisualTransition From="TouchIndicator" To="NoIndicator">

                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalScrollBar" Storyboard.TargetProperty="IndicatorMode">
                                                <DiscreteObjectKeyFrame KeyTime="0:0:0.5">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <ScrollingIndicatorMode>None</ScrollingIndicatorMode>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalScrollBar" Storyboard.TargetProperty="IndicatorMode">
                                                <DiscreteObjectKeyFrame KeyTime="0:0:0.5">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <ScrollingIndicatorMode>None</ScrollingIndicatorMode>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualTransition>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="NoIndicator" />
                                <VisualState x:Name="TouchIndicator">

                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalScrollBar" Storyboard.TargetProperty="IndicatorMode">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <ScrollingIndicatorMode>TouchIndicator</ScrollingIndicatorMode>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalScrollBar" Storyboard.TargetProperty="IndicatorMode">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <ScrollingIndicatorMode>TouchIndicator</ScrollingIndicatorMode>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="MouseIndicator">

                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalScrollBar" Storyboard.TargetProperty="IndicatorMode">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <ScrollingIndicatorMode>MouseIndicator</ScrollingIndicatorMode>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalScrollBar" Storyboard.TargetProperty="IndicatorMode">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <ScrollingIndicatorMode>MouseIndicator</ScrollingIndicatorMode>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="MouseIndicatorFull">

                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalScrollBar" Storyboard.TargetProperty="IndicatorMode">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <ScrollingIndicatorMode>MouseIndicator</ScrollingIndicatorMode>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalScrollBar" Storyboard.TargetProperty="IndicatorMode">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <ScrollingIndicatorMode>MouseIndicator</ScrollingIndicatorMode>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>

                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ScrollBarSeparatorStates">

                                <VisualStateGroup.Transitions>
                                    <VisualTransition From="ScrollBarSeparatorExpanded" To="ScrollBarSeparatorCollapsed">

                                        <Storyboard>
                                            <DoubleAnimation
                                                BeginTime="{ThemeResource ScrollViewerSeparatorContractBeginTime}"
                                                Storyboard.TargetName="ScrollBarSeparator"
                                                Storyboard.TargetProperty="Opacity"
                                                To="0"
                                                Duration="{ThemeResource ScrollViewerSeparatorContractDuration}" />
                                        </Storyboard>
                                    </VisualTransition>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="ScrollBarSeparatorCollapsed" />
                                <VisualState x:Name="ScrollBarSeparatorExpanded">

                                    <Storyboard>
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollViewerSeparatorExpandBeginTime}"
                                            Storyboard.TargetName="ScrollBarSeparator"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="{ThemeResource ScrollViewerSeparatorExpandDuration}" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ScrollBarSeparatorExpandedWithoutAnimation">

                                    <Storyboard>
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollViewerSeparatorExpandBeginTime}"
                                            Storyboard.TargetName="ScrollBarSeparator"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ScrollBarSeparatorCollapsedWithoutAnimation">

                                    <Storyboard>
                                        <DoubleAnimation
                                            BeginTime="{ThemeResource ScrollViewerSeparatorContractBeginTime}"
                                            Storyboard.TargetName="ScrollBarSeparator"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0"
                                            Duration="0" />
                                    </Storyboard>
                                </VisualState>

                            </VisualStateGroup>-->

                        </VisualStateManager.VisualStateGroups>
                        <Grid Background="{TemplateBinding Background}">

                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>

                            <Grid.RowDefinitions>
                                <RowDefinition Height="*" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <ScrollContentPresenter
                                x:Name="ScrollContentPresenter"
                                Grid.RowSpan="2"
                                Grid.ColumnSpan="2"
                                Margin="{TemplateBinding Padding}"
                                ContentTemplate="{TemplateBinding ContentTemplate}" />
                            <Grid Grid.RowSpan="2" Grid.ColumnSpan="2" />
                            <ScrollBar
                                x:Name="VerticalScrollBar"
                                Grid.Column="1"
                                HorizontalAlignment="Right"
                                IndicatorMode="MouseIndicator"
                                IsTabStop="False"
                                Maximum="{TemplateBinding ScrollableHeight}"
                                Orientation="Vertical"
                                ViewportSize="{TemplateBinding ViewportHeight}"
                                Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
                                Value="{TemplateBinding VerticalOffset}" />
                            <ScrollBar
                                x:Name="HorizontalScrollBar"
                                Grid.Row="1"
                                IndicatorMode="MouseIndicator"
                                IsTabStop="False"
                                Maximum="{TemplateBinding ScrollableWidth}"
                                Orientation="Horizontal"
                                ViewportSize="{TemplateBinding ViewportWidth}"
                                Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
                                Value="{TemplateBinding HorizontalOffset}" />
                            <Border
                                x:Name="ScrollBarSeparator"
                                Grid.Row="1"
                                Grid.Column="1"
                                Background="{ThemeResource ScrollViewerScrollBarSeparatorBackground}"
                                Opacity="0" />

                        </Grid>
                    </Border>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>




    <!--  NUMBER BOX  -->

    <Style x:Name="NumberBoxSpinButtonStyle" TargetType="RepeatButton">
        <Style.Setters>
            <Setter Property="CornerRadius" Value="0" />
            <Setter Property="IsTabStop" Value="False" />
            <Setter Property="Background" Value="{StaticResource ButtonBackgroundBrush}" />
            <Setter Property="MinWidth" Value="32" />
            <Setter Property="Padding" Value="0" />
            <Setter Property="VerticalAlignment" Value="Stretch" />
            <Setter Property="BorderThickness" Value="1" />
            <Setter Property="FontSize" Value="10" />
            <Setter Property="FontWeight" Value="Normal" />
            <Setter Property="FontFamily" Value="{ThemeResource SymbolThemeFontFamily}" />
        </Style.Setters>
    </Style>

    <Style TargetType="muxc:NumberBox">
        <Setter Property="IsTabStop" Value="False" />
        <!--<Setter Property="SelectionHighlightColor" Value="{ThemeResource TextControlSelectionHighlightColor}" />
        <Setter Property="SelectionFlyout" Value="{StaticResource TextControlCommandBarSelectionFlyout}" />
        <Setter Property="CornerRadius" Value="{ThemeResource ControlCornerRadius}" />
        <Setter Property="BorderThickness" Value="{ThemeResource TextControlBorderThemeThickness}" />
        <Setter Property="BorderBrush" Value="{ThemeResource TextControlBorderBrush}" />
        <Setter Property="Padding" Value="{ThemeResource TextControlThemePadding}" />-->
        <Setter Property="FontWeight" Value="SemiBold" />
        <Setter Property="BorderBrush" Value="{ThemeResource ComboBoxBorderBrush}" />
        <Setter Property="CornerRadius" Value="2" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="muxc:NumberBox">
                    <Grid Height="{TemplateBinding Height}">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="Disabled">
                                    <VisualState.Setters>
                                        <Setter Target="HeaderContentPresenter.Foreground" Value="{ThemeResource TextControlHeaderForegroundDisabled}" />
                                    </VisualState.Setters>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="SpinButtonStates">
                                <VisualState x:Name="SpinButtonsCollapsed" />
                                <VisualState x:Name="SpinButtonsVisible">
                                    <VisualState.Setters>
                                        <Setter Target="DownSpinButton.Visibility" Value="Visible" />
                                        <Setter Target="UpSpinButton.Visibility" Value="Visible" />
                                        <!--<Setter Target="InputEater.Visibility" Value="Visible" />-->
                                        <!--<Setter Target="InputBox.MinWidth" Value="{ThemeResource NumberBoxMinWidth}" />-->
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="SpinButtonsPopup">
                                    <VisualState.Setters>
                                        <Setter Target="InputBox.Style" Value="{StaticResource NumberBoxTextBoxStyle}" />
                                    </VisualState.Setters>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="UpSpinButtonEnabledStates">
                                <VisualState x:Name="UpSpinButtonEnabled" />
                                <VisualState x:Name="UpSpinButtonDisabled">
                                    <VisualState.Setters>
                                        <Setter Target="UpSpinButton.IsEnabled" Value="False" />
                                        <!--<Setter Target="PopupUpSpinButton.IsEnabled" Value="False" />-->
                                    </VisualState.Setters>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="DownSpinButtonEnabledStates">
                                <VisualState x:Name="DownSpinButtonEnabled" />
                                <VisualState x:Name="DownSpinButtonDisabled">
                                    <VisualState.Setters>
                                        <Setter Target="DownSpinButton.IsEnabled" Value="False" />
                                        <!--<Setter Target="PopupDownSpinButton.IsEnabled" Value="False" />-->
                                    </VisualState.Setters>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid.Resources>
                            <ResourceDictionary>

                                <!--<ResourceDictionary.ThemeDictionaries>
                                    <ResourceDictionary x:Key="Light">
                                        <StaticResource x:Key="RepeatButtonBackground" ResourceKey="TextControlButtonBackground" />
                                        <StaticResource x:Key="RepeatButtonBackgroundPointerOver" ResourceKey="TextControlButtonBackgroundPointerOver" />
                                        <StaticResource x:Key="RepeatButtonBackgroundPressed" ResourceKey="TextControlButtonBackgroundPressed" />
                                        <StaticResource x:Key="RepeatButtonForeground" ResourceKey="TextControlButtonForeground" />
                                        <StaticResource x:Key="RepeatButtonForegroundPointerOver" ResourceKey="TextControlButtonForegroundPointerOver" />
                                        <StaticResource x:Key="RepeatButtonForegroundPressed" ResourceKey="TextControlButtonForegroundPressed" />
                                        <StaticResource x:Key="RepeatButtonBorderBrush" ResourceKey="TextControlButtonBorderBrush" />
                                        <StaticResource x:Key="RepeatButtonBorderBrushPointerOver" ResourceKey="TextControlButtonBorderBrushPointerOver" />
                                        <StaticResource x:Key="RepeatButtonBorderBrushPressed" ResourceKey="TextControlButtonBorderBrushPressed" />
                                        <StaticResource x:Key="RepeatButtonBorderBrushDisabled" ResourceKey="TextControlButtonBorderBrush" />
                                    </ResourceDictionary>
                                    <ResourceDictionary x:Key="Dark">
                                        <StaticResource x:Key="RepeatButtonBackground" ResourceKey="TextControlButtonBackground" />
                                        <StaticResource x:Key="RepeatButtonBackgroundPointerOver" ResourceKey="TextControlButtonBackgroundPointerOver" />
                                        <StaticResource x:Key="RepeatButtonBackgroundPressed" ResourceKey="TextControlButtonBackgroundPressed" />
                                        <StaticResource x:Key="RepeatButtonForeground" ResourceKey="TextControlButtonForeground" />
                                        <StaticResource x:Key="RepeatButtonForegroundPointerOver" ResourceKey="TextControlButtonForegroundPointerOver" />
                                        <StaticResource x:Key="RepeatButtonForegroundPressed" ResourceKey="TextControlButtonForegroundPressed" />
                                        <StaticResource x:Key="RepeatButtonBorderBrush" ResourceKey="TextControlButtonBorderBrush" />
                                        <StaticResource x:Key="RepeatButtonBorderBrushPointerOver" ResourceKey="TextControlButtonBorderBrushPointerOver" />
                                        <StaticResource x:Key="RepeatButtonBorderBrushPressed" ResourceKey="TextControlButtonBorderBrushPressed" />
                                        <StaticResource x:Key="RepeatButtonBorderBrushDisabled" ResourceKey="TextControlButtonBorderBrush" />
                                    </ResourceDictionary>
                                    <ResourceDictionary x:Key="HighContrast">
                                        <StaticResource x:Key="RepeatButtonBackground" ResourceKey="TextControlButtonBackground" />
                                        <StaticResource x:Key="RepeatButtonBackgroundPointerOver" ResourceKey="TextControlButtonBackgroundPointerOver" />
                                        <StaticResource x:Key="RepeatButtonBackgroundPressed" ResourceKey="TextControlButtonBackgroundPressed" />
                                        <StaticResource x:Key="RepeatButtonForeground" ResourceKey="TextControlButtonForeground" />
                                        <StaticResource x:Key="RepeatButtonForegroundPointerOver" ResourceKey="TextControlButtonForegroundPointerOver" />
                                        <StaticResource x:Key="RepeatButtonForegroundPressed" ResourceKey="TextControlButtonForegroundPressed" />
                                        <StaticResource x:Key="RepeatButtonBorderBrush" ResourceKey="TextControlButtonBorderBrush" />
                                        <StaticResource x:Key="RepeatButtonBorderBrushPointerOver" ResourceKey="TextControlButtonBorderBrushPointerOver" />
                                        <StaticResource x:Key="RepeatButtonBorderBrushPressed" ResourceKey="TextControlButtonBorderBrushPressed" />
                                        <StaticResource x:Key="RepeatButtonBorderBrushDisabled" ResourceKey="TextControlButtonBorderBrush" />
                                    </ResourceDictionary>
                                </ResourceDictionary.ThemeDictionaries>-->
                            </ResourceDictionary>
                        </Grid.Resources>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <ContentPresenter
                            x:Name="HeaderContentPresenter"
                            x:DeferLoadStrategy="Lazy"
                            Grid.ColumnSpan="3"
                            Margin="{ThemeResource TextBoxTopHeaderMargin}"
                            VerticalAlignment="Top"
                            Content="{TemplateBinding Header}"
                            ContentTemplate="{TemplateBinding HeaderTemplate}"
                            FontFamily="{TemplateBinding FontFamily}"
                            FontSize="{TemplateBinding FontSize}"
                            FontWeight="Normal"
                            Foreground="{ThemeResource TextControlHeaderForeground}"
                            TextWrapping="Wrap"
                            Visibility="Collapsed" />
                        <TextBox
                            x:Name="InputBox"
                            Grid.Row="1"
                            Grid.ColumnSpan="1"
                            MinWidth="100"
                            Margin="0 0 -1 0"
                            Padding="{TemplateBinding Padding}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="{Binding Source={ThemeResource ControlCornerRadius}, Converter={StaticResource LeftCornerRadiusFilterConverter}}"
                            FontFamily="{TemplateBinding FontFamily}"
                            FontSize="{TemplateBinding FontSize}"
                            FontWeight="{TemplateBinding FontWeight}"
                            Foreground="{TemplateBinding Foreground}"
                            PlaceholderText="{TemplateBinding PlaceholderText}"
                            PreventKeyboardDisplayOnProgrammaticFocus="{TemplateBinding PreventKeyboardDisplayOnProgrammaticFocus}"
                            SelectionFlyout="{TemplateBinding SelectionFlyout}"
                            SelectionHighlightColor="{TemplateBinding SelectionHighlightColor}"
                            TextReadingOrder="{TemplateBinding TextReadingOrder}" />
                        <RepeatButton
                            x:Name="UpSpinButton"
                            Grid.Row="1"
                            Grid.Column="1"
                            Margin="0 0 -1 0"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Canvas.ZIndex="-1"
                            Content="&#xE96D;"
                            Style="{StaticResource NumberBoxSpinButtonStyle}"
                            Visibility="Collapsed" />
                        <RepeatButton
                            x:Name="DownSpinButton"
                            Grid.Row="1"
                            Grid.Column="2"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Content="&#xE96E;"
                            CornerRadius="{Binding CornerRadius, RelativeSource={RelativeSource Mode=TemplatedParent}, Converter={StaticResource RightCornerRadiusFilterConverter}}"
                            Style="{StaticResource NumberBoxSpinButtonStyle}"
                            Visibility="Collapsed" />
                        <ContentPresenter
                            x:Name="DescriptionPresenter"
                            x:Load="False"
                            Grid.Row="2"
                            Grid.ColumnSpan="3"
                            AutomationProperties.AccessibilityView="Raw"
                            Content="{TemplateBinding Description}"
                            Foreground="{ThemeResource SystemControlDescriptionTextForegroundBrush}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <DataTemplate x:Key="EmptyTemplate" />

    <ControlTemplate x:Key="HorizontalNumberBoxTemplate" TargetType="muxc:NumberBox">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="UpSpinButtonEnabledStates">
                    <VisualState x:Name="UpSpinButtonEnabled" />
                    <VisualState x:Name="UpSpinButtonDisabled">
                        <VisualState.Setters>
                            <Setter Target="UpSpinButton.IsEnabled" Value="False" />
                        </VisualState.Setters>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="DownSpinButtonEnabledStates">
                    <VisualState x:Name="DownSpinButtonEnabled" />
                    <VisualState x:Name="DownSpinButtonDisabled">
                        <VisualState.Setters>
                            <Setter Target="DownSpinButton.IsEnabled" Value="False" />
                        </VisualState.Setters>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>

            <RepeatButton
                x:Name="DownSpinButton"
                MinHeight="0"
                Margin="0 4 0 0"
                Padding="0"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="1 1 0 1"
                Content="&#xE96F;"
                CornerRadius="{Binding CornerRadius, RelativeSource={RelativeSource Mode=TemplatedParent}, Converter={StaticResource LeftCornerRadiusFilterConverter}}"
                Style="{StaticResource NumberBoxSpinButtonStyle}" />

            <TextBox
                x:Name="InputBox"
                Grid.Column="1"
                MinWidth="50"
                Canvas.ZIndex="1"
                CornerRadius="0"
                HeaderTemplate="{StaticResource EmptyTemplate}"
                PlaceholderText="{TemplateBinding PlaceholderText}"
                PreventKeyboardDisplayOnProgrammaticFocus="{TemplateBinding PreventKeyboardDisplayOnProgrammaticFocus}"
                SelectionHighlightColor="{TemplateBinding SelectionHighlightColor}"
                TextReadingOrder="{TemplateBinding TextReadingOrder}" />

            <RepeatButton
                x:Name="UpSpinButton"
                Grid.Column="2"
                MinHeight="0"
                Margin="-1 4 0 0"
                Padding="0"
                BorderBrush="{TemplateBinding BorderBrush}"
                Content="&#xE970;"
                CornerRadius="{Binding CornerRadius, RelativeSource={RelativeSource Mode=TemplatedParent}, Converter={StaticResource RightCornerRadiusFilterConverter}}"
                Style="{StaticResource NumberBoxSpinButtonStyle}" />
        </Grid>
    </ControlTemplate>


    <!--  RADIO BUTTON  -->

    <Style x:Key="DefaultThemeRadioButtonStyle" TargetType="RadioButton">
        <Setter Property="FontSize" Value="13.3333" />
        <Setter Property="FontWeight" Value="SemiBold" />
        <Setter Property="Padding" Value="0 6" />
        <Setter Property="Foreground" Value="{ThemeResource DefaultControlForegroundBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RadioButton">
                    <StackPanel
                        Padding="{TemplateBinding Padding}"
                        Background="Transparent"
                        Orientation="Horizontal"
                        Spacing="8">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup>
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="PointerOver">
                                    <VisualState.Setters>
                                        <Setter Target="NormalRectangle.Stroke" Value="Black" />
                                        <Setter Target="CheckGlyph.Fill" Value="Black" />
                                        <Setter Target="Presenter.Foreground" Value="{ThemeResource ControlContentPointerOverForeground}" />
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <VisualState.Setters>
                                        <Setter Target="Presenter.Foreground" Value="{ThemeResource ControlContentPointerOverForeground}" />
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="Disabled" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CheckStates">
                                <VisualState x:Name="Checked">
                                    <VisualState.Setters>
                                        <Setter Target="CheckGlyph.Opacity" Value="1" />
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="Unchecked">
                                    <VisualState.Setters>
                                        <Setter Target="CheckGlyph.Opacity" Value="0" />
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="Indeterminate">
                                    <VisualState.Setters>
                                        <Setter Target="CheckGlyph.Opacity" Value="0" />
                                    </VisualState.Setters>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <Grid Width="18" Height="20">
                            <Rectangle
                                x:Name="NormalRectangle"
                                Width="16"
                                Height="16"
                                Fill="{ThemeResource CheckBoxBackgroundBrush}"
                                RadiusX="10"
                                RadiusY="10"
                                Stroke="{ThemeResource ControlGlyphBrush}"
                                StrokeThickness="1"
                                UseLayoutRounding="False" />

                            <Rectangle
                                x:Name="CheckGlyph"
                                Width="9"
                                Height="9"
                                helpers:CompositionFactory.OpacityDuration="{StaticResource BrushDuration}"
                                Fill="{ThemeResource ControlGlyphBrush}"
                                Opacity="0"
                                RadiusX="10"
                                RadiusY="10"
                                UseLayoutRounding="False" />
                        </Grid>

                        <ContentPresenter
                            x:Name="Presenter"
                            VerticalAlignment="Center"
                            Content="{TemplateBinding Content}"
                            TextLineBounds="Tight" />
                    </StackPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>




    <!--  TEXTBOX  -->

    <Style TargetType="TextBox">
        <Setter Property="CornerRadius" Value="2" />
        <Setter Property="Foreground" Value="{ThemeResource TextControlForeground}" />
        <Setter Property="Background" Value="{ThemeResource TextControlBackground}" />
        <Setter Property="BorderBrush" Value="{ThemeResource ComboBoxBorderBrush}" />
        <Setter Property="SelectionHighlightColor" Value="{ThemeResource TextControlSelectionHighlightColor}" />
        <Setter Property="BorderThickness" Value="{ThemeResource TextControlBorderThemeThickness}" />
        <Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
        <Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
        <Setter Property="ScrollViewer.HorizontalScrollMode" Value="Auto" />
        <Setter Property="ScrollViewer.VerticalScrollMode" Value="Auto" />
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden" />
        <Setter Property="ScrollViewer.IsDeferredScrollingEnabled" Value="False" />
        <Setter Property="Padding" Value="{ThemeResource TextControlThemePadding}" />
        <Setter Property="UseSystemFocusVisuals" Value="{ThemeResource IsApplicationFocusVisualKindReveal}" />
        <Setter Property="ContextFlyout" Value="{StaticResource TextControlCommandBarContextFlyout}" />
        <Setter Property="SelectionFlyout" Value="{StaticResource TextControlCommandBarSelectionFlyout}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="TextBox">
                    <Grid>

                        <Grid.Resources>
                            <Style x:Name="DeleteButtonStyle" TargetType="Button">
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="Button">
                                            <Grid
                                                x:Name="ButtonLayoutGrid"
                                                Background="{ThemeResource TextControlButtonBackground}"
                                                BorderBrush="{ThemeResource TextControlButtonBorderBrush}"
                                                BorderThickness="{TemplateBinding BorderThickness}">

                                                <VisualStateManager.VisualStateGroups>
                                                    <VisualStateGroup x:Name="CommonStates">
                                                        <VisualState x:Name="Normal" />

                                                        <VisualState x:Name="PointerOver">
                                                            <Storyboard>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonLayoutGrid" Storyboard.TargetProperty="Background">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonBackgroundPointerOver}" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonLayoutGrid" Storyboard.TargetProperty="BorderBrush">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonBorderBrushPointerOver}" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="GlyphElement" Storyboard.TargetProperty="Foreground">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonForegroundPointerOver}" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>

                                                        <VisualState x:Name="Pressed">
                                                            <Storyboard>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonLayoutGrid" Storyboard.TargetProperty="Background">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonBackgroundPressed}" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonLayoutGrid" Storyboard.TargetProperty="BorderBrush">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonBorderBrushPressed}" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="GlyphElement" Storyboard.TargetProperty="Foreground">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonForegroundPressed}" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>

                                                        <VisualState x:Name="Disabled">
                                                            <Storyboard>
                                                                <DoubleAnimation
                                                                    Storyboard.TargetName="ButtonLayoutGrid"
                                                                    Storyboard.TargetProperty="Opacity"
                                                                    To="0"
                                                                    Duration="0" />
                                                            </Storyboard>
                                                        </VisualState>
                                                    </VisualStateGroup>
                                                </VisualStateManager.VisualStateGroups>
                                                <TextBlock
                                                    x:Name="GlyphElement"
                                                    HorizontalAlignment="Center"
                                                    VerticalAlignment="Center"
                                                    AutomationProperties.AccessibilityView="Raw"
                                                    FontFamily="{ThemeResource SymbolThemeFontFamily}"
                                                    FontSize="12"
                                                    FontStyle="Normal"
                                                    Foreground="{ThemeResource TextControlButtonForeground}"
                                                    IsTextScaleFactorEnabled="False"
                                                    Text="&#xE711;" />
                                            </Grid>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </Grid.Resources>

                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />

                                <VisualState x:Name="Disabled">

                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderContentPresenter" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlHeaderForegroundDisabled}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlBackgroundDisabled}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlBorderBrushDisabled}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlForegroundDisabled}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PlaceholderTextContentPresenter" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding PlaceholderForeground, RelativeSource={RelativeSource TemplatedParent}, TargetNullValue={ThemeResource TextControlPlaceholderForegroundDisabled}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>

                                <VisualState x:Name="PointerOver">

                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlBorderBrushPointerOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlBackgroundPointerOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PlaceholderTextContentPresenter" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding PlaceholderForeground, RelativeSource={RelativeSource TemplatedParent}, TargetNullValue={ThemeResource TextControlPlaceholderForegroundPointerOver}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlForegroundPointerOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Focused">

                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PlaceholderTextContentPresenter" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding PlaceholderForeground, RelativeSource={RelativeSource TemplatedParent}, TargetNullValue={ThemeResource TextControlPlaceholderForegroundFocused}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlBackgroundFocused}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="BorderThickness">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="2" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="#FA6EC9" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlForegroundFocused}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="RequestedTheme">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Light" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>

                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ButtonStates">
                                <VisualState x:Name="ButtonVisible">

                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DeleteButton" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ButtonCollapsed" />

                            </VisualStateGroup>

                        </VisualStateManager.VisualStateGroups>

                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>

                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>

                        <ContentPresenter
                            x:Name="HeaderContentPresenter"
                            x:DeferLoadStrategy="Lazy"
                            Grid.Row="0"
                            Grid.Column="0"
                            Grid.ColumnSpan="2"
                            Margin="{ThemeResource TextBoxTopHeaderMargin}"
                            VerticalAlignment="Top"
                            Content="{Binding Header, RelativeSource={RelativeSource Mode=TemplatedParent}, Converter={StaticResource Upper}}"
                            FontFamily="Zegoe Caps, XamlAutoFontFamily"
                            FontSize="11"
                            FontWeight="Black"
                            Foreground="#828689"
                            TextWrapping="Wrap" />
                        <Border
                            x:Name="BorderElement"
                            Grid.Row="1"
                            Grid.RowSpan="1"
                            Grid.Column="0"
                            Grid.ColumnSpan="2"
                            MinWidth="{ThemeResource TextControlThemeMinWidth}"
                            MinHeight="{ThemeResource TextControlThemeMinHeight}"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Control.IsTemplateFocusTarget="True"
                            CornerRadius="{TemplateBinding CornerRadius}" />
                        <ScrollViewer
                            x:Name="ContentElement"
                            Grid.Row="1"
                            Grid.Column="0"
                            Margin="{TemplateBinding BorderThickness}"
                            Padding="{TemplateBinding Padding}"
                            AutomationProperties.AccessibilityView="Raw"
                            HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                            HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}"
                            IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}"
                            IsHorizontalRailEnabled="{TemplateBinding ScrollViewer.IsHorizontalRailEnabled}"
                            IsTabStop="False"
                            IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}"
                            VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                            VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}"
                            ZoomMode="Disabled" />
                        <TextBlock
                            x:Name="PlaceholderTextContentPresenter"
                            Grid.Row="1"
                            Grid.Column="0"
                            Grid.ColumnSpan="2"
                            Margin="{TemplateBinding BorderThickness}"
                            Padding="{TemplateBinding Padding}"
                            FontFamily="Zegoe Caps, XamlAutoFontFamily"
                            Foreground="{Binding PlaceholderForeground, RelativeSource={RelativeSource TemplatedParent}, TargetNullValue={ThemeResource TextControlPlaceholderForeground}}"
                            IsHitTestVisible="False"
                            Text="{TemplateBinding PlaceholderText}"
                            TextAlignment="{TemplateBinding TextAlignment}"
                            TextWrapping="{TemplateBinding TextWrapping}" />
                        <Button
                            x:Name="DeleteButton"
                            Grid.Row="1"
                            Grid.Column="1"
                            MinWidth="34"
                            Margin="{ThemeResource HelperButtonThemePadding}"
                            VerticalAlignment="Stretch"
                            AutomationProperties.AccessibilityView="Raw"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            FontSize="{TemplateBinding FontSize}"
                            IsTabStop="False"
                            Style="{StaticResource DeleteButtonStyle}"
                            Visibility="Collapsed" />
                        <ContentPresenter
                            x:Name="DescriptionPresenter"
                            x:Load="False"
                            Grid.Row="2"
                            Grid.Column="0"
                            Grid.ColumnSpan="2"
                            AutomationProperties.AccessibilityView="Raw"
                            Content="{TemplateBinding Description}"
                            Foreground="{ThemeResource SystemControlDescriptionTextForegroundBrush}" />

                    </Grid>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="AutoSuggestBoxTextBoxStyle" TargetType="TextBox">
        <Setter Property="MinWidth" Value="{ThemeResource TextControlThemeMinWidth}" />
        <Setter Property="MinHeight" Value="{ThemeResource TextControlThemeMinHeight}" />
        <Setter Property="Foreground" Value="{ThemeResource TextControlForeground}" />
        <Setter Property="Background" Value="{ThemeResource TextControlBackground}" />
        <Setter Property="BorderBrush" Value="{ThemeResource TextControlBorder}" />
        <Setter Property="SelectionHighlightColor" Value="{ThemeResource TextControlSelectionHighlightColor}" />
        <Setter Property="BorderThickness" Value="{ThemeResource TextControlBorderThemeThickness}" />
        <Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
        <Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
        <Setter Property="ScrollViewer.HorizontalScrollMode" Value="Auto" />
        <Setter Property="ScrollViewer.VerticalScrollMode" Value="Auto" />
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden" />
        <Setter Property="ScrollViewer.IsDeferredScrollingEnabled" Value="False" />
        <Setter Property="Padding" Value="{ThemeResource TextControlThemePadding}" />
        <Setter Property="CornerRadius" Value="{ThemeResource ControlCornerRadius}" />
        <Setter Property="Tag" Value="Visible" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="TextBox">
                    <Grid x:Name="Root">

                        <Grid.Resources>
                            <Style x:Name="DeleteButtonStyle" TargetType="Button">
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="Button">
                                            <Grid
                                                x:Name="ButtonLayoutGrid"
                                                Background="{ThemeResource TextControlButtonBackground}"
                                                BorderBrush="{ThemeResource TextControlButtonBorderBrush}"
                                                BorderThickness="{TemplateBinding BorderThickness}"
                                                CornerRadius="{TemplateBinding CornerRadius}">

                                                <VisualStateManager.VisualStateGroups>
                                                    <VisualStateGroup x:Name="CommonStates">
                                                        <VisualState x:Name="Normal" />

                                                        <VisualState x:Name="PointerOver">
                                                            <Storyboard>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonLayoutGrid" Storyboard.TargetProperty="Background">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonBackgroundPointerOver}" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonLayoutGrid" Storyboard.TargetProperty="BorderBrush">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonBorderBrushPointerOver}" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="GlyphElement" Storyboard.TargetProperty="Foreground">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonForegroundPointerOver}" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>

                                                        <VisualState x:Name="Pressed">
                                                            <Storyboard>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonLayoutGrid" Storyboard.TargetProperty="Background">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonBackgroundPressed}" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonLayoutGrid" Storyboard.TargetProperty="BorderBrush">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonBorderBrushPressed}" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="GlyphElement" Storyboard.TargetProperty="Foreground">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonForegroundPressed}" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>

                                                        <VisualState x:Name="Disabled">
                                                            <Storyboard>
                                                                <DoubleAnimation
                                                                    Storyboard.TargetName="ButtonLayoutGrid"
                                                                    Storyboard.TargetProperty="Opacity"
                                                                    To="0"
                                                                    Duration="0" />
                                                            </Storyboard>
                                                        </VisualState>
                                                    </VisualStateGroup>
                                                </VisualStateManager.VisualStateGroups>
                                                <TextBlock
                                                    x:Name="GlyphElement"
                                                    HorizontalAlignment="Center"
                                                    VerticalAlignment="Center"
                                                    AutomationProperties.AccessibilityView="Raw"
                                                    FontFamily="{ThemeResource SymbolThemeFontFamily}"
                                                    FontSize="{ThemeResource AutoSuggestBoxIconFontSize}"
                                                    FontStyle="Normal"
                                                    Foreground="{ThemeResource TextControlButtonForeground}"
                                                    IsTextScaleFactorEnabled="False"
                                                    Text="&#xE711;" />
                                            </Grid>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                            <Style x:Name="QueryButtonStyle" TargetType="Button">
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="Button">
                                            <ContentPresenter
                                                x:Name="ContentPresenter"
                                                Padding="{TemplateBinding Padding}"
                                                HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                                                AutomationProperties.AccessibilityView="Raw"
                                                Background="{ThemeResource TextControlButtonBackground}"
                                                BackgroundSizing="{TemplateBinding BackgroundSizing}"
                                                BorderBrush="{ThemeResource TextControlButtonBorderBrush}"
                                                BorderThickness="{TemplateBinding BorderThickness}"
                                                Content="{TemplateBinding Content}"
                                                ContentTemplate="{TemplateBinding ContentTemplate}"
                                                ContentTransitions="{TemplateBinding ContentTransitions}"
                                                CornerRadius="{TemplateBinding CornerRadius}"
                                                FontSize="{ThemeResource AutoSuggestBoxIconFontSize}">

                                                <VisualStateManager.VisualStateGroups>
                                                    <VisualStateGroup x:Name="CommonStates">
                                                        <VisualState x:Name="Normal" />

                                                        <VisualState x:Name="PointerOver">
                                                            <Storyboard>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonBackgroundPointerOver}" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonBorderBrushPointerOver}" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonForegroundPointerOver}" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>

                                                        <VisualState x:Name="Pressed">
                                                            <Storyboard>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonBackgroundPressed}" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonBorderBrushPressed}" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonForegroundPressed}" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>

                                                        <VisualState x:Name="Disabled">
                                                            <Storyboard>
                                                                <DoubleAnimation
                                                                    Storyboard.TargetName="ContentPresenter"
                                                                    Storyboard.TargetProperty="Opacity"
                                                                    To="0"
                                                                    Duration="0" />
                                                            </Storyboard>
                                                        </VisualState>
                                                    </VisualStateGroup>
                                                </VisualStateManager.VisualStateGroups>
                                            </ContentPresenter>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </Grid.Resources>

                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Disabled">
                                    <VisualState.Setters>
                                        <Setter Target="Root.Opacity" Value="0.4" />
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="PointerOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PlaceholderTextContent" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlPlaceholderForegroundPointerOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderDefaultElement" Storyboard.TargetProperty="Opacity">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="0.4" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemAccentColorDark1}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlBackgroundPointerOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlForegroundPointerOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PlaceholderTextContent" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlPlaceholderForegroundFocused}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlBackgroundFocused}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemAccentColorDark1}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="Opacity">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="1" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlForegroundFocused}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="RequestedTheme">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Light" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="QueryButton" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonForeground}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ButtonStates">
                                <VisualState x:Name="ButtonVisible">
                                    <VisualState.Setters>
                                        <Setter Target="DeleteButton.Visibility" Value="Visible" />
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="ButtonCollapsed" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>

                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>

                        <Border
                            x:Name="BorderDefaultElement"
                            Grid.Row="1"
                            Grid.RowSpan="1"
                            Grid.ColumnSpan="3"
                            Margin="2 0"
                            helpers:CompositionFactory.OpacityDuration="0:0:0.15"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Opacity="1"
                            RequestedTheme="Light" />
                        <Border
                            x:Name="BorderElement"
                            Grid.Row="1"
                            Grid.RowSpan="1"
                            Grid.ColumnSpan="3"
                            helpers:CompositionFactory.OpacityDuration="0:0:0.15"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="1"
                            CornerRadius="{TemplateBinding CornerRadius}"
                            Opacity="1" />
                        <ScrollViewer
                            x:Name="ContentElement"
                            Grid.Row="1"
                            Margin="{TemplateBinding BorderThickness}"
                            Padding="{TemplateBinding Padding}"
                            AutomationProperties.AccessibilityView="Raw"
                            CornerRadius="{TemplateBinding CornerRadius}"
                            HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                            HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}"
                            IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}"
                            IsHorizontalRailEnabled="{TemplateBinding ScrollViewer.IsHorizontalRailEnabled}"
                            IsTabStop="False"
                            IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}"
                            VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                            VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}"
                            ZoomMode="Disabled" />
                        <Grid
                            x:Name="PlaceholderTextContentPresenter"
                            Grid.Row="1"
                            Grid.ColumnSpan="3"
                            Margin="{TemplateBinding BorderThickness}"
                            Padding="{TemplateBinding Padding}">
                            <ContentControl
                                x:Name="PlaceholderTextContent"
                                VerticalAlignment="Center"
                                Content="{Binding PlaceholderText, RelativeSource={RelativeSource Mode=TemplatedParent}, Converter={StaticResource Upper}}"
                                FontFamily="Zegoe Caps, Segoe UI"
                                FontSize="12"
                                FontWeight="Bold"
                                Foreground="{ThemeResource TextControlPlaceholderForeground}"
                                IsHitTestVisible="False"
                                IsTabStop="False" />
                            <FontIcon
                                x:Name="PlaceholderIcon"
                                Margin="0 0 4 0"
                                HorizontalAlignment="Right"
                                FontFamily="{ThemeResource SymbolThemeFontFamily}"
                                FontSize="12"
                                Foreground="{ThemeResource TextControlPlaceholderForeground}"
                                Glyph="&#xE721;" />

                        </Grid>

                        <Button
                            x:Name="DeleteButton"
                            Grid.Row="1"
                            Grid.Column="1"
                            MinWidth="34"
                            VerticalAlignment="Stretch"
                            AutomationProperties.AccessibilityView="Raw"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="0 2 2 0"
                            FontSize="{TemplateBinding FontSize}"
                            IsTabStop="False"
                            Style="{StaticResource DeleteButtonStyle}"
                            Visibility="Collapsed" />
                        <Button
                            x:Name="QueryButton"
                            Grid.Row="1"
                            Grid.Column="2"
                            Width="{TemplateBinding Height}"
                            MinWidth="34"
                            VerticalAlignment="Stretch"
                            AutomationProperties.AccessibilityView="Raw"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="0 2 2 0"
                            FontSize="{TemplateBinding FontSize}"
                            IsTabStop="False"
                            Style="{StaticResource QueryButtonStyle}"
                            Visibility="Collapsed" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style BasedOn="{StaticResource DefaultThemeAutoSuggestBoxStyle}" TargetType="AutoSuggestBox" />

    <Style x:Key="DefaultThemeAutoSuggestBoxStyle" TargetType="AutoSuggestBox">
        <Setter Property="VerticalAlignment" Value="Top" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
        <Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
        <Setter Property="TextBoxStyle" Value="{StaticResource AutoSuggestBoxTextBoxStyle}" />
        <Setter Property="CornerRadius" Value="{ThemeResource ControlCornerRadius}" />
        <Setter Property="BorderThickness" Value="0 0 0 1" />
        <Setter Property="ItemContainerStyle">
            <Setter.Value>
                <Style TargetType="ListViewItem">
                    <Setter Property="HorizontalAlignment" Value="Stretch" />
                    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="AutoSuggestBox">
                    <Grid x:Name="LayoutRoot">

                        <TextBox
                            x:Name="TextBox"
                            Width="{TemplateBinding Width}"
                            Margin="0"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Canvas.ZIndex="0"
                            CornerRadius="{TemplateBinding CornerRadius}"
                            Description="{TemplateBinding Description}"
                            DesiredCandidateWindowAlignment="BottomEdge"
                            FontFamily="{TemplateBinding FontFamily}"
                            FontSize="{TemplateBinding FontSize}"
                            FontStretch="{TemplateBinding FontStretch}"
                            FontWeight="{TemplateBinding FontWeight}"
                            Header="{TemplateBinding Header}"
                            PlaceholderText="{TemplateBinding PlaceholderText}"
                            ScrollViewer.BringIntoViewOnFocusChange="False"
                            Style="{TemplateBinding TextBoxStyle}"
                            UseSystemFocusVisuals="{TemplateBinding UseSystemFocusVisuals}" />

                        <Popup x:Name="SuggestionsPopup">
                            <Border
                                x:Name="SuggestionsContainer"
                                Padding="2"
                                Background="White"
                                BorderBrush="{ThemeResource FlyoutBorderThemeBrush}"
                                BorderThickness="1"
                                CornerRadius="0">
                                <ListView
                                    x:Name="SuggestionsList"
                                    MaxHeight="{ThemeResource AutoSuggestListMaxHeight}"
                                    Margin="{ThemeResource AutoSuggestListPadding}"
                                    core:Properties.ToolTipMemberPath="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=(core:Properties.ToolTipMemberPath)}"
                                    DisplayMemberPath="{TemplateBinding DisplayMemberPath}"
                                    FontWeight="SemiBold"
                                    Footer="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=(core:Properties.Footer)}"
                                    IsItemClickEnabled="True"
                                    ItemContainerStyle="{TemplateBinding ItemContainerStyle}"
                                    ItemTemplate="{TemplateBinding ItemTemplate}"
                                    ItemTemplateSelector="{TemplateBinding ItemTemplateSelector}" />
                            </Border>
                        </Popup>
                    </Grid>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>




    <!--  FLYOUT  -->

    <Thickness x:Key="FlyoutBorderThemeThickness">1</Thickness>

    <Style x:Key="DefaultThemeMenuFlyoutItemStyle" TargetType="MenuFlyoutItem">
        <Setter Property="FontSize" Value="{StaticResource FontListFlyoutFontSize}" />
        <Setter Property="MinHeight" Value="30" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="MenuFlyoutItem">
                    <Grid
                        x:Name="LayoutRoot"
                        Padding="{TemplateBinding Padding}"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{TemplateBinding CornerRadius}">

                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal">

                                    <Storyboard>
                                        <PointerUpThemeAnimation Storyboard.TargetName="LayoutRoot" />
                                    </Storyboard>
                                </VisualState>

                                <VisualState x:Name="PointerOver">
                                    <VisualState.Setters>
                                        <Setter Target="LayoutRoot.Background" Value="{ThemeResource MenuFlyoutItemRevealBackgroundPointerOver}" />
                                        <Setter Target="LayoutRoot.BorderBrush" Value="{ThemeResource MenuFlyoutItemRevealBorderBrushPointerOver}" />
                                        <Setter Target="IconContent.Foreground" Value="{ThemeResource MenuFlyoutItemForegroundPointerOver}" />
                                        <Setter Target="TextBlock.Foreground" Value="{ThemeResource MenuFlyoutItemForegroundPointerOver}" />
                                        <Setter Target="KeyboardAcceleratorTextBlock.Foreground" Value="{ThemeResource MenuFlyoutItemKeyboardAcceleratorTextForegroundPointerOver}" />
                                    </VisualState.Setters>

                                    <Storyboard>
                                        <PointerUpThemeAnimation Storyboard.TargetName="LayoutRoot" />
                                    </Storyboard>
                                </VisualState>

                                <VisualState x:Name="Pressed">
                                    <VisualState.Setters>
                                        <Setter Target="LayoutRoot.Background" Value="{ThemeResource MenuFlyoutItemRevealBackgroundPressed}" />
                                        <Setter Target="LayoutRoot.BorderBrush" Value="{ThemeResource MenuFlyoutItemRevealBorderBrushPressed}" />
                                        <Setter Target="IconContent.Foreground" Value="{ThemeResource MenuFlyoutItemForegroundPressed}" />
                                        <Setter Target="TextBlock.Foreground" Value="{ThemeResource MenuFlyoutItemForegroundPressed}" />
                                        <Setter Target="KeyboardAcceleratorTextBlock.Foreground" Value="{ThemeResource MenuFlyoutItemKeyboardAcceleratorTextForegroundPressed}" />
                                    </VisualState.Setters>

                                    <Storyboard>
                                        <PointerDownThemeAnimation Storyboard.TargetName="LayoutRoot" />
                                    </Storyboard>
                                </VisualState>

                                <VisualState x:Name="Disabled">
                                    <VisualState.Setters>
                                        <Setter Target="LayoutRoot.Background" Value="{ThemeResource MenuFlyoutItemRevealBackgroundDisabled}" />
                                        <Setter Target="LayoutRoot.BorderBrush" Value="{ThemeResource MenuFlyoutItemRevealBorderBrushDisabled}" />
                                        <Setter Target="IconContent.Foreground" Value="{ThemeResource MenuFlyoutItemForegroundDisabled}" />
                                        <Setter Target="TextBlock.Foreground" Value="{ThemeResource MenuFlyoutItemForegroundDisabled}" />
                                        <Setter Target="KeyboardAcceleratorTextBlock.Foreground" Value="{ThemeResource MenuFlyoutItemKeyboardAcceleratorTextForegroundDisabled}" />
                                    </VisualState.Setters>
                                </VisualState>

                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CheckPlaceholderStates">
                                <VisualState x:Name="NoPlaceholder" />
                                <VisualState x:Name="CheckPlaceholder">
                                    <VisualState.Setters>
                                        <Setter Target="TextBlock.Margin" Value="{ThemeResource MenuFlyoutItemPlaceholderThemeThickness}" />
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="IconPlaceholder">
                                    <VisualState.Setters>
                                        <Setter Target="TextBlock.Margin" Value="{ThemeResource MenuFlyoutItemPlaceholderThemeThickness}" />
                                        <Setter Target="IconRoot.Visibility" Value="Visible" />
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="CheckAndIconPlaceholder">
                                    <VisualState.Setters>
                                        <Setter Target="TextBlock.Margin" Value="{ThemeResource MenuFlyoutItemDoublePlaceholderThemeThickness}" />
                                        <Setter Target="IconRoot.Margin" Value="{ThemeResource MenuFlyoutItemPlaceholderThemeThickness}" />
                                        <Setter Target="IconRoot.Visibility" Value="Visible" />
                                    </VisualState.Setters>
                                </VisualState>

                            </VisualStateGroup>
                            <VisualStateGroup x:Name="PaddingSizeStates">
                                <VisualState x:Name="DefaultPadding" />
                                <VisualState x:Name="NarrowPadding">

                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Padding">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource MenuFlyoutItemThemePaddingNarrow}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>

                            </VisualStateGroup>
                            <VisualStateGroup x:Name="KeyboardAcceleratorTextVisibility">
                                <VisualState x:Name="KeyboardAcceleratorTextCollapsed" />
                                <VisualState x:Name="KeyboardAcceleratorTextVisible">
                                    <VisualState.Setters>
                                        <Setter Target="KeyboardAcceleratorTextBlock.Visibility" Value="Visible" />
                                    </VisualState.Setters>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Viewbox
                            x:Name="IconRoot"
                            Width="16"
                            Height="16"
                            HorizontalAlignment="Left"
                            VerticalAlignment="Center"
                            Visibility="Collapsed">
                            <ContentPresenter x:Name="IconContent" Content="{TemplateBinding Icon}" />
                        </Viewbox>
                        <TextBlock
                            x:Name="TextBlock"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Foreground="{TemplateBinding Foreground}"
                            Text="{TemplateBinding Text}"
                            TextTrimming="Clip" />
                        <TextBlock
                            x:Name="KeyboardAcceleratorTextBlock"
                            Grid.Column="1"
                            MinWidth="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.KeyboardAcceleratorTextMinWidth}"
                            Margin="24,0,0,0"
                            HorizontalAlignment="Right"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            AutomationProperties.AccessibilityView="Raw"
                            Foreground="{ThemeResource MenuFlyoutItemKeyboardAcceleratorTextForeground}"
                            Style="{ThemeResource CaptionTextBlockStyle}"
                            Text="{TemplateBinding KeyboardAcceleratorTextOverride}"
                            Visibility="Collapsed" />
                        <TextBlock
                            Grid.Column="1"
                            Margin="24,0,0,0"
                            HorizontalAlignment="Right"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            FontFamily="{StaticResource SymbolThemeFontFamily}"
                            Foreground="{ThemeResource MenuFlyoutItemKeyboardAcceleratorTextForeground}"
                            HorizontalTextAlignment="Right"
                            Opacity="0.7"
                            Style="{ThemeResource CaptionTextBlockStyle}"
                            Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=(core:Properties.IconString)}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="MenuFlyoutSubItem">
        <Setter Property="FontSize" Value="{StaticResource FontListFlyoutFontSize}" />
        <Setter Property="MinHeight" Value="30" />
    </Style>

    <Style x:Key="ThemeMenuFlyoutItemStyle" BasedOn="{StaticResource DefaultThemeMenuFlyoutItemStyle}" TargetType="MenuFlyoutItem" />

    <Style BasedOn="{StaticResource DefaultThemeMenuFlyoutItemStyle}" TargetType="MenuFlyoutItem" />

    <Style x:Key="FontListFlyoutStyle" TargetType="MenuFlyoutPresenter">
        <Setter Property="FontSize" Value="{StaticResource FontListFlyoutFontSize}" />
        <Setter Property="CornerRadius" Value="0" />
        <Setter Property="Margin" Value="0 -4 0 0" />
        <Setter Property="FontWeight" Value="SemiBold" />
        <Setter Property="Background" Value="White" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="BorderThickness" Value="1" />
    </Style>

    <Style x:Key="DefaultFlyoutStyle" BasedOn="{StaticResource FontListFlyoutStyle}" TargetType="MenuFlyoutPresenter" />

    <Style x:Key="DefaultThemeFlyoutPresenterStyle" TargetType="FlyoutPresenter">
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="FontSize" Value="{StaticResource FontListFlyoutFontSize}" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="IsDefaultShadowEnabled" Value="True" />
        <Setter Property="Background" Value="White" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="RenderTransformOrigin" Value="0.5 0" />
        <Setter Property="MinWidth" Value="{ThemeResource FlyoutThemeMinWidth}" />
        <Setter Property="MaxWidth" Value="{ThemeResource FlyoutThemeMaxWidth}" />
        <Setter Property="MinHeight" Value="{ThemeResource FlyoutThemeMinHeight}" />
        <Setter Property="MaxHeight" Value="{ThemeResource FlyoutThemeMaxHeight}" />
        <Setter Property="ScrollViewer.HorizontalScrollMode" Value="Auto" />
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
        <Setter Property="ScrollViewer.VerticalScrollMode" Value="Auto" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
        <Setter Property="ScrollViewer.ZoomMode" Value="Disabled" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="FlyoutPresenter">
                    <Border
                        Padding="{ThemeResource FlyoutBorderThemePadding}"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="0">
                        <ContentPresenter
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Content="{TemplateBinding Content}"
                            ContentTemplate="{TemplateBinding ContentTemplate}"
                            ContentTransitions="{TemplateBinding ContentTransitions}" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style BasedOn="{StaticResource DefaultThemeFlyoutPresenterStyle}" TargetType="FlyoutPresenter" />

    <Style x:Name="ThemeFlyoutStyle" BasedOn="{StaticResource DefaultThemeFlyoutPresenterStyle}" TargetType="FlyoutPresenter" />




    <!--  LISTVIEW  -->

    <Style x:Key="DefaultThemeListViewItemStyle" TargetType="ListViewItem">
        <Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
        <Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
        <Setter Property="BorderBrush" Value="{x:Null}" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseHighBrush}" />
        <Setter Property="TabNavigation" Value="Local" />
        <Setter Property="IsHoldingEnabled" Value="True" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="HorizontalAlignment" Value="Stretch" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="AllowDrop" Value="False" />
        <Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}" />
        <Setter Property="FocusVisualMargin" Value="0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ListViewItem">
                    <Grid
                        x:Name="ContentBorder"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Control.IsTemplateFocusTarget="True"
                        FocusVisualMargin="{TemplateBinding FocusVisualMargin}"
                        RenderTransformOrigin="0.5,0.5">

                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal">

                                    <Storyboard>
                                        <PointerUpThemeAnimation Storyboard.TargetName="ContentPresenter" />
                                    </Storyboard>
                                </VisualState>

                                <VisualState x:Name="PointerOver">

                                    <Storyboard>
                                        <DoubleAnimation
                                            Storyboard.TargetName="BorderBackground"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0" />
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderBackground" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SelectedPointerOverBackgroundBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}" />
                                        </ObjectAnimationUsingKeyFrames>-->
                                        <PointerUpThemeAnimation Storyboard.TargetName="ContentPresenter" />
                                    </Storyboard>
                                </VisualState>

                                <VisualState x:Name="Pressed">

                                    <Storyboard>
                                        <DoubleAnimation
                                            Storyboard.TargetName="BorderBackground"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0" />
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderBackground" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SelectedPointerOverBackgroundBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}" />
                                        </ObjectAnimationUsingKeyFrames>-->
                                        <PointerDownThemeAnimation TargetName="ContentPresenter" />
                                    </Storyboard>
                                </VisualState>

                                <VisualState x:Name="Selected">

                                    <Storyboard>

                                        <DoubleAnimation
                                            Storyboard.TargetName="BorderBackground"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0" />
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderBackground" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SelectedBackgroundBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}" />
                                        </ObjectAnimationUsingKeyFrames>-->
                                        <PointerUpThemeAnimation Storyboard.TargetName="ContentPresenter" />
                                    </Storyboard>
                                </VisualState>

                                <VisualState x:Name="PointerOverSelected">

                                    <Storyboard>
                                        <DoubleAnimation
                                            Storyboard.TargetName="BorderBackground"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0" />
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderBackground" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SelectedPointerOverBackgroundBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}" />
                                        </ObjectAnimationUsingKeyFrames>-->
                                        <PointerUpThemeAnimation Storyboard.TargetName="ContentPresenter" />
                                    </Storyboard>
                                </VisualState>

                                <VisualState x:Name="PressedSelected">

                                    <Storyboard>
                                        <DoubleAnimation
                                            Storyboard.TargetName="BorderBackground"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0" />
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderBackground" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SelectedPointerOverBackgroundBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}" />
                                        </ObjectAnimationUsingKeyFrames>-->
                                        <PointerDownThemeAnimation TargetName="ContentPresenter" />
                                    </Storyboard>
                                </VisualState>

                            </VisualStateGroup>

                            <VisualStateGroup x:Name="DisabledStates">
                                <VisualState x:Name="Enabled" />

                                <VisualState x:Name="Disabled">

                                    <Storyboard>
                                        <DoubleAnimation
                                            Storyboard.TargetName="ContentBorder"
                                            Storyboard.TargetProperty="Opacity"
                                            To="{ThemeResource ListViewItemDisabledThemeOpacity}"
                                            Duration="0" />
                                    </Storyboard>
                                </VisualState>

                            </VisualStateGroup>

                        </VisualStateManager.VisualStateGroups>
                        <Rectangle
                            x:Name="BorderBackground"
                            x:Load="False"
                            Control.IsTemplateFocusTarget="True"
                            Fill="{ThemeResource SystemControlHighlightListAccentLowBrush}"
                            IsHitTestVisible="False"
                            Opacity="0" />
                        <ContentPresenter
                            x:Name="ContentPresenter"
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Content="{TemplateBinding Content}"
                            ContentTemplate="{TemplateBinding ContentTemplate}"
                            ContentTransitions="{TemplateBinding ContentTransitions}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>




    <!--  COMBOBOX  -->

    <Style x:Key="DefaultThemeComboBoxItemStyle" TargetType="controls:UXComboBoxItem">
        <Setter Property="Foreground" Value="{ThemeResource ComboBoxForeground}" />
        <Setter Property="FontWeight" Value="SemiBold" />
        <Setter Property="Background" Value="{ThemeResource FlyoutPresenterBackground}" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="TabNavigation" Value="Local" />
        <Setter Property="Padding" Value="{ThemeResource ComboBoxItemRevealThemePadding}" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="RequestedTheme" Value="Light" />
        <Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:UXComboBoxItem">
                    <Grid
                        x:Name="LayoutRoot"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Control.IsTemplateFocusTarget="True"
                        CornerRadius="{TemplateBinding CornerRadius}">

                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />

                                <VisualState x:Name="PointerOver">
                                    <VisualState.Setters>
                                        <Setter Target="LayoutRoot.Background" Value="{ThemeResource SelectedPointerOverBackgroundBrush}" />
                                        <Setter Target="ContentPresenter.Foreground" Value="Black" />
                                    </VisualState.Setters>
                                </VisualState>

                                <VisualState x:Name="Disabled">
                                    <VisualState.Setters>
                                        <Setter Target="LayoutRoot.Background" Value="{ThemeResource ComboBoxItemRevealBackgroundDisabled}" />
                                        <Setter Target="ContentPresenter.Foreground" Value="{ThemeResource ComboBoxItemForegroundDisabled}" />
                                    </VisualState.Setters>
                                </VisualState>

                                <VisualState x:Name="Pressed">
                                    <VisualState.Setters>
                                        <Setter Target="LayoutRoot.Background" Value="{ThemeResource SelectedBackgroundBrush}" />
                                        <Setter Target="ContentPresenter.Foreground" Value="Black" />
                                    </VisualState.Setters>

                                </VisualState>

                                <VisualState x:Name="Selected">
                                    <VisualState.Setters>
                                        <Setter Target="LayoutRoot.Background" Value="{ThemeResource SelectedBackgroundBrush}" />
                                        <Setter Target="ContentPresenter.Foreground" Value="Black" />
                                    </VisualState.Setters>

                                </VisualState>
                                <VisualState x:Name="SelectedUnfocused">
                                    <VisualState.Setters>
                                        <Setter Target="LayoutRoot.Background" Value="{ThemeResource SelectedBackgroundBrush}" />
                                        <Setter Target="ContentPresenter.Foreground" Value="{ThemeResource ComboBoxItemForegroundSelectedUnfocused}" />
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="SelectedDisabled">
                                    <VisualState.Setters>
                                        <Setter Target="LayoutRoot.Background" Value="{ThemeResource SelectedBackgroundBrush}" />
                                        <Setter Target="ContentPresenter.Foreground" Value="{ThemeResource ComboBoxItemForegroundSelectedDisabled}" />
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="SelectedPointerOver">
                                    <VisualState.Setters>
                                        <Setter Target="LayoutRoot.Background" Value="{ThemeResource SelectedBackgroundBrush}" />
                                        <Setter Target="ContentPresenter.Foreground" Value="Black" />
                                    </VisualState.Setters>

                                </VisualState>
                                <VisualState x:Name="SelectedPressed">
                                    <VisualState.Setters>
                                        <Setter Target="LayoutRoot.Background" Value="{ThemeResource SelectedBackgroundBrush}" />
                                        <Setter Target="ContentPresenter.Foreground" Value="Black" />
                                    </VisualState.Setters>
                                </VisualState>

                            </VisualStateGroup>
                            <!--<VisualStateGroup x:Name="InputModeStates">
                                <VisualState x:Name="InputModeDefault" />
                                <VisualState x:Name="TouchInputMode">
                                    <VisualState.Setters>
                                        <Setter Target="ContentPresenter.Margin" Value="{ThemeResource ComboBoxItemRevealThemeTouchPadding}" />
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="GameControllerInputMode">
                                    <VisualState.Setters>
                                        <Setter Target="ContentPresenter.Margin" Value="{ThemeResource ComboBoxItemRevealThemeGameControllerPadding}" />
                                    </VisualState.Setters>
                                </VisualState>

                            </VisualStateGroup>-->

                        </VisualStateManager.VisualStateGroups>
                        <ContentPresenter
                            x:Name="ContentPresenter"
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Content="{TemplateBinding Content}"
                            ContentTemplate="{TemplateBinding ContentTemplate}"
                            ContentTransitions="{TemplateBinding ContentTransitions}"
                            Foreground="{TemplateBinding Foreground}" />

                    </Grid>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="DefaultThemeComboBoxStyle" TargetType="controls:UXComboBox">
        <Setter Property="Padding" Value="12,5,12,7" />
        <Setter Property="MaxDropDownHeight" Value="504" />
        <Setter Property="Foreground" Value="{ThemeResource ComboBoxForeground}" />
        <Setter Property="Background" Value="{ThemeResource ComboBoxBackground}" />
        <Setter Property="BorderBrush" Value="{ThemeResource ComboBoxBorderBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="FontWeight" Value="SemiBold" />
        <Setter Property="TabNavigation" Value="Once" />
        <Setter Property="ItemContainerStyle" Value="{StaticResource DefaultThemeComboBoxItemStyle}" />
        <Setter Property="CornerRadius" Value="0" />
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
        <Setter Property="ScrollViewer.HorizontalScrollMode" Value="Disabled" />
        <Setter Property="ScrollViewer.VerticalScrollMode" Value="Auto" />
        <Setter Property="ScrollViewer.IsVerticalRailEnabled" Value="True" />
        <Setter Property="ScrollViewer.IsDeferredScrollingEnabled" Value="False" />
        <Setter Property="ScrollViewer.BringIntoViewOnFocusChange" Value="True" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="HorizontalAlignment" Value="Left" />
        <Setter Property="VerticalAlignment" Value="Top" />
        <Setter Property="RequestedTheme" Value="Light" />
        <Setter Property="HeaderTemplate" Value="{x:Null}" />
        <Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
        <Setter Property="FontSize" Value="13.3333" />
        <Setter Property="UseSystemFocusVisuals" Value="{ThemeResource IsApplicationFocusVisualKindReveal}" />
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <CarouselPanel />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:UXComboBox">
                    <Grid x:Name="LayoutRoot">

                        <Grid.Resources>
                            <Storyboard x:Key="OverlayOpeningAnimation">
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity">
                                    <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="0.0" />
                                    <SplineDoubleKeyFrame KeySpline="0.1,0.9 0.2,1.0" KeyTime="0:0:0.383" Value="1.0" />
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="OverlayClosingAnimation">
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity">
                                    <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="1.0" />
                                    <SplineDoubleKeyFrame KeySpline="0.1,0.9 0.2,1.0" KeyTime="0:0:0.216" Value="0.0" />
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </Grid.Resources>

                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />

                                <VisualState x:Name="PointerOver">

                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="White" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>

                                <VisualState x:Name="Pressed">

                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="White" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>

                                <VisualState x:Name="Disabled">

                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ComboBoxBackgroundDisabled}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ComboBoxBorderBrushDisabled}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderContentPresenter" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ComboBoxForegroundDisabled}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ComboBoxForegroundDisabled}" />
                                        </ObjectAnimationUsingKeyFrames>-->
                                    </Storyboard>
                                </VisualState>

                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">

                                    <Storyboard>
                                        <DoubleAnimation
                                            Storyboard.TargetName="HighlightBackground"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0" />
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HighlightBackground" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ComboBoxBackgroundBorderBrushFocused}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ComboBoxForegroundFocused}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="FocusedPressed">

                                    <Storyboard>
                                        <DoubleAnimation
                                            Storyboard.TargetName="HighlightBackground"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0" />
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ComboBoxForegroundFocusedPressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PlaceholderTextBlock" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding PlaceholderForeground, RelativeSource={RelativeSource TemplatedParent}, TargetNullValue={ThemeResource ComboBoxPlaceHolderForegroundFocusedPressed}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused" />
                                <VisualState x:Name="PointerFocused" />
                                <VisualState x:Name="FocusedDropDown">

                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="PopupBorder"
                                            Storyboard.TargetProperty="Visibility"
                                            Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>

                            </VisualStateGroup>
                            <VisualStateGroup x:Name="DropDownStates">
                                <VisualState x:Name="Opened">

                                    <Storyboard>
                                        <SplitOpenThemeAnimation
                                            ClosedTargetName="ContentPresenter"
                                            OffsetFromCenter="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.DropDownOffset}"
                                            OpenedLength="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.DropDownOpenedHeight}"
                                            OpenedTargetName="PopupBorder" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Closed">

                                    <Storyboard>
                                        <SplitCloseThemeAnimation
                                            ClosedTargetName="ContentPresenter"
                                            OffsetFromCenter="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.DropDownOffset}"
                                            OpenedLength="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.DropDownOpenedHeight}"
                                            OpenedTargetName="PopupBorder" />
                                    </Storyboard>
                                </VisualState>

                            </VisualStateGroup>


                        </VisualStateManager.VisualStateGroups>

                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>

                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="26" />
                        </Grid.ColumnDefinitions>

                        <ContentPresenter
                            x:Name="HeaderContentPresenter"
                            x:DeferLoadStrategy="Lazy"
                            Grid.Row="0"
                            Grid.Column="0"
                            Grid.ColumnSpan="2"
                            Margin="0 8 0 2"
                            VerticalAlignment="Top"
                            Content="{TemplateBinding Header}"
                            ContentTemplate="{TemplateBinding HeaderTemplate}"
                            FlowDirection="{TemplateBinding FlowDirection}"
                            TextWrapping="Wrap"
                            Visibility="Collapsed" />

                        <Border
                            x:Name="Background"
                            Grid.Row="1"
                            Grid.Column="0"
                            Grid.ColumnSpan="2"
                            MinWidth="{ThemeResource ComboBoxThemeMinWidth}"
                            Background="{TemplateBinding Background}"
                            BackgroundTransition="{StaticResource DefaultBrushTransition}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Control.IsTemplateFocusTarget="True" />
                        <Border
                            x:Name="HighlightBackground"
                            Grid.Row="1"
                            Grid.Column="0"
                            Grid.ColumnSpan="2"
                            Background="{ThemeResource ComboBoxBackgroundUnfocused}"
                            BorderBrush="{ThemeResource ComboBoxBackgroundBorderBrushUnfocused}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Opacity="0" />
                        <ContentPresenter
                            x:Name="ContentPresenter"
                            Grid.Row="1"
                            Grid.Column="0"
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            FontWeight="{TemplateBinding FontWeight}">
                            <TextBlock
                                x:Name="PlaceholderTextBlock"
                                Foreground="{Binding PlaceholderForeground, RelativeSource={RelativeSource TemplatedParent}, TargetNullValue={ThemeResource ComboBoxPlaceHolderForeground}}"
                                Text="{TemplateBinding PlaceholderText}" />
                        </ContentPresenter>
                        <Border
                            x:Name="DropDownOverlay"
                            x:Load="False"
                            Grid.Row="1"
                            Grid.Column="1"
                            Width="30"
                            Margin="0,2,2,2"
                            HorizontalAlignment="Right"
                            Background="Transparent"
                            Visibility="Collapsed" />
                        <Grid
                            x:Name="DropDownGlyphContainer"
                            Grid.Row="1"
                            Grid.Column="1"
                            HorizontalAlignment="Stretch"
                            VerticalAlignment="Stretch">
                            <Path
                                x:Name="DropDownGlyph"
                                Grid.Column="1"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Data="M 0 0 L 4 4 L 8 0 Z"
                                Fill="#404040" />
                        </Grid>

                        <!--<FontIcon
                                x:Name="DropDownGlyph"
                                Grid.Row="1"
                                Grid.Column="1"
                                Margin="0,10,10,10"
                                HorizontalAlignment="Right"
                                VerticalAlignment="Center"
                                AutomationProperties.AccessibilityView="Raw"
                                FontFamily="{ThemeResource SymbolThemeFontFamily}"
                                FontSize="12"
                                Foreground="{ThemeResource ComboBoxDropDownGlyphForeground}"
                                Glyph="&#xE70D;"
                                IsHitTestVisible="False" />-->

                        <Popup x:Name="Popup" RequestedTheme="Light">
                            <Border
                                x:Name="PopupBorder"
                                Margin="0,-1,0,-1"
                                Padding="{ThemeResource ComboBoxDropdownBorderPadding}"
                                HorizontalAlignment="Stretch"
                                Background="{ThemeResource FlyoutPresenterBackground}"
                                BackgroundSizing="OuterBorderEdge"
                                BorderBrush="{ThemeResource ComboBoxDropDownBorderBrush}"
                                BorderThickness="{ThemeResource ComboBoxDropdownBorderThickness}"
                                RequestedTheme="Light">
                                <ScrollViewer
                                    x:Name="ScrollViewer"
                                    MinWidth="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.DropDownContentMinWidth}"
                                    AutomationProperties.AccessibilityView="Raw"
                                    BringIntoViewOnFocusChange="{TemplateBinding ScrollViewer.BringIntoViewOnFocusChange}"
                                    Foreground="{ThemeResource ComboBoxDropDownForeground}"
                                    HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                                    HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}"
                                    IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}"
                                    IsHorizontalRailEnabled="{TemplateBinding ScrollViewer.IsHorizontalRailEnabled}"
                                    IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}"
                                    VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                                    VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}"
                                    VerticalSnapPointsAlignment="Near"
                                    VerticalSnapPointsType="OptionalSingle"
                                    ZoomMode="Disabled">
                                    <ItemsPresenter Margin="{ThemeResource ComboBoxDropdownContentMargin}" />
                                </ScrollViewer>
                            </Border>
                        </Popup>

                    </Grid>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style BasedOn="{StaticResource DefaultThemeComboBoxItemStyle}" TargetType="ComboBoxItem" />

    <Style BasedOn="{StaticResource DefaultThemeComboBoxItemStyle}" TargetType="controls:UXComboBoxItem" />

    <Style BasedOn="{StaticResource DefaultThemeComboBoxStyle}" TargetType="ComboBox" />

    <Style x:Key="VariantComboBoxStyle" TargetType="controls:UXComboBox">
        <Setter Property="Padding" Value="12,5,0,7" />
        <Setter Property="MinWidth" Value="{ThemeResource ComboBoxThemeMinWidth}" />
        <Setter Property="Foreground" Value="{ThemeResource ComboBoxForeground}" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="TabNavigation" Value="Once" />
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
        <Setter Property="ScrollViewer.HorizontalScrollMode" Value="Disabled" />
        <Setter Property="ScrollViewer.VerticalScrollMode" Value="Auto" />
        <Setter Property="ScrollViewer.IsVerticalRailEnabled" Value="True" />
        <Setter Property="ScrollViewer.IsDeferredScrollingEnabled" Value="False" />
        <Setter Property="ScrollViewer.BringIntoViewOnFocusChange" Value="True" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="HorizontalAlignment" Value="Left" />
        <Setter Property="VerticalAlignment" Value="Top" />
        <Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
        <Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
        <Setter Property="UseSystemFocusVisuals" Value="{ThemeResource IsApplicationFocusVisualKindReveal}" />
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <CarouselPanel />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:UXComboBox">
                    <Grid x:Name="LayoutRoot">
                        <Grid.Resources>
                            <Storyboard x:Key="OverlayOpeningAnimation">
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity">
                                    <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="0.0" />
                                    <SplineDoubleKeyFrame KeySpline="0.1,0.9 0.2,1.0" KeyTime="0:0:0.383" Value="1.0" />
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="OverlayClosingAnimation">
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity">
                                    <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="1.0" />
                                    <SplineDoubleKeyFrame KeySpline="0.1,0.9 0.2,1.0" KeyTime="0:0:0.216" Value="0.0" />
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </Grid.Resources>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" MinHeight="0" />
                        </Grid.RowDefinitions>

                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="36" />
                        </Grid.ColumnDefinitions>

                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />

                                <VisualState x:Name="PointerOver">
                                    <VisualState.Setters>
                                        <Setter Target="Background.Background" Value="White" />
                                        <Setter Target="Background.BorderBrush" Value="{ThemeResource ComboBoxBorderBrush}" />
                                    </VisualState.Setters>
                                </VisualState>

                                <VisualState x:Name="Pressed">
                                    <VisualState.Setters>
                                        <Setter Target="Background.Background" Value="White" />
                                        <Setter Target="Background.BorderBrush" Value="{ThemeResource ComboBoxBorderBrush}" />
                                    </VisualState.Setters>
                                </VisualState>

                                <VisualState x:Name="Disabled">
                                    <VisualState.Setters>
                                        <Setter Target="DropDownGlyph.Opacity" Value="0" />
                                        <Setter Target="Background.BorderBrush" Value="Transparent" />
                                    </VisualState.Setters>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">

                                    <Storyboard>
                                        <DoubleAnimation
                                            Storyboard.TargetName="HighlightBackground"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0" />
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HighlightBackground" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ComboBoxBackgroundBorderBrushFocused}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ComboBoxForegroundFocused}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownGlyph" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ComboBoxDropDownGlyphForegroundFocused}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="FocusedPressed">

                                    <Storyboard>
                                        <DoubleAnimation
                                            Storyboard.TargetName="HighlightBackground"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0" />
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ComboBoxForegroundFocusedPressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownGlyph" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ComboBoxDropDownGlyphForegroundFocusedPressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused" />
                                <VisualState x:Name="PointerFocused" />
                                <VisualState x:Name="FocusedDropDown">

                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="PopupBorder"
                                            Storyboard.TargetProperty="Visibility"
                                            Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="DropDownStates">
                                <VisualState x:Name="Opened">

                                    <Storyboard>
                                        <SplitOpenThemeAnimation
                                            ClosedTargetName="ContentPresenter"
                                            OffsetFromCenter="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.DropDownOffset}"
                                            OpenedLength="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.DropDownOpenedHeight}"
                                            OpenedTargetName="PopupBorder" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Closed">

                                    <Storyboard>
                                        <SplitCloseThemeAnimation
                                            ClosedTargetName="ContentPresenter"
                                            OffsetFromCenter="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.DropDownOffset}"
                                            OpenedLength="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.DropDownOpenedHeight}"
                                            OpenedTargetName="PopupBorder" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>

                        </VisualStateManager.VisualStateGroups>
                        <ContentPresenter
                            x:Name="HeaderContentPresenter"
                            x:DeferLoadStrategy="Lazy"
                            Margin="12 0 0 4"
                            Content="{TemplateBinding Header}"
                            ContentTemplate="{TemplateBinding HeaderTemplate}"
                            FlowDirection="{TemplateBinding FlowDirection}"
                            FontFamily="Segoe UI"
                            FontSize="12"
                            FontWeight="Normal"
                            Foreground="{Binding PlaceholderForeground, RelativeSource={RelativeSource TemplatedParent}, TargetNullValue={ThemeResource TextControlPlaceholderForeground}}"
                            Visibility="Collapsed" />
                        <Border
                            x:Name="Background"
                            Grid.Row="1"
                            Grid.ColumnSpan="2"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Control.IsTemplateFocusTarget="True">
                            <Border.BackgroundTransition>
                                <BrushTransition Duration="0:0:0.1" />
                            </Border.BackgroundTransition>
                        </Border>
                        <Border
                            x:Name="HighlightBackground"
                            Grid.Row="1"
                            Grid.ColumnSpan="2"
                            Background="{ThemeResource ComboBoxBackgroundUnfocused}"
                            BorderBrush="{ThemeResource ComboBoxBackgroundBorderBrushUnfocused}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Opacity="0" />
                        <ContentPresenter
                            x:Name="ContentPresenter"
                            Grid.Row="1"
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Visibility="Collapsed" />
                        <StackPanel
                            Grid.Row="1"
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                            <ContentPresenter
                                MinHeight="0"
                                Content="{TemplateBinding PreContent}"
                                Foreground="{ThemeResource TextControlPlaceholderForeground}" />
                            <ContentPresenter
                                Content="{TemplateBinding SelectedItem}"
                                FontFamily="{StaticResource ContentControlThemeFontFamily}"
                                FontSize="{TemplateBinding FontSize}"
                                FontStyle="Normal"
                                FontWeight="Normal" />
                            <ContentPresenter
                                MinHeight="0"
                                Content="{TemplateBinding SecondaryContent}"
                                Foreground="{ThemeResource TextControlPlaceholderForeground}" />
                        </StackPanel>
                        <FontIcon
                            x:Name="DropDownGlyph"
                            Grid.Row="1"
                            Grid.Column="1"
                            Margin="0,10,10,10"
                            HorizontalAlignment="Right"
                            VerticalAlignment="Center"
                            helpers:CompositionFactory.OpacityDuration="0:0:0.1"
                            AutomationProperties.AccessibilityView="Raw"
                            FontFamily="{ThemeResource SymbolThemeFontFamily}"
                            FontSize="12"
                            Foreground="{ThemeResource ComboBoxDropDownGlyphForeground}"
                            Glyph="&#xE70D;"
                            IsHitTestVisible="False" />

                        <Popup x:Name="Popup">
                            <Border
                                x:Name="PopupBorder"
                                Margin="0,-1,0,-1"
                                HorizontalAlignment="Stretch"
                                Background="{ThemeResource FlyoutPresenterBackground}"
                                BorderBrush="{ThemeResource ComboBoxDropDownBorderBrush}"
                                BorderThickness="{ThemeResource ComboBoxDropdownBorderThickness}">
                                <ScrollViewer
                                    x:Name="ScrollViewer"
                                    MinWidth="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.DropDownContentMinWidth}"
                                    AutomationProperties.AccessibilityView="Raw"
                                    BringIntoViewOnFocusChange="{TemplateBinding ScrollViewer.BringIntoViewOnFocusChange}"
                                    Foreground="{ThemeResource ComboBoxDropDownForeground}"
                                    HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                                    HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}"
                                    IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}"
                                    IsHorizontalRailEnabled="{TemplateBinding ScrollViewer.IsHorizontalRailEnabled}"
                                    IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}"
                                    VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                                    VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}"
                                    VerticalSnapPointsAlignment="Near"
                                    VerticalSnapPointsType="OptionalSingle"
                                    ZoomMode="Disabled">
                                    <ItemsPresenter Margin="{ThemeResource ComboBoxDropdownContentMargin}" />
                                </ScrollViewer>
                            </Border>
                        </Popup>

                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>




    <!--  SLIDER  -->

    <SolidColorBrush x:Key="SliderThumbBackground" Color="Black" />
    <SolidColorBrush x:Key="SliderTrackFill" Color="#9D9D9D" />
    <SolidColorBrush x:Key="SliderTrackValueFill" Color="Black" />
    <x:Double x:Key="SliderHorizontalHeight">22</x:Double>

    <Style x:Key="DefaultThemeSliderStyle" TargetType="Slider">
        <Setter Property="Background" Value="{ThemeResource SliderTrackFill}" />
        <Setter Property="BorderThickness" Value="{ThemeResource SliderBorderThemeThickness}" />
        <Setter Property="Foreground" Value="{ThemeResource SliderTrackValueFill}" />
        <Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
        <Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
        <Setter Property="ManipulationMode" Value="None" />
        <Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}" />
        <Setter Property="FocusVisualMargin" Value="-7,0,-7,0" />
        <Setter Property="IsFocusEngagementEnabled" Value="True" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Slider">
                    <Grid x:Name="ControlRoot" Margin="{TemplateBinding Padding}">

                        <Grid.Resources>
                            <Style x:Key="SliderThumbStyle" TargetType="Thumb">
                                <Setter Property="BorderThickness" Value="0 0 1.5 0" />
                                <Setter Property="BorderBrush" Value="White" />
                                <Setter Property="Background" Value="{ThemeResource SliderThumbBackground}" />
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="Thumb">
                                            <Border
                                                Background="{TemplateBinding Background}"
                                                BorderBrush="{TemplateBinding BorderBrush}"
                                                BorderThickness="{TemplateBinding BorderThickness}"
                                                CornerRadius="0" />
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </Grid.Resources>

                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />

                                <VisualState x:Name="Pressed" />

                                <VisualState x:Name="Disabled">
                                    <VisualState.Setters>
                                        <Setter Target="ControlRoot.Opacity" Value="0.4" />
                                    </VisualState.Setters>
                                </VisualState>

                                <VisualState x:Name="PointerOver" />

                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusEngagementStates">
                                <VisualState x:Name="FocusDisengaged" />
                                <VisualState x:Name="FocusEngagedHorizontal">

                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SliderContainer" Storyboard.TargetProperty="(Control.IsTemplateFocusTarget)">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="False" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalThumb" Storyboard.TargetProperty="(Control.IsTemplateFocusTarget)">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="True" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="FocusEngagedVertical">

                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SliderContainer" Storyboard.TargetProperty="(Control.IsTemplateFocusTarget)">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="False" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalThumb" Storyboard.TargetProperty="(Control.IsTemplateFocusTarget)">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="True" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>

                            </VisualStateGroup>

                        </VisualStateManager.VisualStateGroups>

                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>
                        <ContentPresenter
                            x:Name="HeaderContentPresenter"
                            x:DeferLoadStrategy="Lazy"
                            Grid.Row="0"
                            Margin="{ThemeResource SliderTopHeaderMargin}"
                            Content="{TemplateBinding Header}"
                            ContentTemplate="{TemplateBinding HeaderTemplate}"
                            FontWeight="{ThemeResource SliderHeaderThemeFontWeight}"
                            Foreground="{ThemeResource SliderHeaderForeground}"
                            TextWrapping="Wrap"
                            Visibility="Collapsed" />
                        <Grid
                            x:Name="SliderContainer"
                            Grid.Row="1"
                            Background="{ThemeResource SliderContainerBackground}"
                            Control.IsTemplateFocusTarget="True">
                            <Grid x:Name="HorizontalTemplate" MinHeight="{ThemeResource SliderHorizontalHeight}">

                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>

                                <Grid.RowDefinitions>
                                    <RowDefinition Height="{ThemeResource SliderPreContentMargin}" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="{ThemeResource SliderPostContentMargin}" />
                                </Grid.RowDefinitions>
                                <Rectangle
                                    x:Name="HorizontalTrackRect"
                                    Grid.Row="1"
                                    Grid.ColumnSpan="3"
                                    Height="{ThemeResource SliderTrackThemeHeight}"
                                    Fill="{TemplateBinding Background}" />
                                <Rectangle
                                    x:Name="HorizontalDecreaseRect"
                                    Grid.Row="1"
                                    Fill="{TemplateBinding Foreground}" />
                                <Thumb
                                    x:Name="HorizontalThumb"
                                    Grid.Row="0"
                                    Grid.RowSpan="3"
                                    Grid.Column="1"
                                    Width="8"
                                    Height="18"
                                    AutomationProperties.AccessibilityView="Raw"
                                    DataContext="{TemplateBinding Value}"
                                    FocusVisualMargin="-14,-6,-14,-6"
                                    Style="{StaticResource SliderThumbStyle}" />
                            </Grid>
                            <Grid
                                x:Name="VerticalTemplate"
                                MinWidth="{ThemeResource SliderVerticalWidth}"
                                Visibility="Collapsed">

                                <Grid.RowDefinitions>
                                    <RowDefinition Height="*" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>

                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="{ThemeResource SliderPreContentMargin}" />
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="{ThemeResource SliderPostContentMargin}" />
                                </Grid.ColumnDefinitions>
                                <Rectangle
                                    x:Name="VerticalTrackRect"
                                    Grid.RowSpan="3"
                                    Grid.Column="1"
                                    Width="{ThemeResource SliderTrackThemeHeight}"
                                    Fill="{TemplateBinding Background}" />
                                <Rectangle
                                    x:Name="VerticalDecreaseRect"
                                    Grid.Row="2"
                                    Grid.Column="1"
                                    Fill="{TemplateBinding Foreground}" />
                                <TickBar
                                    x:Name="LeftTickBar"
                                    Grid.RowSpan="3"
                                    Width="{ThemeResource SliderOutsideTickBarThemeHeight}"
                                    Margin="0,0,4,0"
                                    HorizontalAlignment="Right"
                                    Fill="{ThemeResource SliderTickBarFill}"
                                    Visibility="Collapsed" />
                                <TickBar
                                    x:Name="VerticalInlineTickBar"
                                    Grid.RowSpan="3"
                                    Grid.Column="1"
                                    Width="{ThemeResource SliderTrackThemeHeight}"
                                    Fill="{ThemeResource SliderInlineTickBarFill}"
                                    Visibility="Collapsed" />
                                <TickBar
                                    x:Name="RightTickBar"
                                    Grid.RowSpan="3"
                                    Grid.Column="2"
                                    Width="{ThemeResource SliderOutsideTickBarThemeHeight}"
                                    Margin="4,0,0,0"
                                    HorizontalAlignment="Left"
                                    Fill="{ThemeResource SliderTickBarFill}"
                                    Visibility="Collapsed" />
                                <Thumb
                                    x:Name="VerticalThumb"
                                    Grid.Row="1"
                                    Grid.Column="0"
                                    Grid.ColumnSpan="3"
                                    Width="24"
                                    Height="8"
                                    AutomationProperties.AccessibilityView="Raw"
                                    DataContext="{TemplateBinding Value}"
                                    FocusVisualMargin="-6,-14,-6,-14"
                                    Style="{StaticResource SliderThumbStyle}" />
                            </Grid>

                        </Grid>

                    </Grid>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style BasedOn="{StaticResource DefaultThemeSliderStyle}" TargetType="Slider" />




    <!--  CHECKBOX  -->

    <Style x:Key="DefaultThemeCheckBoxStyle" TargetType="CheckBox">
        <Setter Property="Background" Value="{ThemeResource CheckBoxBackgroundUnchecked}" />
        <Setter Property="Foreground" Value="{ThemeResource TextFillColorSecondaryBrush}" />
        <Setter Property="BorderBrush" Value="{ThemeResource CheckBoxBorderBrushUnchecked}" />
        <Setter Property="FontWeight" Value="SemiBold" />
        <Setter Property="Padding" Value="8,0,0,0" />
        <Setter Property="HorizontalAlignment" Value="Left" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
        <Setter Property="FontSize" Value="12" />
        <Setter Property="MinWidth" Value="120" />
        <Setter Property="MinHeight" Value="32" />
        <Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}" />
        <Setter Property="FocusVisualMargin" Value="-7,-3,-7,-3" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="CheckBox">
                    <Grid
                        x:Name="RootGrid"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="0">

                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CombinedStates">
                                <VisualState x:Name="UncheckedNormal" />
                                <VisualState x:Name="UncheckedPointerOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ControlPointerOverForegroundBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalRectangle" Storyboard.TargetProperty="Stroke">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Black" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckGlyph" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Black" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="UncheckedPressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ControlPointerOverForegroundBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalRectangle" Storyboard.TargetProperty="Stroke">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Black" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckGlyph" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Black" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="UncheckedDisabled">
                                    <VisualState.Setters>
                                        <Setter Target="RootGrid.Opacity" Value="0.4" />
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="CheckedNormal">

                                    <Storyboard>
                                        <DoubleAnimation
                                            Storyboard.TargetName="CheckGlyph"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="CheckedPointerOver">

                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ControlPointerOverForegroundBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalRectangle" Storyboard.TargetProperty="Stroke">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Black" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckGlyph" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Black" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation
                                            Storyboard.TargetName="CheckGlyph"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="CheckedPressed">

                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ControlPointerOverForegroundBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalRectangle" Storyboard.TargetProperty="Stroke">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Black" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckGlyph" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Black" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation
                                            Storyboard.TargetName="CheckGlyph"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="CheckedDisabled">

                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource CheckBoxForegroundCheckedDisabled}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource CheckBoxBackgroundCheckedDisabled}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource CheckBoxBorderBrushCheckedDisabled}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalRectangle" Storyboard.TargetProperty="Stroke">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource CheckBoxCheckBackgroundStrokeCheckedDisabled}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalRectangle" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource CheckBoxCheckBackgroundFillCheckedDisabled}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckGlyph" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource CheckBoxCheckGlyphForegroundCheckedDisabled}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation
                                            Storyboard.TargetName="CheckGlyph"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="IndeterminateNormal">

                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource CheckBoxForegroundIndeterminate}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource CheckBoxBackgroundIndeterminate}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource CheckBoxBorderBrushIndeterminate}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalRectangle" Storyboard.TargetProperty="Stroke">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource CheckBoxCheckBackgroundStrokeIndeterminate}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalRectangle" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource CheckBoxCheckBackgroundFillIndeterminate}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckGlyph" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource CheckBoxCheckGlyphForegroundIndeterminate}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckGlyph" Storyboard.TargetProperty="Glyph">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="&#xE73C;" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation
                                            Storyboard.TargetName="CheckGlyph"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="IndeterminatePointerOver">

                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource CheckBoxForegroundIndeterminatePointerOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource CheckBoxBackgroundIndeterminatePointerOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource CheckBoxBorderBrushIndeterminatePointerOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalRectangle" Storyboard.TargetProperty="Stroke">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource CheckBoxCheckBackgroundStrokeIndeterminatePointerOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalRectangle" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource CheckBoxCheckBackgroundFillIndeterminatePointerOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckGlyph" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource CheckBoxCheckGlyphForegroundIndeterminatePointerOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckGlyph" Storyboard.TargetProperty="Glyph">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="&#xE73C;" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation
                                            Storyboard.TargetName="CheckGlyph"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="IndeterminatePressed">

                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource CheckBoxForegroundIndeterminatePressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource CheckBoxBackgroundIndeterminatePressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource CheckBoxBorderBrushIndeterminatePressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalRectangle" Storyboard.TargetProperty="Stroke">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource CheckBoxCheckBackgroundStrokeIndeterminatePressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalRectangle" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource CheckBoxCheckBackgroundFillIndeterminatePressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckGlyph" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource CheckBoxCheckGlyphForegroundIndeterminatePressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckGlyph" Storyboard.TargetProperty="Glyph">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="&#xE73C;" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation
                                            Storyboard.TargetName="CheckGlyph"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="IndeterminateDisabled">

                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource CheckBoxForegroundIndeterminateDisabled}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource CheckBoxBackgroundIndeterminateDisabled}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource CheckBoxBorderBrushIndeterminateDisabled}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalRectangle" Storyboard.TargetProperty="Stroke">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource CheckBoxCheckBackgroundStrokeIndeterminateDisabled}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalRectangle" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource CheckBoxCheckBackgroundFillIndeterminateDisabled}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckGlyph" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource CheckBoxCheckGlyphForegroundIndeterminateDisabled}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckGlyph" Storyboard.TargetProperty="Glyph">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="&#xE73C;" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation
                                            Storyboard.TargetName="CheckGlyph"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0" />
                                    </Storyboard>
                                </VisualState>

                            </VisualStateGroup>

                        </VisualStateManager.VisualStateGroups>

                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="16" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>

                        <Grid Height="32" VerticalAlignment="Top">
                            <Rectangle
                                x:Name="NormalRectangle"
                                Width="16"
                                Height="16"
                                Fill="{ThemeResource CheckBoxBackgroundBrush}"
                                Stroke="{ThemeResource CheckBoxBorderBrush}"
                                StrokeThickness="1"
                                UseLayoutRounding="False" />

                            <PathIcon
                                x:Name="CheckGlyph"
                                Margin="-1 -5 0 0"
                                VerticalAlignment="Center"
                                helpers:CompositionFactory.OpacityDuration="{StaticResource BrushDuration}"
                                Data="F1 M 13.75 7.509766 C 13.75 7.672527 13.723958 7.828777 13.671875 7.978516 C 13.619791 8.128256 13.53841 8.264975 13.427734 8.388672 L 8.964844 13.378906 C 8.860677 13.489584 8.740234 13.579102 8.603516 13.647461 C 8.466797 13.71582 8.320312 13.75 8.164062 13.75 C 8.014322 13.75 7.867838 13.714193 7.724609 13.642578 C 7.58138 13.570964 7.460938 13.479818 7.363281 13.369141 L 5.332031 11.113281 C 5.221354 10.989584 5.138346 10.849609 5.083008 10.693359 C 5.027669 10.537109 5 10.377604 5 10.214844 C 5 10.058594 5.027669 9.9056 5.083008 9.755859 C 5.138346 9.60612 5.216471 9.471029 5.317383 9.350586 C 5.418294 9.230144 5.537109 9.134115 5.673828 9.0625 C 5.810547 8.990886 5.963542 8.955078 6.132812 8.955078 C 6.302083 8.955078 6.450195 8.987631 6.577148 9.052734 C 6.704101 9.117839 6.822916 9.21224 6.933594 9.335938 L 8.164062 10.703125 L 11.826172 6.611328 C 11.923828 6.500651 12.044271 6.412761 12.1875 6.347656 C 12.330729 6.282553 12.477213 6.25 12.626953 6.25 C 12.796224 6.25 12.949219 6.285808 13.085938 6.357422 C 13.222656 6.429037 13.339844 6.525066 13.4375 6.645508 C 13.535156 6.765951 13.611653 6.901042 13.666992 7.050781 C 13.72233 7.200521 13.75 7.353516 13.75 7.509766 Z "
                                Foreground="#666666"
                                Opacity="0" />

                            <!--<FontIcon

                                FontFamily="{ThemeResource SymbolThemeFontFamily}"
                                FontSize="12"
                                FontWeight="Black"

                                Glyph="&#xE73E;"
                                 />-->
                        </Grid>
                        <ContentPresenter
                            x:Name="ContentPresenter"
                            Grid.Column="1"
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            AutomationProperties.AccessibilityView="Raw"
                            Content="{TemplateBinding Content}"
                            ContentTemplate="{TemplateBinding ContentTemplate}"
                            ContentTransitions="{TemplateBinding ContentTransitions}"
                            TextLineBounds="Tight"
                            TextWrapping="Wrap" />

                    </Grid>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style BasedOn="{StaticResource DefaultThemeCheckBoxStyle}" TargetType="CheckBox" />



    <!--  NUMBERBOX  -->





    <!--  TOGGLE SWITCH  -->
    <Style TargetType="ToggleSwitch">
        <Setter Property="HorizontalAlignment" Value="Left" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
        <Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
        <Setter Property="Foreground" Value="{ThemeResource DefaultControlForegroundBrush}" />
        <Setter Property="FontWeight" Value="SemiBold" />
        <Setter Property="ManipulationMode" Value="System,TranslateX" />
        <Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}" />
        <Setter Property="FocusVisualMargin" Value="-7,-3,-7,-3" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ToggleSwitch">
                    <Grid
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{TemplateBinding CornerRadius}">

                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />

                                <VisualState x:Name="PointerOver">
                                    <VisualState.Setters>
                                        <Setter Target="SwitchKnobOn.Fill" Value="Black" />
                                        <Setter Target="SwitchKnobOff.Fill" Value="Black" />
                                        <!--<Setter Target="OuterBorder.Background" Value="White" />-->
                                        <Setter Target="OuterBorder.BorderBrush" Value="Black" />
                                        <!--<Setter Target="SwitchKnobBounds.Stroke" Value="Black" />-->
                                        <Setter Target="OnContentPresenter.Foreground" Value="{ThemeResource ControlContentPointerOverForeground}" />
                                        <Setter Target="OffContentPresenter.Foreground" Value="{ThemeResource ControlContentPointerOverForeground}" />
                                    </VisualState.Setters>
                                </VisualState>

                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobBounds" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleSwitchFillOnPressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobBounds" Storyboard.TargetProperty="Stroke">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleSwitchStrokeOnPressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobOff" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Black" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobOn" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Black" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SwitchAreaGrid" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleSwitchContainerBackgroundPressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>

                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderContentPresenter" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleSwitchHeaderForegroundDisabled}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OffContentPresenter" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleSwitchContentForegroundDisabled}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OnContentPresenter" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleSwitchContentForegroundDisabled}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobBounds" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleSwitchFillOnDisabled}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobBounds" Storyboard.TargetProperty="Stroke">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleSwitchStrokeOnDisabled}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobOff" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleSwitchKnobFillOffDisabled}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobOn" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleSwitchKnobFillOnDisabled}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SwitchAreaGrid" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleSwitchContainerBackgroundDisabled}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>

                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ToggleStates">

                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        x:Name="DraggingToOnTransition"
                                        GeneratedDuration="0"
                                        From="Dragging"
                                        To="On">

                                        <Storyboard>
                                            <RepositionThemeAnimation FromHorizontalOffset="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.KnobCurrentToOnOffset}" TargetName="SwitchKnob" />
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobBounds" Storyboard.TargetProperty="Opacity">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="1" />
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobOn" Storyboard.TargetProperty="Opacity">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="1" />
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobOff" Storyboard.TargetProperty="Opacity">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="0" />
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualTransition>
                                    <VisualTransition
                                        x:Name="DraggingToOffTransition"
                                        GeneratedDuration="0"
                                        From="Dragging"
                                        To="Off">

                                        <Storyboard>
                                            <RepositionThemeAnimation FromHorizontalOffset="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.KnobCurrentToOffOffset}" TargetName="SwitchKnob" />
                                        </Storyboard>
                                    </VisualTransition>
                                    <VisualTransition
                                        x:Name="OnToOffTransition"
                                        GeneratedDuration="0"
                                        From="On"
                                        To="Off">

                                        <Storyboard>
                                            <RepositionThemeAnimation FromHorizontalOffset="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.KnobOnToOffOffset}" TargetName="SwitchKnob" />
                                        </Storyboard>
                                    </VisualTransition>
                                    <VisualTransition
                                        x:Name="OffToOnTransition"
                                        GeneratedDuration="0"
                                        From="Off"
                                        To="On">

                                        <Storyboard>
                                            <RepositionThemeAnimation FromHorizontalOffset="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.KnobOffToOnOffset}" TargetName="SwitchKnob" />
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobBounds" Storyboard.TargetProperty="Opacity">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="1" />
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobOn" Storyboard.TargetProperty="Opacity">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="1" />
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobOff" Storyboard.TargetProperty="Opacity">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="0" />
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualTransition>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Dragging" />
                                <VisualState x:Name="Off" />
                                <VisualState x:Name="On">

                                    <Storyboard>
                                        <DoubleAnimation
                                            Storyboard.TargetName="KnobTranslateTransform"
                                            Storyboard.TargetProperty="X"
                                            To="24"
                                            Duration="0" />
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobBounds" Storyboard.TargetProperty="Opacity">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="1" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobOn" Storyboard.TargetProperty="Opacity">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="1" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobOff" Storyboard.TargetProperty="Opacity">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="0" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>

                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ContentStates">
                                <VisualState x:Name="OffContent">

                                    <Storyboard>
                                        <DoubleAnimation
                                            Storyboard.TargetName="OffContentPresenter"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0" />
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OffContentPresenter" Storyboard.TargetProperty="IsHitTestVisible">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <x:Boolean>True</x:Boolean>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="OnContent">

                                    <Storyboard>
                                        <DoubleAnimation
                                            Storyboard.TargetName="OnContentPresenter"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0" />
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OnContentPresenter" Storyboard.TargetProperty="IsHitTestVisible">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <x:Boolean>True</x:Boolean>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>

                            </VisualStateGroup>

                        </VisualStateManager.VisualStateGroups>

                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>
                        <ContentPresenter
                            x:Name="HeaderContentPresenter"
                            x:DeferLoadStrategy="Lazy"
                            Grid.Row="0"
                            Margin="{ThemeResource ToggleSwitchTopHeaderMargin}"
                            VerticalAlignment="Top"
                            AutomationProperties.AccessibilityView="Raw"
                            Content="{TemplateBinding Header}"
                            ContentTemplate="{TemplateBinding HeaderTemplate}"
                            Foreground="{ThemeResource ToggleSwitchHeaderForeground}"
                            IsHitTestVisible="False"
                            TextWrapping="Wrap"
                            Visibility="Collapsed" />
                        <Grid
                            Grid.Row="1"
                            MinWidth="0"
                            HorizontalAlignment="Left"
                            VerticalAlignment="Top">

                            <Grid.RowDefinitions>
                                <RowDefinition Height="{ThemeResource ToggleSwitchPreContentMargin}" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="{ThemeResource ToggleSwitchPostContentMargin}" />
                            </Grid.RowDefinitions>

                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="12" MaxWidth="12" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Grid
                                x:Name="SwitchAreaGrid"
                                Grid.RowSpan="3"
                                Grid.ColumnSpan="3"
                                Margin="0,5"
                                Background="{ThemeResource ToggleSwitchContainerBackground}"
                                Control.IsTemplateFocusTarget="True" />
                            <ContentPresenter
                                x:Name="OffContentPresenter"
                                Grid.RowSpan="3"
                                Grid.Column="2"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                AutomationProperties.AccessibilityView="Raw"
                                Content="{TemplateBinding OffContent}"
                                ContentTemplate="{TemplateBinding OffContentTemplate}"
                                Foreground="{TemplateBinding Foreground}"
                                IsHitTestVisible="False"
                                Opacity="0" />
                            <ContentPresenter
                                x:Name="OnContentPresenter"
                                Grid.RowSpan="3"
                                Grid.Column="2"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                AutomationProperties.AccessibilityView="Raw"
                                Content="{TemplateBinding OnContent}"
                                ContentTemplate="{TemplateBinding OnContentTemplate}"
                                Foreground="{TemplateBinding Foreground}"
                                IsHitTestVisible="False"
                                Opacity="0" />
                            <Border
                                x:Name="OuterBorder"
                                Grid.Row="1"
                                Width="44"
                                Height="20"
                                Background="{ThemeResource ComboBoxBackground}"
                                BorderBrush="{ThemeResource ComboBoxBorderBrush}"
                                BorderThickness="1"
                                CornerRadius="4" />
                            <Rectangle
                                x:Name="SwitchKnobBounds"
                                Grid.Row="1"
                                Width="44"
                                Height="20"
                                Fill="Transparent"
                                Opacity="0"
                                RadiusX="4"
                                RadiusY="4"
                                Stroke="Transparent"
                                StrokeThickness="1" />
                            <Grid
                                x:Name="SwitchKnob"
                                Grid.Row="1"
                                Width="20"
                                Height="20"
                                HorizontalAlignment="Left">
                                <Rectangle
                                    x:Name="SwitchKnobOn"
                                    Width="10"
                                    Height="10"
                                    Fill="{ThemeResource ControlGlyphBrush}"
                                    Opacity="0"
                                    RadiusX="2"
                                    RadiusY="2" />
                                <Rectangle
                                    x:Name="SwitchKnobOff"
                                    Width="10"
                                    Height="10"
                                    Fill="{ThemeResource ControlGlyphBrush}"
                                    RadiusX="2"
                                    RadiusY="2" />
                                <Grid.RenderTransform>
                                    <TranslateTransform x:Name="KnobTranslateTransform" />
                                </Grid.RenderTransform>
                            </Grid>
                            <Thumb
                                x:Name="SwitchThumb"
                                Grid.RowSpan="3"
                                Grid.ColumnSpan="3"
                                AutomationProperties.AccessibilityView="Raw">
                                <Thumb.Template>
                                    <ControlTemplate TargetType="Thumb">
                                        <Rectangle Fill="Transparent" />
                                    </ControlTemplate>
                                </Thumb.Template>
                            </Thumb>
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>




    <!--  CONTENTGROUP  -->

    <Style TargetType="controls:ContentGroup">
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Margin" Value="0 12 0 12" />
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <StackPanel />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:ContentGroup">
                    <StackPanel>
                        <TextBlock
                            FontFamily="{ThemeResource ContentControlThemeFontFamily}"
                            FontSize="20"
                            FontWeight="SemiBold"
                            Foreground="{ThemeResource DefaultControlForegroundBrush}"
                            OpticalMarginAlignment="TrimSideBearings"
                            Text="{TemplateBinding Text}" />
                        <ItemsPresenter />
                    </StackPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="CompareCardStyle" TargetType="controls:ContentGroup">
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="FontFamily" Value="{StaticResource ContentControlThemeFontFamily}" />
        <Setter Property="VerticalAlignment" Value="Stretch" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Margin" Value="0 8 0 4" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:ContentGroup">
                    <Grid>
                        <ContentPresenter
                            Margin="0 0 0 4"
                            Content="{TemplateBinding Text}"
                            FontWeight="Normal" />

                        <ContentPresenter
                            Margin="0 24 0 0"
                            Padding="{TemplateBinding Padding}"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Content="{TemplateBinding SecondaryContent}"
                            CornerRadius="{TemplateBinding CornerRadius}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>




    <!--  CONTENT DIALOG  -->

    <StaticResource x:Key="ContentDialogBackground" ResourceKey="CardBackgroundBrush" />

    <Style x:Key="DefaultThemeContentDialogStyle" TargetType="ContentDialog">
        <Setter Property="Foreground" Value="{ThemeResource ContentDialogForeground}" />
        <Setter Property="Background" Value="{ThemeResource CardBackgroundBrush}" />
        <Setter Property="BorderBrush" Value="{ThemeResource ComboBoxBorderBrush}" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="PrimaryButtonStyle" Value="{ThemeResource DefaultThemeButtonStyle}" />
        <Setter Property="SecondaryButtonStyle" Value="{ThemeResource DefaultThemeButtonStyle}" />
        <Setter Property="CloseButtonStyle" Value="{ThemeResource DefaultThemeButtonStyle}" />
        <Setter Property="CornerRadius" Value="0" />
        <Setter Property="RequestedTheme" Value="Light" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ContentDialog">
                    <Border x:Name="Container">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="DialogShowingStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition To="DialogHidden">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Visibility">
                                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Visible" />
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="IsHitTestVisible">
                                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="False" />
                                            </ObjectAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ScaleTransform" Storyboard.TargetProperty="ScaleX">
                                                <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="1.0" />
                                                <SplineDoubleKeyFrame KeySpline="0.1,0.9 0.2,1.0" KeyTime="0:0:1.5" Value="1.3" />
                                            </DoubleAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ScaleTransform" Storyboard.TargetProperty="ScaleY">
                                                <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="1.0" />
                                                <SplineDoubleKeyFrame KeySpline="0.1,0.9 0.2,1.0" KeyTime="0:0:1.5" Value="1.3" />
                                            </DoubleAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Opacity">
                                                <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="1.0" />
                                                <LinearDoubleKeyFrame KeyTime="0:0:1.4" Value="0.0" />
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualTransition>
                                    <VisualTransition To="DialogShowing">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Visibility">
                                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Visible" />
                                            </ObjectAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ScaleTransform" Storyboard.TargetProperty="ScaleX">
                                                <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="1.4" />
                                                <SplineDoubleKeyFrame KeySpline="0.1,0.9 0.2,1.0" KeyTime="0:0:0.5" Value="1.0" />
                                            </DoubleAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ScaleTransform" Storyboard.TargetProperty="ScaleY">
                                                <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="1.4" />
                                                <SplineDoubleKeyFrame KeySpline="0.1,0.9 0.2,1.0" KeyTime="0:0:0.5" Value="1.0" />
                                            </DoubleAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Opacity">
                                                <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="0.0" />
                                                <LinearDoubleKeyFrame KeyTime="0:0:0.167" Value="1.0" />
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualTransition>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="DialogHidden" />
                                <VisualState x:Name="DialogShowing">
                                    <VisualState.Setters>
                                        <Setter Target="LayoutRoot.Visibility" Value="Visible" />
                                        <Setter Target="BackgroundElement.TabFocusNavigation" Value="Cycle" />
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="DialogShowingWithoutSmokeLayer">
                                    <VisualState.Setters>
                                        <Setter Target="LayoutRoot.Visibility" Value="Visible" />
                                        <Setter Target="LayoutRoot.Background" Value="{x:Null}" />
                                    </VisualState.Setters>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="DialogSizingStates">
                                <VisualState x:Name="DefaultDialogSizing" />
                                <VisualState x:Name="FullDialogSizing">
                                    <VisualState.Setters>
                                        <Setter Target="BackgroundElement.VerticalAlignment" Value="Stretch" />
                                    </VisualState.Setters>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ButtonsVisibilityStates">
                                <VisualState x:Name="AllVisible" />
                                <VisualState x:Name="NoneVisible">
                                    <VisualState.Setters>
                                        <Setter Target="CommandSpace.Visibility" Value="Collapsed" />
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="PrimaryVisible">
                                    <VisualState.Setters>
                                        <Setter Target="PrimaryButton.(Grid.Column)" Value="2" />
                                        <Setter Target="PrimaryButton.(Grid.ColumnSpan)" Value="2" />
                                        <Setter Target="PrimaryButton.Margin" Value="2,0,0,0" />
                                        <Setter Target="SecondaryButton.Visibility" Value="Collapsed" />
                                        <Setter Target="CloseButton.Visibility" Value="Collapsed" />
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="SecondaryVisible">
                                    <VisualState.Setters>
                                        <Setter Target="SecondaryButton.(Grid.Column)" Value="2" />
                                        <Setter Target="SecondaryButton.(Grid.ColumnSpan)" Value="2" />
                                        <Setter Target="SecondaryButton.Margin" Value="2,0,0,0" />
                                        <Setter Target="PrimaryButton.Visibility" Value="Collapsed" />
                                        <Setter Target="CloseButton.Visibility" Value="Collapsed" />
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="CloseVisible">
                                    <VisualState.Setters>
                                        <Setter Target="CloseButton.(Grid.Column)" Value="2" />
                                        <Setter Target="CloseButton.(Grid.ColumnSpan)" Value="2" />
                                        <Setter Target="CloseButton.Margin" Value="2,0,0,0" />
                                        <Setter Target="PrimaryButton.Visibility" Value="Collapsed" />
                                        <Setter Target="SecondaryButton.Visibility" Value="Collapsed" />
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="PrimaryAndSecondaryVisible">
                                    <VisualState.Setters>
                                        <Setter Target="PrimaryButton.(Grid.ColumnSpan)" Value="2" />
                                        <Setter Target="SecondaryButton.(Grid.Column)" Value="2" />
                                        <Setter Target="SecondaryButton.(Grid.ColumnSpan)" Value="2" />
                                        <Setter Target="SecondaryButton.Margin" Value="2,0,0,0" />
                                        <Setter Target="CloseButton.Visibility" Value="Collapsed" />
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="PrimaryAndCloseVisible">
                                    <VisualState.Setters>
                                        <Setter Target="PrimaryButton.(Grid.ColumnSpan)" Value="2" />
                                        <Setter Target="CloseButton.(Grid.Column)" Value="2" />
                                        <Setter Target="CloseButton.(Grid.ColumnSpan)" Value="2" />
                                        <Setter Target="CloseButton.Margin" Value="2,0,0,0" />
                                        <Setter Target="SecondaryButton.Visibility" Value="Collapsed" />
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="SecondaryAndCloseVisible">
                                    <VisualState.Setters>
                                        <Setter Target="SecondaryButton.(Grid.Column)" Value="0" />
                                        <Setter Target="SecondaryButton.(Grid.ColumnSpan)" Value="2" />
                                        <Setter Target="SecondaryButton.Margin" Value="0,0,2,0" />
                                        <Setter Target="CloseButton.(Grid.Column)" Value="2" />
                                        <Setter Target="CloseButton.(Grid.ColumnSpan)" Value="2" />
                                        <Setter Target="CloseButton.Margin" Value="2,0,0,0" />
                                        <Setter Target="PrimaryButton.Visibility" Value="Collapsed" />
                                    </VisualState.Setters>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="DefaultButtonStates">
                                <VisualState x:Name="NoDefaultButton" />
                                <VisualState x:Name="PrimaryAsDefaultButton">
                                    <VisualState.Setters>
                                        <Setter Target="PrimaryButton.Style" Value="{StaticResource AccentButtonStyle}" />
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="SecondaryAsDefaultButton">
                                    <VisualState.Setters>
                                        <Setter Target="SecondaryButton.Style" Value="{StaticResource AccentButtonStyle}" />
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="CloseAsDefaultButton">
                                    <VisualState.Setters>
                                        <Setter Target="CloseButton.Style" Value="{StaticResource AccentButtonStyle}" />
                                    </VisualState.Setters>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="DialogBorderStates">
                                <VisualState x:Name="NoBorder" />
                                <VisualState x:Name="AccentColorBorder">
                                    <VisualState.Setters>
                                        <Setter Target="BackgroundElement.BorderBrush" Value="{ThemeResource SystemControlForegroundAccentBrush}" />
                                    </VisualState.Setters>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid x:Name="LayoutRoot" Visibility="Collapsed">
                            <Grid.Background>
                                <SolidColorBrush Opacity="0.1" Color="White" />
                            </Grid.Background>

                            <Border
                                x:Name="BackgroundElement"
                                MinWidth="{ThemeResource ContentDialogMinWidth}"
                                MinHeight="{ThemeResource ContentDialogMinHeight}"
                                MaxWidth="1000"
                                MaxHeight="{ThemeResource ContentDialogMaxHeight}"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="0"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                FlowDirection="{TemplateBinding FlowDirection}"
                                RenderTransformOrigin="0.5,0.5">
                                <Border.RenderTransform>
                                    <ScaleTransform x:Name="ScaleTransform" />
                                </Border.RenderTransform>
                                <Grid x:Name="DialogSpace" Padding="{ThemeResource ContentDialogPadding}">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="*" />
                                        <RowDefinition Height="Auto" />
                                    </Grid.RowDefinitions>

                                    <Border
                                        Width="110"
                                        Height="6"
                                        HorizontalAlignment="Left"
                                        VerticalAlignment="Top"
                                        Background="{StaticResource FlairBrush}">
                                        <Border.RenderTransform>
                                            <TranslateTransform Y="-4" />
                                        </Border.RenderTransform>
                                    </Border>

                                    <ScrollViewer
                                        x:Name="ContentScrollViewer"
                                        Margin="{ThemeResource ContentDialogContentScrollViewerMargin}"
                                        HorizontalScrollBarVisibility="Disabled"
                                        IsTabStop="False"
                                        VerticalScrollBarVisibility="Disabled"
                                        ZoomMode="Disabled">
                                        <Grid>
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="Auto" />
                                                <RowDefinition Height="*" />
                                            </Grid.RowDefinitions>

                                            <ContentControl
                                                x:Name="Title"
                                                Margin="0 6 0 12"
                                                HorizontalAlignment="Left"
                                                VerticalAlignment="Top"
                                                Content="{Binding Title, Converter={StaticResource Upper}, RelativeSource={RelativeSource Mode=TemplatedParent}}"
                                                ContentTemplate="{TemplateBinding TitleTemplate}"
                                                FontFamily="Zegoe UI, XamlAutoFontFamily"
                                                FontSize="26"
                                                FontWeight="Normal"
                                                Foreground="{StaticResource DefaultControlForegroundBrush}"
                                                IsTabStop="False">
                                                <ContentControl.Template>
                                                    <ControlTemplate TargetType="ContentControl">
                                                        <ContentPresenter
                                                            Margin="{TemplateBinding Padding}"
                                                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                                            Content="{TemplateBinding Content}"
                                                            ContentTemplate="{TemplateBinding ContentTemplate}"
                                                            ContentTransitions="{TemplateBinding ContentTransitions}"
                                                            MaxLines="2"
                                                            TextWrapping="Wrap" />
                                                    </ControlTemplate>
                                                </ContentControl.Template>
                                            </ContentControl>
                                            <ContentPresenter
                                                x:Name="Content"
                                                Grid.Row="1"
                                                Margin="{ThemeResource ContentDialogContentMargin}"
                                                Content="{TemplateBinding Content}"
                                                ContentTemplate="{TemplateBinding ContentTemplate}"
                                                FontFamily="{ThemeResource ContentControlThemeFontFamily}"
                                                FontSize="{ThemeResource ControlContentThemeFontSize}"
                                                Foreground="{TemplateBinding Foreground}"
                                                TextWrapping="Wrap" />
                                        </Grid>
                                    </ScrollViewer>
                                    <Grid
                                        x:Name="CommandSpace"
                                        Grid.Row="1"
                                        Margin="{ThemeResource ContentDialogCommandSpaceMargin}"
                                        HorizontalAlignment="Stretch"
                                        VerticalAlignment="Bottom"
                                        XYFocusKeyboardNavigation="Enabled">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition />
                                            <ColumnDefinition Width="0.5*" />
                                            <ColumnDefinition Width="0.5*" />
                                            <ColumnDefinition />
                                        </Grid.ColumnDefinitions>
                                        <Button
                                            x:Name="PrimaryButton"
                                            Grid.Column="0"
                                            Margin="0,0,2,0"
                                            HorizontalAlignment="Stretch"
                                            VerticalAlignment="Stretch"
                                            Content="{TemplateBinding PrimaryButtonText}"
                                            ElementSoundMode="FocusOnly"
                                            IsEnabled="{TemplateBinding IsPrimaryButtonEnabled}"
                                            Style="{TemplateBinding PrimaryButtonStyle}" />
                                        <Button
                                            x:Name="SecondaryButton"
                                            Grid.Column="1"
                                            Grid.ColumnSpan="2"
                                            Margin="2,0,2,0"
                                            HorizontalAlignment="Stretch"
                                            VerticalAlignment="Stretch"
                                            Content="{TemplateBinding SecondaryButtonText}"
                                            ElementSoundMode="FocusOnly"
                                            IsEnabled="{TemplateBinding IsSecondaryButtonEnabled}"
                                            Style="{TemplateBinding SecondaryButtonStyle}" />
                                        <Button
                                            x:Name="CloseButton"
                                            Grid.Column="3"
                                            Margin="2,0,0,0"
                                            HorizontalAlignment="Stretch"
                                            VerticalAlignment="Stretch"
                                            Content="{TemplateBinding CloseButtonText}"
                                            ElementSoundMode="FocusOnly"
                                            Style="{TemplateBinding CloseButtonStyle}" />
                                    </Grid>
                                </Grid>
                            </Border>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style BasedOn="{StaticResource DefaultThemeContentDialogStyle}" TargetType="ContentDialog" />


    <Style TargetType="controls:SuggestionBox">
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="CornerRadius" Value="0" />
    </Style>

</ResourceDictionary>
