<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:converters="using:CharacterMap.Converters"
    xmlns:core="using:CharacterMap.Core"
    xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
    xmlns:win1903="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract, 8)">

    <CharacterCasing x:Key="TitleCasing">Normal</CharacterCasing>
    <x:Boolean x:Key="LowercaseTitles">False</x:Boolean>
    <x:Boolean x:Key="SupportsDarkTheme">True</x:Boolean>
    <x:Boolean x:Key="SupportsTabs">False</x:Boolean>
    <x:Double x:Key="FontListFlyoutHeight">40</x:Double>
    <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>

    <FontFamily x:Key="SymbolThemeFontFamily">Segoe MDL2 Assets</FontFamily>

    <AcrylicBrush
        x:Key="DefaultHostBrush"
        win1903:TintLuminosityOpacity="0.8"
        BackgroundSource="HostBackdrop"
        FallbackColor="{ThemeResource SystemChromeMediumColor}"
        TintColor="{ThemeResource SystemAltHighColor}"
        TintOpacity="0.8" />

    <SolidColorBrush x:Key="PaneCollapsedBackgroundBrush" Color="{ThemeResource SystemChromeMediumColor}" />

    <Style x:Key="HeaderStyle" TargetType="TextBlock">
        <Setter Property="OpticalMarginAlignment" Value="TrimSideBearings" />
        <Setter Property="FontWeight" Value="Bold" />
        <Setter Property="Margin" Value="0 20 0 4" />
    </Style>

    <Style x:Key="TitleTextStyle" TargetType="TextBlock">
        <Setter Property="FontFamily" Value="{StaticResource ContentControlThemeFontFamily}" />
        <Setter Property="FontSize" Value="22" />
        <Setter Property="FontWeight" Value="Bold" />
    </Style>

    <Style x:Key="FontFilterTitleStyle" TargetType="TextBlock">
        <Setter Property="FontSize" Value="16" />
        <Setter Property="FontWeight" Value="Bold" />
    </Style>

    <Style x:Key="DescriptionStyle" BasedOn="{StaticResource BaseTextStyle}" TargetType="TextBlock">
        <Setter Property="Opacity" Value="0.7" />
        <Setter Property="FontWeight" Value="Normal" />
        <Setter Property="Margin" Value="0 0 0 8" />
        <Setter Property="LineHeight" Value="16" />
        <Setter Property="TextLineBounds" Value="Tight" />
        <Setter Property="LineStackingStrategy" Value="BlockLineHeight" />
        <Setter Property="OpticalMarginAlignment" Value="TrimSideBearings" />
    </Style>

    <Style x:Key="DescriptionContentStyle" TargetType="ContentPresenter">
        <Setter Property="Opacity" Value="0.7" />
        <Setter Property="FontWeight" Value="Normal" />
        <Setter Property="Margin" Value="0 0 0 8" />
        <Setter Property="OpticalMarginAlignment" Value="TrimSideBearings" />
        <Setter Property="TextWrapping" Value="Wrap" />
    </Style>

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

    <Style x:Key="DevToolsAppBarButtonStyle" BasedOn="{StaticResource DefaultThemeAppBarButtonStyle}" TargetType="controls:UXButton">
        <Setter Property="Height" Value="52" />
        <Setter Property="IsLabelVisible" Value="True" />
        <Setter Property="core:Properties.ClickAnimation" Value="FluentContentPresenter" />
    </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" BasedOn="{StaticResource ButtonRevealStyle}" TargetType="Button" />

    <CornerRadius x:Key="PopupCornerRadius">4</CornerRadius>
    <x:Double x:Key="FontListFontSize">14</x:Double>

    <Style x:Key="SettingsMenuStyle" TargetType="StackPanel" />

    <converters:PassthroughConverter x:Key="TitleConverter" />

    <StaticResource x:Key="FontSelectorTitleConverter" ResourceKey="TitleConverter" />

    <FontFamily x:Key="LightFontFamily">XamlAutoFontFamily</FontFamily>

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

    <Style x:Key="FontListGridViewItemStyle" BasedOn="{StaticResource GridViewItemRevealStyle}" TargetType="GridViewItem">
        <Setter Property="core:Properties.PointerOverAnimation" Value="Root" />
    </Style>



    <Style x:Key="DefaultThemeGridViewItemStyle" TargetType="GridViewItem">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderThickness" Value="2" />
        <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">
                    <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">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal">
                                    <Storyboard>
                                        <PointerUpThemeAnimation Storyboard.TargetName="ContentPresenter" />
                                    </Storyboard>
                                </VisualState>

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

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

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

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

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

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

    <DataTemplate x:Key="DefaultControlHeaderTemplate">
        <ContentPresenter Margin="0 12 0 0" Content="{Binding}" />
    </DataTemplate>

    <Style x:Key="QuickCompareContainerStyle" BasedOn="{StaticResource ChromelessButtonStyle}" TargetType="Button" />

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

    <Style x:Key="DefaultThemeCheckBoxStyle" BasedOn="{StaticResource DefaultCheckBoxStyle}" TargetType="CheckBox" />

    <DataTemplate x:Key="FontListGroupHeaderTemplate">
        <GridViewItem
            x:Name="Root"
            Margin="0"
            Padding="0"
            HorizontalAlignment="Stretch"
            HorizontalContentAlignment="Stretch"
            BorderBrush="{ThemeResource ButtonRevealBorderBrush}"
            BorderThickness="1"
            IsHitTestVisible="True"
            Style="{StaticResource GridViewItemRevealStyle}">
            <Grid>
                <Border
                    Margin="15,0"
                    BorderBrush="{ThemeResource ApplicationForegroundThemeBrush}"
                    BorderThickness="0,0,0,1"
                    Opacity="0.2" />
                <TextBlock
                    Padding="15,8,15,10"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    FontSize="30"
                    FontWeight="SemiBold"
                    Text="{Binding Key}" />
            </Grid>
        </GridViewItem>
    </DataTemplate>

    <Style x:Name="ThemeFlyoutStyle" TargetType="FlyoutPresenter">
        <Setter Property="RenderTransformOrigin" Value="0.5 0" />
        <Setter Property="AllowFocusOnInteraction" Value="False" />
        <Setter Property="Margin" Value="12 0 0 0" />
        <Setter Property="Padding" Value="0 0" />
        <Setter Property="BorderBrush" Value="{ThemeResource MenuFlyoutPresenterBorderBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="ScrollViewer.HorizontalScrollMode" Value="Disabled" />
        <Setter Property="ScrollViewer.VerticalScrollMode" Value="Disabled" />
        <Setter Property="CornerRadius" Value="4" />
        <Setter Property="IsDefaultShadowEnabled" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="FlyoutPresenter">
                    <ContentPresenter
                        Padding="{TemplateBinding Padding}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Content="{TemplateBinding Content}"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        ContentTransitions="{TemplateBinding ContentTransitions}"
                        CornerRadius="{TemplateBinding CornerRadius}" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="ContentDialog">
        <Setter Property="Foreground" Value="{ThemeResource ContentDialogForeground}" />
        <Setter Property="Background" Value="{ThemeResource ContentDialogBackground}" />
        <Setter Property="BorderBrush" Value="{ThemeResource ContentDialogBorderBrush}" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="PrimaryButtonStyle" Value="{ThemeResource ButtonRevealStyle}" />
        <Setter Property="SecondaryButtonStyle" Value="{ThemeResource ButtonRevealStyle}" />
        <Setter Property="CloseButtonStyle" Value="{ThemeResource ButtonRevealStyle}" />
        <Setter Property="CornerRadius" Value="4" />
        <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"
                            Background="{ThemeResource SystemControlPageBackgroundMediumAltMediumBrush}"
                            Visibility="Collapsed">

                            <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="{ThemeResource ContentDialogBorderWidth}"
                                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>
                                    <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="{ThemeResource ContentDialogTitleMargin}"
                                                HorizontalAlignment="Left"
                                                VerticalAlignment="Top"
                                                Content="{TemplateBinding Title}"
                                                ContentTemplate="{TemplateBinding TitleTemplate}"
                                                FontFamily="XamlAutoFontFamily"
                                                FontSize="20"
                                                FontWeight="Normal"
                                                Foreground="{TemplateBinding Foreground}"
                                                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 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"
                            Foreground="{ThemeResource TextControlPlaceholderForeground}" />

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

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

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

            <StackPanel x:Name="LabelRoot" Grid.Column="1">
                <TextBlock>
                    <Run FontWeight="SemiBold" Text="{Binding Title}" />
                    <Run
                        FontSize="12"
                        FontWeight="Normal"
                        Foreground="{ThemeResource ButtonDisabledForegroundThemeBrush}"
                        Text="{Binding Shortcut}" />
                </TextBlock>
                <TextBlock
                    FontSize="12.666"
                    FontWeight="Normal"
                    Foreground="{ThemeResource TextFillColorSecondaryBrush}"
                    Text="{Binding Description}"
                    TextWrapping="Wrap" />
            </StackPanel>
        </Grid>
    </DataTemplate>

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


    <Style x:Name="NumberBoxSpinButtonStyle" TargetType="RepeatButton">
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="MinWidth" Value="34" />
        <Setter Property="VerticalAlignment" Value="Stretch" />
        <Setter Property="Background" Value="{ThemeResource TextControlBackground}" />
        <Setter Property="BorderBrush" Value="{ThemeResource TextControlBorderBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="FontFamily" Value="{ThemeResource SymbolThemeFontFamily}" />
    </Style>

    <ControlTemplate x:Key="HorizontalNumberBoxTemplate" TargetType="muxc:NumberBox">
        <Grid>
            <Grid.Resources>
                <ResourceDictionary>
                    <ResourceDictionary.ThemeDictionaries>
                        <ResourceDictionary x:Key="Light">
                            <StaticResource x:Key="RepeatButtonBorderBrushPointerOver" ResourceKey="TextControlBorderBrush" />
                            <StaticResource x:Key="RepeatButtonBorderBrushPressed" ResourceKey="TextControlBorderBrush" />
                        </ResourceDictionary>
                        <ResourceDictionary x:Key="Dark">
                            <StaticResource x:Key="RepeatButtonBorderBrushPointerOver" ResourceKey="TextControlBorderBrush" />
                            <StaticResource x:Key="RepeatButtonBorderBrushPressed" ResourceKey="TextControlBorderBrush" />
                        </ResourceDictionary>
                        <ResourceDictionary x:Key="HighContrast">
                            <StaticResource x:Key="RepeatButtonBorderBrushPointerOver" ResourceKey="SystemControlHighlightBaseMediumLowBrush" />
                            <StaticResource x:Key="RepeatButtonBorderBrushPressed" ResourceKey="SystemControlHighlightTransparentBrush" />
                        </ResourceDictionary>
                    </ResourceDictionary.ThemeDictionaries>
                </ResourceDictionary>
            </Grid.Resources>
            <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"
                Grid.Row="1"
                BorderThickness="1 1 0 1"
                Content="&#xE76B;"
                CornerRadius="{Binding Source={ThemeResource ControlCornerRadius}, Converter={StaticResource LeftCornerRadiusFilterConverter}}"
                FontSize="{TemplateBinding FontSize}"
                Style="{StaticResource NumberBoxSpinButtonStyle}" />

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

            <RepeatButton
                x:Name="UpSpinButton"
                Grid.Row="1"
                Grid.Column="2"
                Content="&#xE76C;"
                CornerRadius="{Binding Source={ThemeResource ControlCornerRadius}, Converter={StaticResource RightCornerRadiusFilterConverter}}"
                FontSize="{TemplateBinding FontSize}"
                Style="{StaticResource NumberBoxSpinButtonStyle}" />
        </Grid>
    </ControlTemplate>


</ResourceDictionary>
