mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 19:26:39 +02:00
261 lines
20 KiB
XML
261 lines
20 KiB
XML
<Page
|
|
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"
|
|
xmlns:controls="using:CommunityToolkit.WinUI.Controls"
|
|
xmlns:custom="using:Microsoft.PowerToys.Settings.UI.Controls"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:ui="using:CommunityToolkit.WinUI"
|
|
AutomationProperties.LandmarkType="Main"
|
|
mc:Ignorable="d">
|
|
|
|
<custom:SettingsPageControl x:Uid="FancyZones" ModuleImageSource="ms-appx:///Assets/Settings/Modules/FancyZones.png">
|
|
<custom:SettingsPageControl.ModuleContent>
|
|
<StackPanel ChildrenTransitions="{StaticResource SettingsCardsAnimations}" Orientation="Vertical">
|
|
<controls:SettingsCard
|
|
x:Uid="FancyZones_EnableToggleControl_HeaderText"
|
|
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsFancyZones.png}"
|
|
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}">
|
|
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" />
|
|
</controls:SettingsCard>
|
|
<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" />
|
|
|
|
<custom:SettingsGroup x:Uid="FancyZones_Editor_GroupSettings" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
|
|
<controls:SettingsCard
|
|
x:Uid="FancyZones_LaunchEditorButtonControl"
|
|
ActionIcon="{ui:FontIcon FontSize=14,
|
|
Glyph=}"
|
|
Command="{x:Bind ViewModel.LaunchEditorEventHandler}"
|
|
HeaderIcon="{ui:FontIcon Glyph=}"
|
|
IsClickEnabled="True" />
|
|
|
|
<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>
|
|
|
|
<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}}">
|
|
<ComboBoxItem x:Uid="FancyZones_LaunchPositionScreen" />
|
|
<ComboBoxItem x:Uid="FancyZones_LaunchPositionMouse" />
|
|
</ComboBox>
|
|
</controls:SettingsCard>
|
|
</custom:SettingsGroup>
|
|
|
|
|
|
<custom:SettingsGroup
|
|
x:Name="ZonesSettingsGroup"
|
|
x:Uid="FancyZones_Zones"
|
|
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
|
|
<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}">
|
|
<ComboBoxItem x:Uid="FancyZones_OverlappingZonesSmallest" />
|
|
<ComboBoxItem x:Uid="FancyZones_OverlappingZonesLargest" />
|
|
<ComboBoxItem x:Uid="FancyZones_OverlappingZonesPositional" />
|
|
<ComboBoxItem x:Uid="FancyZones_OverlappingZonesClosestCenter" />
|
|
</ComboBox>
|
|
</controls:SettingsCard>
|
|
</controls:SettingsExpander.Items>
|
|
</controls:SettingsExpander>
|
|
|
|
<controls:SettingsExpander
|
|
x:Uid="FancyZones_Zone_Appearance"
|
|
HeaderIcon="{ui:FontIcon Glyph=}"
|
|
IsExpanded="True">
|
|
<ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.SystemTheme, Converter={StaticResource BoolToComboBoxIndexConverter}}">
|
|
<ComboBoxItem x:Uid="FancyZones_Radio_Custom_Colors" />
|
|
<ComboBoxItem x:Uid="FancyZones_Radio_Default_Theme" />
|
|
</ComboBox>
|
|
<controls:SettingsExpander.Items>
|
|
<controls:SettingsCard ContentAlignment="Left">
|
|
<custom:FancyZonesPreviewControl
|
|
Width="192"
|
|
Height="108"
|
|
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}" />
|
|
</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">
|
|
<Slider
|
|
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
|
Maximum="100"
|
|
Minimum="0"
|
|
Value="{x:Bind Mode=TwoWay, Path=ViewModel.HighlightOpacity}" />
|
|
</controls:SettingsCard>
|
|
|
|
<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>
|
|
|
|
<custom:SettingsGroup x:Uid="FancyZones_Windows" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
|
|
|
|
<controls:SettingsExpander x:Uid="FancyZones_WindowBehavior_GroupSettings" IsExpanded="True">
|
|
<controls:SettingsExpander.Items>
|
|
<controls:SettingsCard ContentAlignment="Left">
|
|
<CheckBox x:Uid="FancyZones_DisplayChangeMoveWindowsCheckBoxControl" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.DisplayChangeMoveWindows}" />
|
|
</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">
|
|
<custom:CheckBoxWithDescriptionControl
|
|
x:Uid="FancyZones_AllowPopupWindowSnap"
|
|
Margin="0,0,0,6"
|
|
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.AllowPopupWindowSnap}" />
|
|
</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>
|
|
|
|
<controls:SettingsExpander
|
|
x:Uid="FancyZones_WindowSwitching_GroupSettings"
|
|
HeaderIcon="{ui:FontIcon Glyph=}"
|
|
IsExpanded="True">
|
|
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.WindowSwitching}" />
|
|
<controls:SettingsExpander.Items>
|
|
<!-- 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"/>
|
|
<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>
|
|
|
|
<controls:SettingsExpander
|
|
x:Uid="FancyZones_OverrideSnapHotkeys"
|
|
HeaderIcon="{ui:FontIcon Glyph=}"
|
|
IsExpanded="True">
|
|
<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}">
|
|
<ComboBox
|
|
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
|
MinHeight="56"
|
|
SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.MoveWindowsBasedOnPosition, Converter={StaticResource BoolToComboBoxIndexConverter}}">
|
|
<ComboBoxItem x:Uid="FancyZones_MoveWindowLeftRightBasedOnZoneIndex_Accessible">
|
|
<StackPanel Orientation="Vertical" Spacing="4">
|
|
<custom:IsEnabledTextBlock x:Uid="FancyZones_MoveWindowLeftRightBasedOnZoneIndex" />
|
|
<TextBlock FontFamily="{ThemeResource SymbolThemeFontFamily}" Style="{StaticResource SecondaryTextStyle}">
|
|
<Run x:Uid="FancyZones_MoveWindowLeftRightBasedOnZoneIndex_Description" />
|
|
</TextBlock>
|
|
</StackPanel>
|
|
</ComboBoxItem>
|
|
<ComboBoxItem x:Uid="FancyZones_MoveWindowBasedOnRelativePosition_Accessible">
|
|
<StackPanel Orientation="Vertical" Spacing="4">
|
|
<custom:IsEnabledTextBlock x:Uid="FancyZones_MoveWindowBasedOnRelativePosition" />
|
|
<TextBlock FontFamily="{ThemeResource SymbolThemeFontFamily}" Style="{StaticResource SecondaryTextStyle}">
|
|
<Run x:Uid="FancyZones_MoveWindowBasedOnRelativePosition_Description" />
|
|
</TextBlock>
|
|
</StackPanel>
|
|
</ComboBoxItem>
|
|
</ComboBox>
|
|
</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>
|
|
|
|
<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>
|
|
|
|
<custom:SettingsGroup x:Uid="ExcludedApps" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
|
|
|
|
<controls:SettingsExpander
|
|
x:Uid="FancyZones_ExcludeApps"
|
|
HeaderIcon="{ui:FontIcon Glyph=}"
|
|
IsExpanded="True">
|
|
<controls:SettingsExpander.Items>
|
|
<controls:SettingsCard HorizontalContentAlignment="Stretch" ContentAlignment="Vertical">
|
|
<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" />
|
|
</controls:SettingsCard>
|
|
</controls:SettingsExpander.Items>
|
|
</controls:SettingsExpander>
|
|
</custom:SettingsGroup>
|
|
</StackPanel>
|
|
</custom:SettingsPageControl.ModuleContent>
|
|
|
|
<custom:SettingsPageControl.PrimaryLinks>
|
|
<custom:PageLink x:Uid="LearnMore_FancyZones" Link="https://aka.ms/PowerToysOverview_FancyZones" />
|
|
</custom:SettingsPageControl.PrimaryLinks>
|
|
</custom:SettingsPageControl>
|
|
</Page> |