<local:NavigablePage
    x:Class="Microsoft.PowerToys.Settings.UI.Views.MouseUtilsPage"
    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:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:local="using:Microsoft.PowerToys.Settings.UI.Helpers"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:panels="using:Microsoft.PowerToys.Settings.UI.Panels"
    xmlns:tkcontrols="using:CommunityToolkit.WinUI.Controls"
    xmlns:tkconverters="using:CommunityToolkit.WinUI.Converters"
    xmlns:ui="using:CommunityToolkit.WinUI"
    AutomationProperties.LandmarkType="Main"
    mc:Ignorable="d">
    <local:NavigablePage.Resources>
        <converters:IndexBitFieldToVisibilityConverter x:Key="IndexBitFieldToVisibilityConverter" />
        <tkconverters:BoolToVisibilityConverter
            x:Key="BoolToInvertedVisibilityConverter"
            FalseValue="Visible"
            TrueValue="Collapsed" />
    </local:NavigablePage.Resources>
    <controls:SettingsPageControl x:Uid="MouseUtils" ModuleImageSource="ms-appx:///Assets/Settings/Modules/MouseUtils.png">
        <controls:SettingsPageControl.ModuleContent>
            <StackPanel ChildrenTransitions="{StaticResource SettingsCardsAnimations}" Orientation="Vertical">
                <controls:SettingsGroup x:Uid="MouseUtils_CursorWrap" AutomationProperties.AutomationId="MouseUtils_CursorWrapTestId">
                    <controls:GPOInfoControl ShowWarning="{x:Bind ViewModel.IsCursorWrapEnabledGpoConfigured, Mode=OneWay}">
                        <tkcontrols:SettingsCard
                            Name="MouseUtilsEnableCursorWrap"
                            x:Uid="MouseUtils_Enable_CursorWrap"
                            HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/Icons/CursorWrap.png}"
                            IsEnabled="{x:Bind ViewModel.IsCursorWrapEnabledGpoConfigured, Mode=OneWay, Converter={StaticResource BoolNegationConverter}}">
                            <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.IsCursorWrapEnabled, Mode=TwoWay}" />
                        </tkcontrols:SettingsCard>
                    </controls:GPOInfoControl>

                    <tkcontrols:SettingsExpander
                        Name="MouseUtilsCursorWrapSettingsExpander"
                        x:Uid="MouseUtils_CursorWrap_ActivationShortcut"
                        HeaderIcon="{ui:FontIcon Glyph=&#xEDA7;}"
                        IsEnabled="{x:Bind ViewModel.IsCursorWrapEnabled, Mode=OneWay}">
                        <controls:ShortcutControl HotkeySettings="{x:Bind Path=ViewModel.CursorWrapActivationShortcut, Mode=TwoWay}" />
                        <tkcontrols:SettingsExpander.Items>
                            <tkcontrols:SettingsCard ContentAlignment="Left">
                                <CheckBox x:Uid="MouseUtils_AutoActivate" IsChecked="{x:Bind ViewModel.CursorWrapAutoActivate, Mode=TwoWay}" />
                            </tkcontrols:SettingsCard>
                            <tkcontrols:SettingsCard ContentAlignment="Left" IsEnabled="{x:Bind ViewModel.IsCursorWrapEnabled, Mode=OneWay}">
                                <CheckBox x:Uid="MouseUtils_CursorWrap_DisableWrapDuringDrag" IsChecked="{x:Bind ViewModel.CursorWrapDisableWrapDuringDrag, Mode=TwoWay}" />
                            </tkcontrols:SettingsCard>
                            <tkcontrols:SettingsCard Name="MouseUtilsCursorWrapWrapMode" x:Uid="MouseUtils_CursorWrap_WrapMode">
                                <ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Path=ViewModel.CursorWrapWrapMode, Mode=TwoWay}">
                                    <ComboBoxItem x:Uid="MouseUtils_CursorWrap_WrapMode_Both" />
                                    <ComboBoxItem x:Uid="MouseUtils_CursorWrap_WrapMode_VerticalOnly" />
                                    <ComboBoxItem x:Uid="MouseUtils_CursorWrap_WrapMode_HorizontalOnly" />
                                </ComboBox>
                            </tkcontrols:SettingsCard>
                            <tkcontrols:SettingsCard Name="MouseUtilsCursorWrapActivationMode" x:Uid="MouseUtils_CursorWrap_ActivationMode">
                                <ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Path=ViewModel.CursorWrapActivationMode, Mode=TwoWay}">
                                    <ComboBoxItem x:Uid="MouseUtils_CursorWrap_ActivationMode_Always" />
                                    <ComboBoxItem x:Uid="MouseUtils_CursorWrap_ActivationMode_HoldingCtrl" />
                                    <ComboBoxItem x:Uid="MouseUtils_CursorWrap_ActivationMode_HoldingShift" />
                                </ComboBox>
                            </tkcontrols:SettingsCard>
                            <tkcontrols:SettingsCard ContentAlignment="Left" IsEnabled="{x:Bind ViewModel.IsCursorWrapEnabled, Mode=OneWay}">
                                <CheckBox x:Uid="MouseUtils_CursorWrap_DisableOnSingleMonitor" IsChecked="{x:Bind ViewModel.CursorWrapDisableOnSingleMonitor, Mode=TwoWay}" />
                            </tkcontrols:SettingsCard>
                        </tkcontrols:SettingsExpander.Items>
                    </tkcontrols:SettingsExpander>
                </controls:SettingsGroup>

                <controls:SettingsGroup x:Uid="MouseUtils_FindMyMouse" AutomationProperties.AutomationId="MouseUtils_FindMyMouseTestId">
                    <controls:GPOInfoControl ShowWarning="{x:Bind ViewModel.IsFindMyMouseEnabledGpoConfigured, Mode=OneWay}">
                        <tkcontrols:SettingsCard
                            Name="MouseUtilsEnableFindMyMouse"
                            x:Uid="MouseUtils_Enable_FindMyMouse"
                            HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/Icons/FindMyMouse.png}">
                            <ToggleSwitch
                                x:Uid="ToggleSwitch"
                                AutomationProperties.AutomationId="MouseUtils_FindMyMouseToggleId"
                                IsOn="{x:Bind ViewModel.IsFindMyMouseEnabled, Mode=TwoWay}" />
                        </tkcontrols:SettingsCard>
                    </controls:GPOInfoControl>
                    <tkcontrols:SettingsExpander
                        Name="MouseUtilsFindMyMouseActivationMethod"
                        x:Uid="MouseUtils_FindMyMouse_ActivationMethod"
                        AutomationProperties.AutomationId="MouseUtils_FindMyMouseActivationMethodId"
                        HeaderIcon="{ui:FontIcon Glyph=&#xE961;}"
                        IsEnabled="{x:Bind ViewModel.IsFindMyMouseEnabled, Mode=OneWay}">
                        <ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Path=ViewModel.FindMyMouseActivationMethod, Mode=TwoWay}">
                            <ComboBoxItem x:Uid="MouseUtils_FindMyMouse_ActivationDoubleControlPress" />
                            <ComboBoxItem x:Uid="MouseUtils_FindMyMouse_ActivationDoubleRightControlPress" />
                            <ComboBoxItem x:Uid="MouseUtils_FindMyMouse_ActivationShakeMouse" />
                            <ComboBoxItem x:Uid="MouseUtils_FindMyMouse_ActivationCustomizedShortcut" />
                        </ComboBox>
                        <tkcontrols:SettingsExpander.Items>
                            <tkcontrols:SettingsCard ContentAlignment="Left" Visibility="{x:Bind ViewModel.FindMyMouseActivationMethod, Converter={StaticResource IndexBitFieldToVisibilityConverter}, Mode=OneWay, ConverterParameter=0x3}">
                                <!--  Visible for both Press Left Control twice and Press Right Control twice activation methods  -->
                                <CheckBox x:Uid="MouseUtils_Include_Win_Key" IsChecked="{x:Bind ViewModel.FindMyMouseIncludeWinKey, Mode=TwoWay}" />
                            </tkcontrols:SettingsCard>
                            <tkcontrols:SettingsCard
                                Name="MouseUtilsFindMyMouseShakingMinimumDistance"
                                x:Uid="MouseUtils_FindMyMouse_ShakingMinimumDistance"
                                Visibility="{x:Bind ViewModel.FindMyMouseActivationMethod, Converter={StaticResource IndexBitFieldToVisibilityConverter}, Mode=OneWay, ConverterParameter=0x4}">
                                <!--  Visible for the Shake Mouse activation method  -->
                                <NumberBox
                                    MinWidth="{StaticResource SettingActionControlMinWidth}"
                                    LargeChange="1000"
                                    Maximum="1000000"
                                    Minimum="0"
                                    SmallChange="100"
                                    SpinButtonPlacementMode="Compact"
                                    Value="{x:Bind ViewModel.FindMyMouseShakingMinimumDistance, Mode=TwoWay}" />
                            </tkcontrols:SettingsCard>
                            <tkcontrols:SettingsCard
                                Name="MouseUtilsFindMyMouseShakingIntervalMs"
                                x:Uid="MouseUtils_FindMyMouse_ShakingIntervalMs"
                                Visibility="{x:Bind ViewModel.FindMyMouseActivationMethod, Converter={StaticResource IndexBitFieldToVisibilityConverter}, Mode=OneWay, ConverterParameter=0x4}">
                                <!--  Visible for the Shake Mouse activation method  -->
                                <NumberBox
                                    MinWidth="{StaticResource SettingActionControlMinWidth}"
                                    LargeChange="1000"
                                    Maximum="10000"
                                    Minimum="100"
                                    SmallChange="100"
                                    SpinButtonPlacementMode="Compact"
                                    Value="{x:Bind ViewModel.FindMyMouseShakingIntervalMs, Mode=TwoWay}" />
                            </tkcontrols:SettingsCard>
                            <tkcontrols:SettingsCard
                                Name="MouseUtilsFindMyMouseShakingFactor"
                                x:Uid="MouseUtils_FindMyMouse_ShakingFactor"
                                Visibility="{x:Bind ViewModel.FindMyMouseActivationMethod, Converter={StaticResource IndexBitFieldToVisibilityConverter}, Mode=OneWay, ConverterParameter=0x4}">
                                <!--  Visible for the Shake Mouse activation method  -->
                                <NumberBox
                                    MinWidth="{StaticResource SettingActionControlMinWidth}"
                                    LargeChange="100"
                                    Maximum="10000"
                                    Minimum="150"
                                    SmallChange="10"
                                    SpinButtonPlacementMode="Compact"
                                    Value="{x:Bind ViewModel.FindMyMouseShakingFactor, Mode=TwoWay}" />
                            </tkcontrols:SettingsCard>
                            <tkcontrols:SettingsCard
                                Name="MouseUtilsFindMyMouseActivationShortcut"
                                x:Uid="MouseUtils_FindMyMouse_ActivationShortcut"
                                HeaderIcon="{ui:FontIcon Glyph=&#xEDA7;}"
                                Visibility="{x:Bind ViewModel.FindMyMouseActivationMethod, Converter={StaticResource IndexBitFieldToVisibilityConverter}, Mode=OneWay, ConverterParameter=0x8}">
                                <!--  Visible for the Shortcut activation method  -->
                                <controls:ShortcutControl HotkeySettings="{x:Bind Path=ViewModel.FindMyMouseActivationShortcut, Mode=TwoWay}" />
                            </tkcontrols:SettingsCard>
                            <tkcontrols:SettingsCard ContentAlignment="Left">
                                <CheckBox x:Uid="MouseUtils_Prevent_Activation_On_Game_Mode" IsChecked="{x:Bind ViewModel.FindMyMouseDoNotActivateOnGameMode, Mode=TwoWay}" />
                            </tkcontrols:SettingsCard>
                        </tkcontrols:SettingsExpander.Items>
                    </tkcontrols:SettingsExpander>

                    <tkcontrols:SettingsExpander
                        Name="FindMyMouseAppearanceBehavior"
                        x:Uid="Appearance_Behavior"
                        AutomationProperties.AutomationId="MouseUtils_FindMyMouseAppearanceBehaviorId"
                        HeaderIcon="{ui:FontIcon Glyph=&#xEB3C;}"
                        IsEnabled="{x:Bind ViewModel.IsFindMyMouseEnabled, Mode=OneWay}">
                        <tkcontrols:SettingsExpander.Items>
                            <!--  Overlay opacity removed; alpha now encoded in colors  -->
                            <tkcontrols:SettingsCard Name="MouseUtilsFindMyMouseBackgroundColor" x:Uid="MouseUtils_FindMyMouse_BackgroundColor">
                                <controls:ColorPickerButton
                                    AutomationProperties.AutomationId="MouseUtils_FindMyMouseBackgroundColorId"
                                    IsAlphaEnabled="True"
                                    SelectedColor="{x:Bind Path=ViewModel.FindMyMouseBackgroundColor, Mode=TwoWay}" />
                            </tkcontrols:SettingsCard>
                            <tkcontrols:SettingsCard Name="MouseUtilsFindMyMouseSpotlightColor" x:Uid="MouseUtils_FindMyMouse_SpotlightColor">
                                <controls:ColorPickerButton
                                    AutomationProperties.AutomationId="MouseUtils_FindMyMouseSpotlightColorId"
                                    IsAlphaEnabled="True"
                                    SelectedColor="{x:Bind Path=ViewModel.FindMyMouseSpotlightColor, Mode=TwoWay}" />
                            </tkcontrols:SettingsCard>
                            <tkcontrols:SettingsCard Name="MouseUtilsFindMyMouseSpotlightRadius" x:Uid="MouseUtils_FindMyMouse_SpotlightRadius">
                                <NumberBox
                                    MinWidth="{StaticResource SettingActionControlMinWidth}"
                                    AutomationProperties.AutomationId="MouseUtils_FindMyMouseSpotlightRadiusId"
                                    LargeChange="10"
                                    Minimum="5"
                                    SmallChange="1"
                                    SpinButtonPlacementMode="Compact"
                                    Value="{x:Bind ViewModel.FindMyMouseSpotlightRadius, Mode=TwoWay}" />
                            </tkcontrols:SettingsCard>
                            <tkcontrols:SettingsCard Name="MouseUtilsFindMyMouseSpotlightInitialZoom" x:Uid="MouseUtils_FindMyMouse_SpotlightInitialZoom">
                                <Slider
                                    MinWidth="{StaticResource SettingActionControlMinWidth}"
                                    AutomationProperties.AutomationId="MouseUtils_FindMyMouseSpotlightZoomId"
                                    Maximum="40"
                                    Minimum="1"
                                    Value="{x:Bind ViewModel.FindMyMouseSpotlightInitialZoom, Mode=TwoWay}" />
                            </tkcontrols:SettingsCard>
                            <tkcontrols:SettingsCard Name="MouseUtilsFindMyMouseAnimationDurationMs" x:Uid="MouseUtils_FindMyMouse_AnimationDurationMs">
                                <NumberBox
                                    MinWidth="{StaticResource SettingActionControlMinWidth}"
                                    AutomationProperties.AutomationId="MouseUtils_FindMyMouseAnimationDurationId"
                                    IsEnabled="{x:Bind ViewModel.IsAnimationEnabledBySystem, Mode=OneWay}"
                                    LargeChange="100"
                                    Minimum="0"
                                    SmallChange="10"
                                    SpinButtonPlacementMode="Compact"
                                    Value="{x:Bind ViewModel.FindMyMouseAnimationDurationMs, Mode=TwoWay}" />
                            </tkcontrols:SettingsCard>
                        </tkcontrols:SettingsExpander.Items>
                    </tkcontrols:SettingsExpander>
                    <InfoBar
                        x:Uid="MouseUtils_FindMyMouse_AnimationDurationMs_Disabled"
                        IsClosable="False"
                        IsOpen="True"
                        Severity="Informational"
                        Visibility="{x:Bind ViewModel.IsAnimationEnabledBySystem, Mode=OneWay, Converter={StaticResource ReverseBoolToVisibilityConverter}}">
                        <InfoBar.ActionButton>
                            <HyperlinkButton x:Uid="OpenAnimationsSettings" Click="OpenAnimationsSettings_Click" />
                        </InfoBar.ActionButton>
                    </InfoBar>
                    <tkcontrols:SettingsExpander
                        Name="MouseUtilsFindMyMouseExcludedApps"
                        x:Uid="MouseUtils_FindMyMouse_ExcludedApps"
                        AutomationProperties.AutomationId="MouseUtils_FindMyMouseExcludedAppsId"
                        HeaderIcon="{ui:FontIcon Glyph=&#xECE4;}"
                        IsEnabled="{x:Bind ViewModel.IsFindMyMouseEnabled, Mode=OneWay}">
                        <tkcontrols:SettingsExpander.Items>
                            <tkcontrols:SettingsCard HorizontalContentAlignment="Stretch" ContentAlignment="Vertical">
                                <TextBox
                                    x:Uid="MouseUtils_FindMyMouse_ExcludedApps_TextBoxControl"
                                    MinWidth="240"
                                    MinHeight="160"
                                    AcceptsReturn="True"
                                    IsEnabled="{x:Bind ViewModel.IsFindMyMouseEnabled, Mode=OneWay}"
                                    ScrollViewer.IsVerticalRailEnabled="True"
                                    ScrollViewer.VerticalScrollBarVisibility="Visible"
                                    ScrollViewer.VerticalScrollMode="Enabled"
                                    Text="{x:Bind ViewModel.FindMyMouseExcludedApps, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                    TextWrapping="Wrap" />
                            </tkcontrols:SettingsCard>
                        </tkcontrols:SettingsExpander.Items>
                    </tkcontrols:SettingsExpander>
                </controls:SettingsGroup>

                <controls:SettingsGroup x:Uid="MouseUtils_MouseHighlighter" AutomationProperties.AutomationId="MouseUtils_MouseHighlighterTestId">
                    <controls:GPOInfoControl ShowWarning="{x:Bind ViewModel.IsHighlighterEnabledGpoConfigured, Mode=OneWay}">
                        <tkcontrols:SettingsCard
                            Name="MouseUtilsEnableMouseHighlighter"
                            x:Uid="MouseUtils_Enable_MouseHighlighter"
                            HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/Icons/MouseHighlighter.png}">
                            <ToggleSwitch
                                x:Uid="ToggleSwitch"
                                AutomationProperties.AutomationId="MouseUtils_MouseHighlighterToggleId"
                                IsOn="{x:Bind ViewModel.IsMouseHighlighterEnabled, Mode=TwoWay}" />
                        </tkcontrols:SettingsCard>
                    </controls:GPOInfoControl>
                    <tkcontrols:SettingsExpander
                        Name="MouseUtilsMouseHighlighterActivationShortcut"
                        x:Uid="MouseUtils_MouseHighlighter_ActivationShortcut"
                        AutomationProperties.AutomationId="MouseUtils_MouseHighlighterActivationShortcutId"
                        HeaderIcon="{ui:FontIcon Glyph=&#xEDA7;}"
                        IsEnabled="{x:Bind ViewModel.IsMouseHighlighterEnabled, Mode=OneWay}">
                        <controls:ShortcutControl HotkeySettings="{x:Bind Path=ViewModel.MouseHighlighterActivationShortcut, Mode=TwoWay}" />
                        <tkcontrols:SettingsExpander.Items>
                            <tkcontrols:SettingsCard ContentAlignment="Left">
                                <CheckBox x:Uid="MouseUtils_AutoActivate" IsChecked="{x:Bind ViewModel.MouseHighlighterAutoActivate, Mode=TwoWay}" />
                            </tkcontrols:SettingsCard>
                        </tkcontrols:SettingsExpander.Items>
                    </tkcontrols:SettingsExpander>
                    <tkcontrols:SettingsExpander
                        Name="MouseHighlighterAppearanceBehavior"
                        x:Uid="Appearance_Behavior"
                        AutomationProperties.AutomationId="MouseUtils_MouseHighlighterAppearanceBehaviorId"
                        HeaderIcon="{ui:FontIcon Glyph=&#xEB3C;}"
                        IsEnabled="{x:Bind ViewModel.IsMouseHighlighterEnabled, Mode=OneWay}">
                        <tkcontrols:SettingsExpander.Items>
                            <tkcontrols:SettingsCard x:Uid="MouseUtils_MouseHighlighter_PrimaryButtonClickColor" IsEnabled="{x:Bind ViewModel.IsSpotlightModeEnabled, Mode=OneWay, Converter={StaticResource BoolNegationConverter}}">
                                <controls:ColorPickerButton IsAlphaEnabled="True" SelectedColor="{x:Bind Path=ViewModel.MouseHighlighterLeftButtonClickColor, Mode=TwoWay}" />
                            </tkcontrols:SettingsCard>
                            <tkcontrols:SettingsCard x:Uid="MouseUtils_MouseHighlighter_SecondaryButtonClickColor" IsEnabled="{x:Bind ViewModel.IsSpotlightModeEnabled, Mode=OneWay, Converter={StaticResource BoolNegationConverter}}">
                                <controls:ColorPickerButton IsAlphaEnabled="True" SelectedColor="{x:Bind Path=ViewModel.MouseHighlighterRightButtonClickColor, Mode=TwoWay}" />
                            </tkcontrols:SettingsCard>
                            <tkcontrols:SettingsCard Name="MouseUtilsMouseHighlighterAlwaysColor" x:Uid="MouseUtils_MouseHighlighter_AlwaysColor">
                                <controls:ColorPickerButton IsAlphaEnabled="True" SelectedColor="{x:Bind Path=ViewModel.MouseHighlighterAlwaysColor, Mode=TwoWay}" />
                            </tkcontrols:SettingsCard>
                            <tkcontrols:SettingsCard x:Uid="HighlightMode">
                                <ComboBox
                                    x:Uid="MouseUtils_MouseHighlighter_SpotlightModeType"
                                    MinWidth="{StaticResource SettingActionControlMinWidth}"
                                    SelectedIndex="{x:Bind ViewModel.IsSpotlightModeEnabled, Converter={StaticResource ReverseBoolToComboBoxIndexConverter}, Mode=TwoWay}">
                                    <ComboBoxItem x:Uid="HighlightMode_Spotlight_Mode" />
                                    <ComboBoxItem x:Uid="HighlightMode_Circle_Highlight_Mode" />
                                </ComboBox>
                            </tkcontrols:SettingsCard>
                            <tkcontrols:SettingsCard x:Uid="MouseUtils_MouseHighlighter_HighlightRadius">
                                <NumberBox
                                    MinWidth="{StaticResource SettingActionControlMinWidth}"
                                    LargeChange="10"
                                    Minimum="5"
                                    SmallChange="1"
                                    SpinButtonPlacementMode="Compact"
                                    Value="{x:Bind ViewModel.MouseHighlighterRadius, Mode=TwoWay}" />
                            </tkcontrols:SettingsCard>
                            <tkcontrols:SettingsCard Name="MouseUtilsMouseHighlighterFadeDelayMs" x:Uid="MouseUtils_MouseHighlighter_FadeDelayMs">
                                <NumberBox
                                    MinWidth="{StaticResource SettingActionControlMinWidth}"
                                    LargeChange="100"
                                    Minimum="0"
                                    SmallChange="10"
                                    SpinButtonPlacementMode="Compact"
                                    Value="{x:Bind ViewModel.MouseHighlighterFadeDelayMs, Mode=TwoWay}" />
                            </tkcontrols:SettingsCard>
                            <tkcontrols:SettingsCard Name="MouseUtilsMouseHighlighterFadeDurationMs" x:Uid="MouseUtils_MouseHighlighter_FadeDurationMs">
                                <NumberBox
                                    MinWidth="{StaticResource SettingActionControlMinWidth}"
                                    LargeChange="100"
                                    Minimum="0"
                                    SmallChange="10"
                                    SpinButtonPlacementMode="Compact"
                                    Value="{x:Bind ViewModel.MouseHighlighterFadeDurationMs, Mode=TwoWay}" />
                            </tkcontrols:SettingsCard>
                        </tkcontrols:SettingsExpander.Items>
                    </tkcontrols:SettingsExpander>
                </controls:SettingsGroup>

                <panels:MouseJumpPanel x:Name="MouseUtils_MouseJump_Panel" x:Uid="MouseUtils_MouseJump_Panel" />

                <controls:SettingsGroup x:Uid="MouseUtils_MousePointerCrosshairs" AutomationProperties.AutomationId="MouseUtils_MousePointerCrosshairsTestId">
                    <controls:GPOInfoControl ShowWarning="{x:Bind ViewModel.IsMousePointerCrosshairsEnabledGpoConfigured, Mode=OneWay}">
                        <tkcontrols:SettingsCard
                            Name="MouseUtilsEnableMousePointerCrosshairs"
                            x:Uid="MouseUtils_Enable_MousePointerCrosshairs"
                            HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/Icons/MouseCrosshairs.png}">
                            <ToggleSwitch
                                x:Uid="ToggleSwitch"
                                AutomationProperties.AutomationId="MouseUtils_MousePointerCrosshairsToggleId"
                                IsOn="{x:Bind ViewModel.IsMousePointerCrosshairsEnabled, Mode=TwoWay}" />
                        </tkcontrols:SettingsCard>
                    </controls:GPOInfoControl>
                    <tkcontrols:SettingsExpander
                        Name="MouseUtilsMousePointerCrosshairsActivationShortcut"
                        x:Uid="MouseUtils_MousePointerCrosshairs_ActivationShortcut"
                        HeaderIcon="{ui:FontIcon Glyph=&#xEDA7;}"
                        IsEnabled="{x:Bind ViewModel.IsMousePointerCrosshairsEnabled, Mode=OneWay}">
                        <controls:ShortcutControl HotkeySettings="{x:Bind Path=ViewModel.MousePointerCrosshairsActivationShortcut, Mode=TwoWay}" />
                        <tkcontrols:SettingsExpander.Items>
                            <tkcontrols:SettingsCard ContentAlignment="Left">
                                <CheckBox x:Uid="MouseUtils_AutoActivate" IsChecked="{x:Bind ViewModel.MousePointerCrosshairsAutoActivate, Mode=TwoWay}" />
                            </tkcontrols:SettingsCard>
                        </tkcontrols:SettingsExpander.Items>
                    </tkcontrols:SettingsExpander>

                    <tkcontrols:SettingsExpander
                        Name="MousePointerCrosshairsAppearanceBehavior"
                        x:Uid="Appearance_Behavior"
                        AutomationProperties.AutomationId="MouseUtils_MousePointerCrosshairsAppearanceBehaviorId"
                        HeaderIcon="{ui:FontIcon Glyph=&#xEB3C;}"
                        IsEnabled="{x:Bind ViewModel.IsMousePointerCrosshairsEnabled, Mode=OneWay}">
                        <tkcontrols:SettingsExpander.Items>
                            <tkcontrols:SettingsCard Name="MouseUtilsMousePointerCrosshairsCrosshairsColor" x:Uid="MouseUtils_MousePointerCrosshairs_CrosshairsColor">
                                <controls:ColorPickerButton SelectedColor="{x:Bind Path=ViewModel.MousePointerCrosshairsColor, Mode=TwoWay}" />
                            </tkcontrols:SettingsCard>
                            <tkcontrols:SettingsCard Name="MouseUtilsMousePointerCrosshairsCrosshairsOpacity" x:Uid="MouseUtils_MousePointerCrosshairs_CrosshairsOpacity">
                                <Slider
                                    MinWidth="{StaticResource SettingActionControlMinWidth}"
                                    Maximum="100"
                                    Minimum="1"
                                    Value="{x:Bind ViewModel.MousePointerCrosshairsOpacity, Mode=TwoWay}" />
                            </tkcontrols:SettingsCard>

                            <tkcontrols:SettingsCard Name="MouseUtilsMousePointerCrosshairsCrosshairsRadius" x:Uid="MouseUtils_MousePointerCrosshairs_CrosshairsRadius">
                                <NumberBox
                                    MinWidth="{StaticResource SettingActionControlMinWidth}"
                                    LargeChange="10"
                                    Maximum="500"
                                    Minimum="0"
                                    SmallChange="1"
                                    SpinButtonPlacementMode="Compact"
                                    Value="{x:Bind ViewModel.MousePointerCrosshairsRadius, Mode=TwoWay}" />
                            </tkcontrols:SettingsCard>

                            <tkcontrols:SettingsCard Name="MouseUtilsMousePointerCrosshairsCrosshairsThickness" x:Uid="MouseUtils_MousePointerCrosshairs_CrosshairsThickness">
                                <NumberBox
                                    MinWidth="{StaticResource SettingActionControlMinWidth}"
                                    LargeChange="10"
                                    Maximum="50"
                                    Minimum="1"
                                    SmallChange="1"
                                    SpinButtonPlacementMode="Compact"
                                    Value="{x:Bind ViewModel.MousePointerCrosshairsThickness, Mode=TwoWay}" />
                            </tkcontrols:SettingsCard>

                            <tkcontrols:SettingsCard Name="MouseUtilsMousePointerCrosshairsCrosshairsBorderColor" x:Uid="MouseUtils_MousePointerCrosshairs_CrosshairsBorderColor">
                                <controls:ColorPickerButton SelectedColor="{x:Bind Path=ViewModel.MousePointerCrosshairsBorderColor, Mode=TwoWay}" />
                            </tkcontrols:SettingsCard>

                            <tkcontrols:SettingsCard Name="MouseUtilsMousePointerCrosshairsCrosshairsBorderSize" x:Uid="MouseUtils_MousePointerCrosshairs_CrosshairsBorderSize">
                                <NumberBox
                                    MinWidth="{StaticResource SettingActionControlMinWidth}"
                                    LargeChange="2"
                                    Maximum="50"
                                    Minimum="0"
                                    SmallChange="1"
                                    SpinButtonPlacementMode="Compact"
                                    Value="{x:Bind ViewModel.MousePointerCrosshairsBorderSize, Mode=TwoWay}" />
                            </tkcontrols:SettingsCard>

                            <tkcontrols:SettingsCard Name="MouseUtilsMousePointerCrosshairsCrosshairsOrientation" x:Uid="MouseUtils_MousePointerCrosshairs_CrosshairsOrientation">
                                <ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Path=ViewModel.MousePointerCrosshairsOrientation, Mode=TwoWay}">
                                    <ComboBoxItem x:Uid="MouseUtils_MousePointerCrosshairs_CrosshairsOrientation_Both" />
                                    <ComboBoxItem x:Uid="MouseUtils_MousePointerCrosshairs_CrosshairsOrientation_Vertical" />
                                    <ComboBoxItem x:Uid="MouseUtils_MousePointerCrosshairs_CrosshairsOrientation_Horizontal" />
                                </ComboBox>
                            </tkcontrols:SettingsCard>

                            <tkcontrols:SettingsCard ContentAlignment="Left">
                                <CheckBox x:Uid="MouseUtils_MousePointerCrosshairs_CrosshairsAutoHide" IsChecked="{x:Bind ViewModel.MousePointerCrosshairsAutoHide, Mode=TwoWay}" />
                            </tkcontrols:SettingsCard>

                            <tkcontrols:SettingsCard Name="MouseUtilsMousePointerCrosshairsIsCrosshairsFixedLengthEnabled" x:Uid="MouseUtils_MousePointerCrosshairs_IsCrosshairsFixedLengthEnabled">
                                <ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.MousePointerCrosshairsIsFixedLengthEnabled, Mode=TwoWay}" />
                            </tkcontrols:SettingsCard>

                            <tkcontrols:SettingsCard
                                Name="MouseUtilsMousePointerCrosshairsCrosshairsFixedLength"
                                x:Uid="MouseUtils_MousePointerCrosshairs_CrosshairsFixedLength"
                                IsEnabled="{x:Bind ViewModel.MousePointerCrosshairsIsFixedLengthEnabled, Mode=OneWay}">
                                <NumberBox
                                    MinWidth="{StaticResource SettingActionControlMinWidth}"
                                    LargeChange="10"
                                    Minimum="1"
                                    SmallChange="1"
                                    SpinButtonPlacementMode="Compact"
                                    Value="{x:Bind ViewModel.MousePointerCrosshairsFixedLength, Mode=TwoWay}" />
                            </tkcontrols:SettingsCard>
                        </tkcontrols:SettingsExpander.Items>
                    </tkcontrols:SettingsExpander>

                    <tkcontrols:SettingsExpander
                        x:Uid="MouseUtils_GlidingCursor"
                        HeaderIcon="{ui:FontIcon Glyph=&#xECE7;}"
                        IsEnabled="{x:Bind ViewModel.IsMousePointerCrosshairsEnabled, Mode=OneWay}">
                        <controls:ShortcutControl HotkeySettings="{x:Bind Path=ViewModel.GlidingCursorActivationShortcut, Mode=TwoWay}" />
                        <tkcontrols:SettingsExpander.Items>
                            <tkcontrols:SettingsCard x:Uid="MouseUtils_GlidingCursor_InitialSpeed">
                                <Slider
                                    Maximum="60"
                                    Minimum="5"
                                    Value="{x:Bind ViewModel.GlidingCursorTravelSpeed, Mode=TwoWay}" />
                            </tkcontrols:SettingsCard>
                            <tkcontrols:SettingsCard x:Uid="MouseUtils_GlidingCursor_DelaySpeed">
                                <Slider
                                    Maximum="60"
                                    Minimum="5"
                                    Value="{x:Bind ViewModel.GlidingCursorDelaySpeed, Mode=TwoWay}" />
                            </tkcontrols:SettingsCard>
                        </tkcontrols:SettingsExpander.Items>
                    </tkcontrols:SettingsExpander>
                </controls:SettingsGroup>
            </StackPanel>
        </controls:SettingsPageControl.ModuleContent>
        <controls:SettingsPageControl.PrimaryLinks>
            <controls:PageLink x:Uid="LearnMore_MouseUtils" Link="https://aka.ms/PowerToysOverview_MouseUtilities" />
        </controls:SettingsPageControl.PrimaryLinks>
        <controls:SettingsPageControl.SecondaryLinks>
            <controls:PageLink Link="https://devblogs.microsoft.com/oldnewthing/author/oldnewthing" Text="Raymond Chen's Find My Mouse" />
            <controls:PageLink Link="https://michael-clayton.com/projects/fancymouse" Text="Michael Clayton's Mouse Jump (FancyMouse)" />
        </controls:SettingsPageControl.SecondaryLinks>
    </controls:SettingsPageControl>
</local:NavigablePage>
