2023-10-24 12:25:55 +02:00
<Page
2020-03-31 14:32:22 +02:00
x:Class="Microsoft.PowerToys.Settings.UI.Views.FancyZonesPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
2023-09-14 18:41:31 +02:00
xmlns:controls="using:CommunityToolkit.WinUI.Controls"
xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
2020-03-31 14:32:22 +02:00
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
2023-09-14 18:41:31 +02:00
xmlns:ui="using:CommunityToolkit.WinUI"
2022-11-23 19:57:09 +01:00
AutomationProperties.LandmarkType="Main"
mc:Ignorable="d">
2020-04-16 11:45:27 -07:00
2023-09-14 18:41:31 +02:00
<custom:SettingsPageControl x:Uid="FancyZones" ModuleImageSource="ms-appx:///Assets/Settings/Modules/FancyZones.png">
<custom:SettingsPageControl.ModuleContent>
<StackPanel ChildrenTransitions="{StaticResource SettingsCardsAnimations}" Orientation="Vertical">
<controls:SettingsCard
2022-11-23 19:57:09 +01:00
x:Uid="FancyZones_EnableToggleControl_HeaderText"
2023-07-20 00:12:46 +01:00
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsFancyZones.png}"
2022-11-23 19:57:09 +01:00
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}">
2023-09-14 18:41:31 +02:00
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" />
</controls:SettingsCard>
2022-12-05 17:34:16 +00:00
<InfoBar
x:Uid="GPO_IsSettingForced"
IsClosable="False"
IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}"
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}"
Severity="Informational" />
2020-08-18 14:46:32 -07:00
2023-09-14 18:41:31 +02:00
<custom:SettingsGroup x:Uid="FancyZones_Editor_GroupSettings" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<controls:SettingsCard
2022-11-23 19:57:09 +01:00
x:Uid="FancyZones_LaunchEditorButtonControl"
2024-01-02 15:09:35 +01:00
ActionIcon="{ui:FontIcon Glyph=}"
2022-11-23 19:57:09 +01:00
Command="{x:Bind ViewModel.LaunchEditorEventHandler}"
2023-09-14 18:41:31 +02:00
HeaderIcon="{ui:FontIcon Glyph=}"
2022-11-23 19:57:09 +01:00
IsClickEnabled="True" />
2021-08-23 19:48:52 +02:00
2023-09-14 18:41:31 +02:00
<controls:SettingsCard x:Uid="Activation_Shortcut" HeaderIcon="{ui:FontIcon Glyph=}">
<custom:ShortcutControl MinWidth="{StaticResource SettingActionControlMinWidth}" HotkeySettings="{x:Bind Path=ViewModel.EditorHotkey, Mode=TwoWay}" />
</controls:SettingsCard>
2021-08-23 19:48:52 +02:00
2023-09-14 18:41:31 +02:00
<controls:SettingsCard x:Uid="FancyZones_UseCursorPosEditorStartupScreen" HeaderIcon="{ui:FontIcon Glyph=}">
<ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.UseCursorPosEditorStartupScreen, Converter={StaticResource BoolToComboBoxIndexConverter}}">
2022-11-23 19:57:09 +01:00
<ComboBoxItem x:Uid="FancyZones_LaunchPositionScreen" />
<ComboBoxItem x:Uid="FancyZones_LaunchPositionMouse" />
</ComboBox>
2023-09-14 18:41:31 +02:00
</controls:SettingsCard>
</custom:SettingsGroup>
2021-08-23 19:48:52 +02:00
2023-09-14 18:41:31 +02:00
<custom:SettingsGroup
2022-11-23 19:57:09 +01:00
x:Name="ZonesSettingsGroup"
x:Uid="FancyZones_Zones"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
2023-09-14 18:41:31 +02:00
<controls:SettingsExpander x:Uid="FancyZones_ZoneBehavior_GroupSettings" IsExpanded="True">
<controls:SettingsExpander.Items>
<controls:SettingsCard ContentAlignment="Left">
<CheckBox x:Uid="FancyZones_ShiftDragCheckBoxControl_Header" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.ShiftDrag}" />
</controls:SettingsCard>
<controls:SettingsCard ContentAlignment="Left">
<CheckBox x:Uid="FancyZones_MouseDragCheckBoxControl_Header" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.MouseSwitch}" />
</controls:SettingsCard>
<controls:SettingsCard ContentAlignment="Left">
<CheckBox x:Uid="FancyZones_MouseMiddleClickSpanningMultipleZonesCheckBoxControl_Header" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.MouseMiddleClickSpanningMultipleZones}" />
</controls:SettingsCard>
<controls:SettingsCard ContentAlignment="Left">
<CheckBox x:Uid="FancyZones_ShowZonesOnAllMonitorsCheckBoxControl" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.ShowOnAllMonitors}" />
</controls:SettingsCard>
<controls:SettingsCard ContentAlignment="Left">
<custom:CheckBoxWithDescriptionControl x:Uid="FancyZones_SpanZonesAcrossMonitors" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.SpanZonesAcrossMonitors}" />
</controls:SettingsCard>
<controls:SettingsCard x:Uid="FancyZones_OverlappingZones">
<ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Path=ViewModel.OverlappingZonesAlgorithmIndex, Mode=TwoWay}">
2022-11-23 19:57:09 +01:00
<ComboBoxItem x:Uid="FancyZones_OverlappingZonesSmallest" />
<ComboBoxItem x:Uid="FancyZones_OverlappingZonesLargest" />
<ComboBoxItem x:Uid="FancyZones_OverlappingZonesPositional" />
<ComboBoxItem x:Uid="FancyZones_OverlappingZonesClosestCenter" />
</ComboBox>
2023-09-14 18:41:31 +02:00
</controls:SettingsCard>
</controls:SettingsExpander.Items>
</controls:SettingsExpander>
2021-11-04 15:30:06 +01:00
2023-09-14 18:41:31 +02:00
<controls:SettingsExpander
2022-11-23 19:57:09 +01:00
x:Uid="FancyZones_Zone_Appearance"
2023-09-14 18:41:31 +02:00
HeaderIcon="{ui:FontIcon Glyph=}"
2022-11-23 19:57:09 +01:00
IsExpanded="True">
2023-09-14 18:41:31 +02:00
<ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.SystemTheme, Converter={StaticResource BoolToComboBoxIndexConverter}}">
2022-11-23 19:57:09 +01:00
<ComboBoxItem x:Uid="FancyZones_Radio_Custom_Colors" />
<ComboBoxItem x:Uid="FancyZones_Radio_Default_Theme" />
</ComboBox>
2023-09-14 18:41:31 +02:00
<controls:SettingsExpander.Items>
<controls:SettingsCard ContentAlignment="Left">
<custom:FancyZonesPreviewControl
2023-05-09 16:40:18 +02:00
Width="192"
Height="108"
2022-11-23 19:57:09 +01:00
CustomBorderColor="{x:Bind Path=ViewModel.ZoneBorderColor, Mode=OneWay}"
CustomHighlightColor="{x:Bind Path=ViewModel.ZoneHighlightColor, Mode=OneWay}"
CustomInActiveColor="{x:Bind Path=ViewModel.ZoneInActiveColor, Mode=OneWay}"
CustomNumberColor="{x:Bind Path=ViewModel.ZoneNumberColor, Mode=OneWay}"
HighlightOpacity="{x:Bind Mode=OneWay, Path=ViewModel.HighlightOpacity}"
IsSystemTheme="{x:Bind Mode=OneWay, Path=ViewModel.SystemTheme}"
ShowZoneNumber="{x:Bind Path=ViewModel.ShowZoneNumber, Mode=OneWay}" />
2023-09-14 18:41:31 +02:00
</controls:SettingsCard>
<controls:SettingsCard ContentAlignment="Left">
<CheckBox x:Uid="FancyZones_ShowZoneNumberCheckBoxControl" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.ShowZoneNumber}" />
</controls:SettingsCard>
<controls:SettingsCard x:Uid="FancyZones_HighlightOpacity">
2022-11-23 19:57:09 +01:00
<Slider
MinWidth="{StaticResource SettingActionControlMinWidth}"
Maximum="100"
Minimum="0"
Value="{x:Bind Mode=TwoWay, Path=ViewModel.HighlightOpacity}" />
2023-09-14 18:41:31 +02:00
</controls:SettingsCard>
2021-11-18 20:35:07 +01:00
2023-09-14 18:41:31 +02:00
<controls:SettingsCard x:Uid="FancyZones_ZoneHighlightColor" Visibility="{x:Bind Mode=OneWay, Path=ViewModel.SystemTheme, Converter={StaticResource ReverseBoolToVisibilityConverter}}">
<custom:ColorPickerButton SelectedColor="{x:Bind Path=ViewModel.ZoneHighlightColor, Mode=TwoWay}" />
</controls:SettingsCard>
<controls:SettingsCard x:Uid="FancyZones_InActiveColor" Visibility="{x:Bind Mode=OneWay, Path=ViewModel.SystemTheme, Converter={StaticResource ReverseBoolToVisibilityConverter}}">
<custom:ColorPickerButton x:Name="InActiveColorButton" SelectedColor="{x:Bind Path=ViewModel.ZoneInActiveColor, Mode=TwoWay}" />
</controls:SettingsCard>
<controls:SettingsCard x:Uid="FancyZones_BorderColor" Visibility="{x:Bind Mode=OneWay, Path=ViewModel.SystemTheme, Converter={StaticResource ReverseBoolToVisibilityConverter}}">
<custom:ColorPickerButton SelectedColor="{x:Bind Path=ViewModel.ZoneBorderColor, Mode=TwoWay}" />
</controls:SettingsCard>
<controls:SettingsCard x:Uid="FancyZones_NumberColor" Visibility="{x:Bind Mode=OneWay, Path=ViewModel.SystemTheme, Converter={StaticResource ReverseBoolToVisibilityConverter}}">
<custom:ColorPickerButton SelectedColor="{x:Bind Path=ViewModel.ZoneNumberColor, Mode=TwoWay}" />
</controls:SettingsCard>
</controls:SettingsExpander.Items>
</controls:SettingsExpander>
</custom:SettingsGroup>
2021-08-23 19:48:52 +02:00
2023-09-14 18:41:31 +02:00
<custom:SettingsGroup x:Uid="FancyZones_Windows" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
2021-08-23 19:48:52 +02:00
2023-09-14 18:41:31 +02:00
<controls:SettingsExpander x:Uid="FancyZones_WindowBehavior_GroupSettings" IsExpanded="True">
<controls:SettingsExpander.Items>
<controls:SettingsCard ContentAlignment="Left">
2023-10-17 16:28:32 +02:00
<CheckBox x:Uid="FancyZones_DisplayOrWorkAreaChangeMoveWindowsCheckBoxControl" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.DisplayOrWorkAreaChangeMoveWindows}" />
2023-09-14 18:41:31 +02:00
</controls:SettingsCard>
<controls:SettingsCard ContentAlignment="Left">
<CheckBox x:Uid="FancyZones_ZoneSetChangeMoveWindows" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.ZoneSetChangeMoveWindows}" />
</controls:SettingsCard>
<controls:SettingsCard ContentAlignment="Left">
<CheckBox x:Uid="FancyZones_AppLastZoneMoveWindows" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.AppLastZoneMoveWindows}" />
</controls:SettingsCard>
<controls:SettingsCard ContentAlignment="Left">
<CheckBox x:Uid="FancyZones_OpenWindowOnActiveMonitor" IsChecked="{Binding Mode=TwoWay, Path=OpenWindowOnActiveMonitor}" />
</controls:SettingsCard>
<controls:SettingsCard ContentAlignment="Left">
<CheckBox x:Uid="FancyZones_RestoreSize" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.RestoreSize}" />
</controls:SettingsCard>
<controls:SettingsCard ContentAlignment="Left">
<CheckBox x:Uid="FancyZones_MakeDraggedWindowTransparentCheckBoxControl" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.MakeDraggedWindowsTransparent}" />
</controls:SettingsCard>
<controls:SettingsCard ContentAlignment="Left">
<CheckBox x:Uid="FancyZones_AllowChildWindowSnap" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.AllowChildWindowSnap}" />
</controls:SettingsCard>
<controls:SettingsCard ContentAlignment="Left" Visibility="{x:Bind Mode=OneWay, Path=ViewModel.Windows11, Converter={StaticResource BoolToVisibilityConverter}}">
<CheckBox x:Uid="FancyZones_DisableRoundCornersOnWindowSnap" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.DisableRoundCornersOnWindowSnap}" />
</controls:SettingsCard>
</controls:SettingsExpander.Items>
</controls:SettingsExpander>
2021-08-23 19:48:52 +02:00
2023-09-14 18:41:31 +02:00
<controls:SettingsExpander
2022-11-23 19:57:09 +01:00
x:Uid="FancyZones_WindowSwitching_GroupSettings"
2023-09-14 18:41:31 +02:00
HeaderIcon="{ui:FontIcon Glyph=}"
2022-11-23 19:57:09 +01:00
IsExpanded="True">
2023-09-14 18:41:31 +02:00
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.WindowSwitching}" />
<controls:SettingsExpander.Items>
2023-10-24 12:25:55 +02:00
<!-- HACK: For some weird reason, a Shortcut Control is not working correctly if it's the first item in the expander, so we add an invisible card as the first one. -->
<controls:SettingsCard Visibility="Collapsed" />
2023-09-14 18:41:31 +02:00
<controls:SettingsCard x:Uid="FancyZones_HotkeyNextTabControl" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.WindowSwitchingCategoryEnabled}">
<custom:ShortcutControl MinWidth="{StaticResource SettingActionControlMinWidth}" HotkeySettings="{x:Bind Path=ViewModel.NextTabHotkey, Mode=TwoWay}" />
</controls:SettingsCard>
<controls:SettingsCard x:Uid="FancyZones_HotkeyPrevTabControl" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.WindowSwitchingCategoryEnabled}">
<custom:ShortcutControl MinWidth="{StaticResource SettingActionControlMinWidth}" HotkeySettings="{x:Bind Path=ViewModel.PrevTabHotkey, Mode=TwoWay}" />
</controls:SettingsCard>
</controls:SettingsExpander.Items>
</controls:SettingsExpander>
2021-11-18 20:35:07 +01:00
2023-09-14 18:41:31 +02:00
<controls:SettingsExpander
2022-11-23 19:57:09 +01:00
x:Uid="FancyZones_OverrideSnapHotkeys"
2023-09-14 18:41:31 +02:00
HeaderIcon="{ui:FontIcon Glyph=}"
2022-11-23 19:57:09 +01:00
IsExpanded="True">
2023-09-14 18:41:31 +02:00
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.OverrideSnapHotkeys}" />
<controls:SettingsExpander.Items>
<controls:SettingsCard x:Uid="FancyZones_MoveWindow" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.SnapHotkeysCategoryEnabled}">
2022-11-23 19:57:09 +01:00
<ComboBox
MinWidth="{StaticResource SettingActionControlMinWidth}"
MinHeight="56"
SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.MoveWindowsBasedOnPosition, Converter={StaticResource BoolToComboBoxIndexConverter}}">
<ComboBoxItem x:Uid="FancyZones_MoveWindowLeftRightBasedOnZoneIndex_Accessible">
2023-09-14 18:41:31 +02:00
<StackPanel Orientation="Vertical" Spacing="4">
<custom:IsEnabledTextBlock x:Uid="FancyZones_MoveWindowLeftRightBasedOnZoneIndex" />
<TextBlock FontFamily="{ThemeResource SymbolThemeFontFamily}" Style="{StaticResource SecondaryTextStyle}">
2022-11-23 19:57:09 +01:00
<Run x:Uid="FancyZones_MoveWindowLeftRightBasedOnZoneIndex_Description" />
</TextBlock>
</StackPanel>
</ComboBoxItem>
<ComboBoxItem x:Uid="FancyZones_MoveWindowBasedOnRelativePosition_Accessible">
2023-09-14 18:41:31 +02:00
<StackPanel Orientation="Vertical" Spacing="4">
<custom:IsEnabledTextBlock x:Uid="FancyZones_MoveWindowBasedOnRelativePosition" />
<TextBlock FontFamily="{ThemeResource SymbolThemeFontFamily}" Style="{StaticResource SecondaryTextStyle}">
2022-11-23 19:57:09 +01:00
<Run x:Uid="FancyZones_MoveWindowBasedOnRelativePosition_Description" />
</TextBlock>
</StackPanel>
</ComboBoxItem>
</ComboBox>
2023-09-14 18:41:31 +02:00
</controls:SettingsCard>
<controls:SettingsCard ContentAlignment="Left" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.SnapHotkeysCategoryEnabled}">
<CheckBox x:Uid="FancyZones_MoveWindowsAcrossAllMonitorsCheckBoxControl" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.MoveWindowsAcrossMonitors}" />
</controls:SettingsCard>
</controls:SettingsExpander.Items>
</controls:SettingsExpander>
</custom:SettingsGroup>
2021-08-23 19:48:52 +02:00
2023-09-14 18:41:31 +02:00
<custom:SettingsGroup x:Uid="FancyZones_Layouts" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<controls:SettingsExpander x:Uid="FancyZones_QuickLayoutSwitch" HeaderIcon="{ui:FontIcon Glyph=}">
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.QuickLayoutSwitch}" />
<controls:SettingsExpander.Items>
<controls:SettingsCard ContentAlignment="Left" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.QuickSwitchEnabled}">
<CheckBox x:Uid="FancyZones_FlashZonesOnQuickSwitch" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.FlashZonesOnQuickSwitch}" />
</controls:SettingsCard>
</controls:SettingsExpander.Items>
</controls:SettingsExpander>
</custom:SettingsGroup>
2021-08-23 19:48:52 +02:00
2023-09-14 18:41:31 +02:00
<custom:SettingsGroup x:Uid="ExcludedApps" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
2022-11-23 19:57:09 +01:00
2023-09-14 18:41:31 +02:00
<controls:SettingsExpander
2022-11-23 19:57:09 +01:00
x:Uid="FancyZones_ExcludeApps"
2023-09-14 18:41:31 +02:00
HeaderIcon="{ui:FontIcon Glyph=}"
2022-11-23 19:57:09 +01:00
IsExpanded="True">
2023-09-14 18:41:31 +02:00
<controls:SettingsExpander.Items>
<controls:SettingsCard HorizontalContentAlignment="Stretch" ContentAlignment="Vertical">
2022-11-23 19:57:09 +01:00
<TextBox
x:Uid="FancyZones_ExcludeApps_TextBoxControl"
MinWidth="240"
MinHeight="160"
AcceptsReturn="True"
ScrollViewer.IsVerticalRailEnabled="True"
ScrollViewer.VerticalScrollBarVisibility="Visible"
ScrollViewer.VerticalScrollMode="Enabled"
Text="{x:Bind Mode=TwoWay, Path=ViewModel.ExcludedApps, UpdateSourceTrigger=PropertyChanged}"
TextWrapping="Wrap" />
2023-09-14 18:41:31 +02:00
</controls:SettingsCard>
</controls:SettingsExpander.Items>
</controls:SettingsExpander>
</custom:SettingsGroup>
2020-05-29 15:11:52 +02:00
</StackPanel>
2023-09-14 18:41:31 +02:00
</custom:SettingsPageControl.ModuleContent>
2020-04-16 11:45:27 -07:00
2023-09-14 18:41:31 +02:00
<custom:SettingsPageControl.PrimaryLinks>
<custom:PageLink x:Uid="LearnMore_FancyZones" Link="https://aka.ms/PowerToysOverview_FancyZones" />
</custom:SettingsPageControl.PrimaryLinks>
</custom:SettingsPageControl>
2020-03-31 14:32:22 +02:00
</Page>