<Application
    x:Class="Microsoft.PowerToys.Settings.UI.App"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls"
    xmlns:converters="using:Microsoft.PowerToys.Settings.UI.Converters"
    xmlns:ptcontrols="using:Microsoft.PowerToys.Common.UI.Controls"
    xmlns:tkcontrols="using:CommunityToolkit.WinUI.Controls"
    xmlns:tkconverters="using:CommunityToolkit.WinUI.Converters">
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
                <ResourceDictionary Source="ms-appx:///PowerToys.Common.UI.Controls/Controls/KeyVisual/KeyVisual.xaml" />
                <ResourceDictionary Source="ms-appx:///PowerToys.Common.UI.Controls/Controls/KeyVisual/KeyCharPresenter.xaml" />
                <ResourceDictionary Source="ms-appx:///PowerToys.Common.UI.Controls/Controls/IsEnabledTextBlock/IsEnabledTextBlock.xaml" />
                <ResourceDictionary Source="/SettingsXAML/Controls/TitleBar/TitleBar.xaml" />
                <ResourceDictionary Source="/SettingsXAML/Styles/TextBlock.xaml" />
                <ResourceDictionary Source="/SettingsXAML/Styles/Button.xaml" />
                <ResourceDictionary Source="/SettingsXAML/Styles/InfoBadge.xaml" />
                <ResourceDictionary Source="/SettingsXAML/Themes/Colors.xaml" />
                <ResourceDictionary Source="/SettingsXAML/Themes/Generic.xaml" />
                <ResourceDictionary Source="/SettingsXAML/Controls/Timeline/TimelineStyles.xaml" />
                <ResourceDictionary Source="ms-appx:///PowerToys.Common.UI.Controls/Controls/ShortcutWithTextLabelControl/ShortcutWithTextLabelControl.xaml" />
                <!--  Other merged dictionaries here  -->
            </ResourceDictionary.MergedDictionaries>

            <!--  Converters  -->
            <tkconverters:BoolToVisibilityConverter
                x:Key="ReverseBoolToVisibilityConverter"
                FalseValue="Visible"
                TrueValue="Collapsed" />
            <tkconverters:BoolToVisibilityConverter
                x:Key="BoolToVisibilityConverter"
                FalseValue="Collapsed"
                TrueValue="Visible" />
            <tkconverters:BoolToObjectConverter
                x:Key="BoolToComboBoxIndexConverter"
                FalseValue="0"
                TrueValue="1" />
            <tkconverters:BoolToObjectConverter
                x:Key="ReverseBoolToComboBoxIndexConverter"
                FalseValue="1"
                TrueValue="0" />
            <tkconverters:DoubleToVisibilityConverter
                x:Name="DoubleToVisibilityConverter"
                FalseValue="Collapsed"
                GreaterThan="0"
                TrueValue="Visible" />
            <tkconverters:DoubleToVisibilityConverter
                x:Name="DoubleToInvertedVisibilityConverter"
                FalseValue="Visible"
                GreaterThan="0"
                TrueValue="Collapsed" />
            <tkconverters:StringFormatConverter x:Key="StringFormatConverter" />
            <tkconverters:BoolNegationConverter x:Key="BoolNegationConverter" />
            <tkconverters:EmptyObjectToObjectConverter
                x:Key="EmptyObjectToObjectConverter"
                EmptyValue="Collapsed"
                NotEmptyValue="Visible" />
            <converters:UpdateStateToBoolConverter x:Key="UpdateStateToBoolConverter" />
            <tkconverters:StringVisibilityConverter x:Key="StringVisibilityConverter" />
            <x:Double x:Key="SettingsCardSpacing">2</x:Double>

            <!--  Overrides  -->
            <Thickness x:Key="InfoBarIconMargin">6,16,16,16</Thickness>
            <Thickness x:Key="InfoBarContentRootPadding">16,0,0,0</Thickness>
            <x:Double x:Key="SettingActionControlMinWidth">240</x:Double>

            <x:Double x:Key="PageMaxWidth">1000</x:Double>

            <Style TargetType="ListViewItem">
                <Setter Property="Margin" Value="0,0,0,2" />
                <Setter Property="Padding" Value="0,0,0,0" />
                <Setter Property="HorizontalContentAlignment" Value="Stretch" />
                <Setter Property="IsTabStop" Value="False" />
            </Style>

            <Style BasedOn="{StaticResource DefaultCheckBoxStyle}" TargetType="ptcontrols:CheckBoxWithDescriptionControl" />

            <tkcontrols:MarkdownThemes
                x:Key="DescriptionTextMarkdownThemeConfig"
                InlineCodeBackground="{StaticResource ControlFillColorDefaultBrush}"
                InlineCodeBorderBrush="{StaticResource ControlElevationBorderBrush}"
                InlineCodeCornerRadius="2"
                InlineCodeFontSize="12"
                InlineCodeForeground="{StaticResource TextFillColorSecondaryBrush}"
                InlineCodePadding="2,0,2,1" />

            <tkcontrols:MarkdownConfig x:Key="DescriptionTextMarkdownConfig" Themes="{StaticResource DescriptionTextMarkdownThemeConfig}" />

            <TransitionCollection x:Key="SettingsCardsAnimations">
                <EntranceThemeTransition FromVerticalOffset="50" />
                <!--  Animates cards when loaded  -->
                <RepositionThemeTransition IsStaggeringEnabled="False" />
                <!--  Smoothly animates individual cards upon whenever Expanders are expanded/collapsed  -->
            </TransitionCollection>
        </ResourceDictionary>
    </Application.Resources>
</Application>
