mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 18:57:19 +02:00
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request This PR adds a new feature to Easy Mouse, it is now possible to toggle a setting that will prevent Easy Mouse to switch away from the host machine when the foreground application is running in full screen mode, requiring the user to first alt tab out of the application before performing the switch, this also comes with a way to allow the switch on specific apps.  <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] **Closes:** #32197 - [x] **Communication:** I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [x] **Localization:** All end user facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [x] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: MicrosoftDocs/windows-dev-docs#5470 <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments This PR changes the way Easy Mouse checks wherever it should move to another machine, after checking that the corresponding setting is enabled and that we are trying to move away from the host machine, it will run a test using native WinAPI methods to get the foreground window and check if it is running in full screen. If it is, it will then check the name of the executable against a list of ignored app configured by the user, if the executable is found in that list, the switch will be allowed despite the application running in full screen. These new settings were moved along with the original Easy Mouse toggle to a new "Easy Mouse" setting group to avoid cluttering the Keyboard shortcuts group. This feature will only work when used from the controller machine, as I didn't find a way to easily check for running application on a remote machine that didn't involved touching the sockets, I felt like such a change would be out of scope for this issue. <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed I had a hard time writing tests and didn't achieve anything meaningful enough to be included, I may require some guidance on how to properly write tests for this project. I tested my changes by running my modified version of MouseWithoutBorders on my machines, which I did for a few days now, It allowed me to catch a few bugs, but it has been running smoothly otherwise. My changes didn't seemed to have caused any automated tests to fail. It may require some additional testing for setups including more than two machines. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Kai Tao (from Dev Box) <kaitao@microsoft.com> Co-authored-by: Niels Laute <niels.laute@live.nl> Co-authored-by: Gordon Lam (SH) <yeelam@microsoft.com>
464 lines
33 KiB
XML
464 lines
33 KiB
XML
<Page
|
|
x:Class="Microsoft.PowerToys.Settings.UI.Views.MouseWithoutBordersPage"
|
|
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:CommunityToolkit.WinUI.UI.Converters"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:tkcontrols="using:CommunityToolkit.WinUI.Controls"
|
|
xmlns:ui="using:CommunityToolkit.WinUI"
|
|
AutomationProperties.LandmarkType="Main"
|
|
mc:Ignorable="d">
|
|
<Page.Resources>
|
|
<converters:BoolToObjectConverter
|
|
x:Key="OneRowMatrixBoolToNumberOfRowsConverter"
|
|
FalseValue="2"
|
|
TrueValue="4" />
|
|
</Page.Resources>
|
|
<controls:SettingsPageControl x:Uid="MouseWithoutBorders" ModuleImageSource="ms-appx:///Assets/Settings/Modules/MouseWithoutBorders.png">
|
|
<controls:SettingsPageControl.ModuleContent>
|
|
<StackPanel Orientation="Vertical">
|
|
<controls:SettingsGroup x:Uid="MouseWithoutBorders_ActivationSettings">
|
|
<tkcontrols:SettingsCard
|
|
x:Uid="MouseWithoutBorders_Toggle_Enable"
|
|
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/Icons/MouseWithoutBorders.png}"
|
|
IsEnabled="{x:Bind ViewModel.IsEnabledGpoConfigured, Mode=OneWay, Converter={StaticResource BoolNegationConverter}}">
|
|
<ToggleSwitch
|
|
x:Uid="ToggleSwitch"
|
|
IsEnabled="{x:Bind ViewModel.CanBeEnabled, Mode=OneWay}"
|
|
IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" />
|
|
</tkcontrols:SettingsCard>
|
|
<InfoBar
|
|
x:Uid="GPO_SettingIsManaged"
|
|
IsClosable="False"
|
|
IsOpen="{x:Bind ViewModel.IsEnabledGpoConfigured, Mode=OneWay}"
|
|
IsTabStop="{x:Bind ViewModel.IsEnabledGpoConfigured, Mode=OneWay}"
|
|
Severity="Informational">
|
|
<InfoBar.IconSource>
|
|
<FontIconSource FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="" />
|
|
</InfoBar.IconSource>
|
|
</InfoBar>
|
|
</controls:SettingsGroup>
|
|
<controls:SettingsGroup x:Uid="MouseWithoutBorders_KeySettings" IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}">
|
|
<tkcontrols:SettingsExpander
|
|
x:Name="MouseWithoutBorders_ConnectSettings"
|
|
x:Uid="MouseWithoutBorders_SecurityKey"
|
|
HeaderIcon="{ui:FontIcon Glyph=}"
|
|
IsExpanded="{x:Bind ViewModel.ConnectFieldsVisible, Mode=TwoWay}">
|
|
<tkcontrols:SettingsExpander.Items>
|
|
<tkcontrols:SettingsCard ContentAlignment="Right">
|
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
|
<TextBox
|
|
x:Name="ConnectSecurityKeyTextBox"
|
|
x:Uid="MWB_SecurityKeyLabel"
|
|
Width="248" />
|
|
<TextBox
|
|
x:Name="ConnectPCNameTextBox"
|
|
x:Uid="MWB_PCNameLabel"
|
|
Width="248" />
|
|
<Button
|
|
x:Uid="MouseWithoutBorders_Connect"
|
|
Command="{x:Bind ConnectCommand, Mode=OneTime}"
|
|
Style="{StaticResource AccentButtonStyle}" />
|
|
</StackPanel>
|
|
</tkcontrols:SettingsCard>
|
|
</tkcontrols:SettingsExpander.Items>
|
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
|
<TextBox IsReadOnly="True" Text="{x:Bind ViewModel.SecurityKey, Mode=TwoWay}" />
|
|
<Button
|
|
x:Uid="MouseWithoutBorders_NewKey"
|
|
Command="{x:Bind GenerateNewKeyCommand, Mode=OneTime}"
|
|
Style="{StaticResource AccentButtonStyle}" />
|
|
<Button
|
|
x:Uid="MouseWithoutBorders_Connect"
|
|
Command="{x:Bind ShowConnectFieldsCommand, Mode=OneTime}"
|
|
Style="{StaticResource AccentButtonStyle}"
|
|
Visibility="{x:Bind Path=ViewModel.ConnectFieldsVisible, Mode=OneWay, Converter={StaticResource ReverseBoolToVisibilityConverter}, ConverterParameter=True}" />
|
|
</StackPanel>
|
|
</tkcontrols:SettingsExpander>
|
|
|
|
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_ThisMachineNameLabel">
|
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
|
IsTextSelectionEnabled="True"
|
|
Text="{x:Bind ViewModel.MachineHostName, Mode=OneTime}" />
|
|
<Button
|
|
Width="32"
|
|
Height="32"
|
|
Padding="4"
|
|
Command="{x:Bind CopyPCNameCommand, Mode=OneTime}"
|
|
Content=""
|
|
FontFamily="{StaticResource SymbolThemeFontFamily}">
|
|
<ToolTipService.ToolTip>
|
|
<TextBlock x:Uid="MouseWithoutBorders_CopyMachineName" TextWrapping="Wrap" />
|
|
</ToolTipService.ToolTip>
|
|
</Button>
|
|
</StackPanel>
|
|
</tkcontrols:SettingsCard>
|
|
</controls:SettingsGroup>
|
|
<controls:SettingsGroup x:Uid="MouseWithoutBorders_DeviceLayoutSettings" IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}">
|
|
<tkcontrols:SettingsCard
|
|
HorizontalContentAlignment="Stretch"
|
|
Background="{ThemeResource CardBackgroundFillColorSecondaryBrush}"
|
|
ContentAlignment="Vertical">
|
|
<StackPanel Orientation="Vertical" Spacing="8">
|
|
<ItemsControl
|
|
x:Name="DevicesItemsControl"
|
|
HorizontalAlignment="Center"
|
|
ItemsSource="{Binding MachineMatrixString, Mode=TwoWay}">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<WrapGrid MaximumRowsOrColumns="{Binding MatrixOneRow, Mode=OneWay, Converter={StaticResource OneRowMatrixBoolToNumberOfRowsConverter}}" Orientation="Horizontal" />
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<!-- TODO: colors? -->
|
|
<!--
|
|
BorderBrush="#DFDFDF"
|
|
Background="#d4d4d4"
|
|
-->
|
|
<!-- Dragging while elevated crashes on WinUI3: https://github.com/microsoft/microsoft-ui-xaml/issues/7690 -->
|
|
<Border
|
|
Width="136"
|
|
Height="90"
|
|
Margin="4"
|
|
AllowDrop="{Binding Item.CanDragDrop, Mode=OneWay}"
|
|
Background="{ThemeResource SolidBackgroundFillColorBaseAltBrush}"
|
|
BorderBrush="{Binding Item.StatusBrush}"
|
|
BorderThickness="2"
|
|
CanDrag="{Binding Item.CanDragDrop, Mode=OneWay}"
|
|
CornerRadius="4"
|
|
DataContext="{Binding}"
|
|
DragOver="Device_DragOver"
|
|
DragStarting="Device_DragStarting"
|
|
Drop="Device_Drop"
|
|
ToolTipService.ToolTip="{Binding Item.Name, Mode=OneWay}">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<FontIcon
|
|
Margin="0,12,0,0"
|
|
VerticalAlignment="Center"
|
|
FontSize="32"
|
|
Glyph="" />
|
|
<TextBlock
|
|
Grid.Row="1"
|
|
Margin="12"
|
|
HorizontalAlignment="Center"
|
|
Style="{StaticResource CaptionTextBlockStyle}"
|
|
Tag="DeviceName"
|
|
Text="{Binding Item.Name}" />
|
|
</Grid>
|
|
</Border>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
<Button HorizontalAlignment="Right" Command="{x:Bind ReconnectCommand, Mode=OneTime}">
|
|
<ToolTipService.ToolTip>
|
|
<TextBlock x:Uid="MouseWithoutBorders_ReconnectTooltip" TextWrapping="Wrap" />
|
|
</ToolTipService.ToolTip>
|
|
<TextBlock x:Uid="MouseWithoutBorders_ReconnectButton" />
|
|
</Button>
|
|
|
|
|
|
</StackPanel>
|
|
</tkcontrols:SettingsCard>
|
|
|
|
<InfoBar
|
|
x:Uid="MouseWithoutBorders_CannotDragDropAsAdmin"
|
|
IsClosable="False"
|
|
IsOpen="{x:Bind ViewModel.ShowInfobarCannotDragDropAsAdmin, Mode=OneWay}"
|
|
IsTabStop="{x:Bind ViewModel.ShowInfobarCannotDragDropAsAdmin, Mode=OneWay}"
|
|
Severity="Informational" />
|
|
|
|
|
|
|
|
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_MatrixOneRow">
|
|
<ToggleSwitch x:Uid="MouseWithoutBorders_MatrixOneRow_ToggleSwitch" IsOn="{x:Bind ViewModel.MatrixOneRow, Mode=TwoWay}" />
|
|
</tkcontrols:SettingsCard>
|
|
</controls:SettingsGroup>
|
|
<controls:SettingsGroup x:Uid="MouseWithoutBorders_ServiceSettings" IsEnabled="{x:Bind ViewModel.CanToggleUseService, Mode=OneWay}">
|
|
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_UseService" IsEnabled="{x:Bind ViewModel.UseServiceSettingIsEnabled, Mode=OneWay}">
|
|
<ToggleSwitch x:Uid="MouseWithoutBorders_UseService_ToggleSwitch" IsOn="{x:Bind ViewModel.UseService, Mode=TwoWay}" />
|
|
</tkcontrols:SettingsCard>
|
|
<InfoBar
|
|
x:Uid="GPO_SettingIsManaged"
|
|
IsClosable="False"
|
|
IsOpen="{x:Bind ViewModel.ShowPolicyConfiguredInfoForServiceSettings, Mode=OneWay}"
|
|
IsTabStop="{x:Bind ViewModel.ShowPolicyConfiguredInfoForServiceSettings, Mode=OneWay}"
|
|
Severity="Informational">
|
|
<InfoBar.IconSource>
|
|
<FontIconSource FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="" />
|
|
</InfoBar.IconSource>
|
|
</InfoBar>
|
|
<InfoBar
|
|
x:Uid="MouseWithoutBorders_RunAsAdminText"
|
|
IsClosable="False"
|
|
IsOpen="{x:Bind ViewModel.ShowInfobarRunAsAdminText, Mode=OneWay}"
|
|
IsTabStop="{x:Bind ViewModel.ShowInfobarRunAsAdminText, Mode=OneWay}"
|
|
Severity="Informational" />
|
|
<InfoBar
|
|
x:Uid="MouseWithoutBorders_ServiceUserUninstallWarning"
|
|
IsClosable="False"
|
|
IsOpen="{x:Bind ViewModel.IsEnabled, Mode=OneWay}"
|
|
IsTabStop="{x:Bind ViewModel.IsEnabled, Mode=OneWay}"
|
|
Severity="Warning" />
|
|
<tkcontrols:SettingsCard
|
|
x:Uid="MouseWithoutBorders_UninstallService"
|
|
ActionIcon="{ui:FontIcon Glyph=}"
|
|
Command="{x:Bind ViewModel.UninstallServiceEventHandler}"
|
|
IsClickEnabled="{x:Bind ViewModel.CanUninstallService, Mode=OneWay}"
|
|
IsEnabled="{x:Bind ViewModel.CanUninstallService, Mode=OneWay}" />
|
|
</controls:SettingsGroup>
|
|
<controls:SettingsGroup x:Uid="MouseWithoutBorders_Settings" IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}">
|
|
<InfoBar
|
|
x:Uid="GPO_SomeSettingsAreManaged"
|
|
IsClosable="False"
|
|
IsOpen="{x:Bind ViewModel.ShowPolicyConfiguredInfoForBehaviorSettings, Mode=OneWay}"
|
|
IsTabStop="{x:Bind ViewModel.ShowPolicyConfiguredInfoForBehaviorSettings, Mode=OneWay}"
|
|
Severity="Informational">
|
|
<InfoBar.IconSource>
|
|
<FontIconSource FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="" />
|
|
</InfoBar.IconSource>
|
|
</InfoBar>
|
|
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_WrapMouse">
|
|
<ToggleSwitch x:Uid="MouseWithoutBorders_WrapMouse_ToggleSwitch" IsOn="{x:Bind ViewModel.WrapMouse, Mode=TwoWay}" />
|
|
</tkcontrols:SettingsCard>
|
|
<tkcontrols:SettingsExpander
|
|
x:Uid="MouseWithoutBorders_ShareClipboard"
|
|
IsEnabled="{x:Bind ViewModel.CardForShareClipboardSettingIsEnabled, Mode=OneWay}"
|
|
IsExpanded="True">
|
|
<ToggleSwitch x:Uid="MouseWithoutBorders_ShareClipboard_ToggleSwitch" IsOn="{x:Bind ViewModel.ShareClipboard, Mode=TwoWay}" />
|
|
<tkcontrols:SettingsExpander.Items>
|
|
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_TransferFile" IsEnabled="{x:Bind ViewModel.CardForTransferFileSettingIsEnabled, Mode=OneWay}">
|
|
<ToggleSwitch x:Uid="MouseWithoutBorders_TransferFile_ToggleSwitch" IsOn="{x:Bind ViewModel.TransferFile, Mode=TwoWay}" />
|
|
</tkcontrols:SettingsCard>
|
|
</tkcontrols:SettingsExpander.Items>
|
|
</tkcontrols:SettingsExpander>
|
|
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_HideMouseAtScreenEdge">
|
|
<ToggleSwitch x:Uid="MouseWithoutBorders_HideMouseAtScreenEdge_ToggleSwitch" IsOn="{x:Bind ViewModel.HideMouseAtScreenEdge, Mode=TwoWay}" />
|
|
</tkcontrols:SettingsCard>
|
|
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_DrawMouseCursor">
|
|
<ToggleSwitch x:Uid="MouseWithoutBorders_DrawMouseCursor_ToggleSwitch" IsOn="{x:Bind ViewModel.DrawMouseCursor, Mode=TwoWay}" />
|
|
</tkcontrols:SettingsCard>
|
|
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_ValidateRemoteMachineIP" IsEnabled="{x:Bind ViewModel.CardForValidateRemoteIpSettingIsEnabled, Mode=OneWay}">
|
|
<ToggleSwitch x:Uid="MouseWithoutBorders_ValidateRemoteMachineIP_ToggleSwitch" IsOn="{x:Bind ViewModel.ValidateRemoteMachineIP, Mode=TwoWay}" />
|
|
</tkcontrols:SettingsCard>
|
|
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_SameSubnetOnly" IsEnabled="{x:Bind ViewModel.CardForSameSubnetOnlySettingIsEnabled, Mode=OneWay}">
|
|
<ToggleSwitch x:Uid="MouseWithoutBorders_SameSubnetOnly_ToggleSwitch" IsOn="{x:Bind ViewModel.SameSubnetOnly, Mode=TwoWay}" />
|
|
</tkcontrols:SettingsCard>
|
|
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_BlockScreenSaverOnOtherMachines" IsEnabled="{x:Bind ViewModel.CardForBlockScreensaverSettingIsEnabled, Mode=OneWay}">
|
|
<ToggleSwitch x:Uid="MouseWithoutBorders_BlockScreenSaverOnOtherMachines_ToggleSwitch" IsOn="{x:Bind ViewModel.BlockScreenSaverOnOtherMachines, Mode=TwoWay}" />
|
|
</tkcontrols:SettingsCard>
|
|
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_MoveMouseRelatively">
|
|
<ToggleSwitch x:Uid="MouseWithoutBorders_MoveMouseRelatively_ToggleSwitch" IsOn="{x:Bind ViewModel.MoveMouseRelatively, Mode=TwoWay}" />
|
|
</tkcontrols:SettingsCard>
|
|
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_BlockMouseAtScreenCorners">
|
|
<ToggleSwitch x:Uid="MouseWithoutBorders_BlockMouseAtScreenCorners_ToggleSwitch" IsOn="{x:Bind ViewModel.BlockMouseAtScreenCorners, Mode=TwoWay}" />
|
|
</tkcontrols:SettingsCard>
|
|
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_ShowClipboardAndNetworkStatusMessages">
|
|
<ToggleSwitch x:Uid="MouseWithoutBorders_ShowClipboardAndNetworkStatusMessages_ToggleSwitch" IsOn="{x:Bind ViewModel.ShowClipboardAndNetworkStatusMessages, Mode=TwoWay}" />
|
|
</tkcontrols:SettingsCard>
|
|
</controls:SettingsGroup>
|
|
|
|
<controls:SettingsGroup x:Uid="MouseWithoutBorders_EasyMouseSettings_Group" IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}">
|
|
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_EasyMouseOption" HeaderIcon="{ui:FontIcon Glyph=}">
|
|
<ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Path=ViewModel.EasyMouseOptionIndex, Mode=TwoWay}">
|
|
<ComboBoxItem x:Uid="MouseWithoutBorders_EasyMouseOption_Disabled" />
|
|
<ComboBoxItem x:Uid="MouseWithoutBorders_EasyMouseOption_Enabled" />
|
|
<ComboBoxItem x:Uid="MouseWithoutBorders_EasyMouseOption_Ctrl" />
|
|
<ComboBoxItem x:Uid="MouseWithoutBorders_EasyMouseOption_Shift" />
|
|
</ComboBox>
|
|
</tkcontrols:SettingsCard>
|
|
<tkcontrols:SettingsCard
|
|
x:Uid="MouseWithoutBorders_DisableEasyMouseWhenForegroundWindowIsFullscreen"
|
|
HeaderIcon="{ui:FontIcon Glyph=}"
|
|
IsEnabled="{x:Bind ViewModel.EasyMouseEnabled, Mode=OneWay}">
|
|
<ToggleSwitch x:Uid="MouseWithoutBorders_DisableEasyMouseWhenForegroundWindowIsFullscreen_ToggleSwitch" IsOn="{x:Bind ViewModel.DisableEasyMouseWhenForegroundWindowIsFullscreen, Mode=TwoWay}" />
|
|
</tkcontrols:SettingsCard>
|
|
|
|
<InfoBar
|
|
x:Uid="MouseWithoutBorders_CanOnlyStopEasyMouseIfMovingFromHostMachine"
|
|
IsClosable="False"
|
|
IsOpen="True"
|
|
Severity="Informational" />
|
|
|
|
<tkcontrols:SettingsExpander
|
|
x:Uid="MouseWithoutBorders_DisableEasyMouseWhenForegroundWindowIsFullscreen_Expander"
|
|
HeaderIcon="{ui:FontIcon Glyph=}"
|
|
IsEnabled="{x:Bind ViewModel.IsEasyMouseBlockingOnFullscreenEnabled, Mode=OneWay}"
|
|
IsExpanded="False">
|
|
<tkcontrols:SettingsExpander.Items>
|
|
<tkcontrols:SettingsCard
|
|
x:Uid="MouseWithoutBorders_DisableEasyMouseWhenForegroundWindowIsFullscreen_ExcludedApps"
|
|
HorizontalContentAlignment="Stretch"
|
|
ContentAlignment="Vertical">
|
|
<TextBox
|
|
x:Uid="MouseWithoutBorders_DisableEasyMouseWhenForegroundWindowIsFullscreen_TextBoxControl"
|
|
MinWidth="240"
|
|
MinHeight="160"
|
|
AcceptsReturn="True"
|
|
IsSpellCheckEnabled="False"
|
|
ScrollViewer.IsVerticalRailEnabled="True"
|
|
ScrollViewer.VerticalScrollBarVisibility="Visible"
|
|
ScrollViewer.VerticalScrollMode="Enabled"
|
|
Text="{x:Bind ViewModel.EasyMouseFullscreenSwitchBlockExcludedApps, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
TextWrapping="Wrap" />
|
|
</tkcontrols:SettingsCard>
|
|
</tkcontrols:SettingsExpander.Items>
|
|
</tkcontrols:SettingsExpander>
|
|
</controls:SettingsGroup>
|
|
|
|
<controls:SettingsGroup x:Uid="MouseWithoutBorders_KeyboardShortcuts_Group" IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}">
|
|
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_ToggleEasyMouseShortcut" HeaderIcon="{ui:FontIcon Glyph=}">
|
|
<controls:ShortcutControl
|
|
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
|
AllowDisable="True"
|
|
HotkeySettings="{x:Bind Path=ViewModel.ToggleEasyMouseShortcut, Mode=TwoWay}" />
|
|
</tkcontrols:SettingsCard>
|
|
|
|
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_LockMachinesShortcut" HeaderIcon="{ui:FontIcon Glyph=}">
|
|
<controls:ShortcutControl
|
|
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
|
AllowDisable="True"
|
|
HotkeySettings="{x:Bind Path=ViewModel.LockMachinesShortcut, Mode=TwoWay}" />
|
|
</tkcontrols:SettingsCard>
|
|
|
|
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_Switch2AllPcShortcut" HeaderIcon="{ui:FontIcon Glyph=}">
|
|
<controls:ShortcutControl
|
|
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
|
AllowDisable="True"
|
|
HotkeySettings="{x:Bind Path=ViewModel.HotKeySwitch2AllPC, Mode=TwoWay}" />
|
|
</tkcontrols:SettingsCard>
|
|
|
|
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_ReconnectShortcut" HeaderIcon="{ui:FontIcon Glyph=}">
|
|
<controls:ShortcutControl
|
|
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
|
AllowDisable="True"
|
|
HotkeySettings="{x:Bind Path=ViewModel.ReconnectShortcut, Mode=TwoWay}" />
|
|
</tkcontrols:SettingsCard>
|
|
|
|
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_SwitchBetweenMachineShortcut" HeaderIcon="{ui:FontIcon Glyph=}">
|
|
<ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Path=ViewModel.SelectedSwitchBetweenMachineShortcutOptionsIndex, Mode=TwoWay}">
|
|
<!-- These should be in the same order as the array items in MouseWithoutBordersViewModel.cs -->
|
|
<ComboBoxItem x:Uid="MouseWithoutBorders_SwitchBetweenMachineShortcut_F1" />
|
|
<ComboBoxItem x:Uid="MouseWithoutBorders_SwitchBetweenMachineShortcut_1" />
|
|
<ComboBoxItem x:Uid="MouseWithoutBorders_SwitchBetweenMachineShortcut_Disabled" />
|
|
</ComboBox>
|
|
</tkcontrols:SettingsCard>
|
|
</controls:SettingsGroup>
|
|
<controls:SettingsGroup x:Uid="MouseWithoutBorders_AdvancedSettings_Group" IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}">
|
|
<tkcontrols:SettingsExpander x:Uid="MouseWithoutBorders_IPAddressMapping" IsExpanded="True">
|
|
<tkcontrols:SettingsExpander.Items>
|
|
<tkcontrols:SettingsCard
|
|
HorizontalContentAlignment="Stretch"
|
|
ContentAlignment="Vertical"
|
|
IsEnabled="{x:Bind ViewModel.CardForName2IpSettingIsEnabled, Mode=OneWay}">
|
|
<TextBox
|
|
x:Uid="MouseWithoutBorders_IPAddressMapping_TextBoxControl"
|
|
MinWidth="240"
|
|
MinHeight="160"
|
|
MaxHeight="480"
|
|
AcceptsReturn="True"
|
|
ScrollViewer.IsVerticalRailEnabled="True"
|
|
ScrollViewer.VerticalScrollBarVisibility="Visible"
|
|
ScrollViewer.VerticalScrollMode="Enabled"
|
|
Text="{x:Bind ViewModel.Name2IP, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
TextWrapping="Wrap" />
|
|
</tkcontrols:SettingsCard>
|
|
<tkcontrols:SettingsCard
|
|
Padding="0"
|
|
HorizontalContentAlignment="Stretch"
|
|
Background="{ThemeResource InfoBarInformationalSeverityBackgroundBrush}"
|
|
ContentAlignment="Vertical"
|
|
Visibility="{x:Bind ViewModel.ShowPolicyConfiguredInfoForName2IPSetting, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}">
|
|
<InfoBar
|
|
x:Uid="GPO_SettingIsManaged"
|
|
Background="Transparent"
|
|
BorderBrush="Transparent"
|
|
IsClosable="False"
|
|
IsOpen="True"
|
|
IsTabStop="{x:Bind ViewModel.ShowPolicyConfiguredInfoForName2IPSetting, Mode=OneWay}"
|
|
Severity="Informational">
|
|
<InfoBar.IconSource>
|
|
<FontIconSource FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="" />
|
|
</InfoBar.IconSource>
|
|
</InfoBar>
|
|
</tkcontrols:SettingsCard>
|
|
<tkcontrols:SettingsCard
|
|
Margin="0,1,0,0"
|
|
Padding="0"
|
|
HorizontalContentAlignment="Stretch"
|
|
Background="{ThemeResource InfoBarInformationalSeverityBackgroundBrush}"
|
|
ContentAlignment="Vertical"
|
|
Visibility="{x:Bind ViewModel.Name2IpListPolicyIsConfigured, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}">
|
|
<InfoBar
|
|
x:Uid="MouseWithoutBorders_PolicyIPAddressMappingInfo"
|
|
Background="Transparent"
|
|
BorderBrush="Transparent"
|
|
IsClosable="False"
|
|
IsOpen="True"
|
|
IsTabStop="{x:Bind ViewModel.Name2IpListPolicyIsConfigured, Mode=OneWay}"
|
|
Severity="Informational">
|
|
<InfoBar.IconSource>
|
|
<FontIconSource FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="" />
|
|
</InfoBar.IconSource>
|
|
<InfoBar.Content>
|
|
<TextBox
|
|
x:Uid="MouseWithoutBorders_PolicyIPAddressMappingInfo_TextBoxControl"
|
|
MinWidth="240"
|
|
MinHeight="80"
|
|
MaxHeight="160"
|
|
Margin="0,0,44,16"
|
|
AcceptsReturn="True"
|
|
IsReadOnly="True"
|
|
ScrollViewer.IsVerticalRailEnabled="True"
|
|
ScrollViewer.VerticalScrollBarVisibility="Visible"
|
|
ScrollViewer.VerticalScrollMode="Enabled"
|
|
Text="{x:Bind ViewModel.Name2IpListPolicyData, Mode=OneWay}"
|
|
TextWrapping="Wrap" />
|
|
</InfoBar.Content>
|
|
</InfoBar>
|
|
</tkcontrols:SettingsCard>
|
|
</tkcontrols:SettingsExpander.Items>
|
|
</tkcontrols:SettingsExpander>
|
|
</controls:SettingsGroup>
|
|
<controls:SettingsGroup x:Uid="MouseWithoutBorders_TroubleShooting" IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}">
|
|
<tkcontrols:SettingsCard
|
|
x:Uid="MouseWithoutBorders_AddFirewallRuleButtonControl"
|
|
ActionIcon="{ui:FontIcon Glyph=}"
|
|
Command="{x:Bind ViewModel.AddFirewallRuleEventHandler}"
|
|
IsClickEnabled="True" />
|
|
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_ShowOriginalUI" IsEnabled="{x:Bind ViewModel.CardForOriginalUiSettingIsEnabled, Mode=OneWay}">
|
|
<ToggleSwitch x:Uid="MouseWithoutBorders_ShowOriginalUI_ToggleSwitch" IsOn="{x:Bind ViewModel.ShowOriginalUI, Mode=TwoWay}" />
|
|
</tkcontrols:SettingsCard>
|
|
<InfoBar
|
|
x:Uid="GPO_SettingIsManaged"
|
|
IsClosable="False"
|
|
IsOpen="{x:Bind ViewModel.ShowPolicyConfiguredInfoForOriginalUiSetting, Mode=OneWay}"
|
|
IsTabStop="{x:Bind ViewModel.ShowPolicyConfiguredInfoForOriginalUiSetting, Mode=OneWay}"
|
|
Severity="Informational">
|
|
<InfoBar.IconSource>
|
|
<FontIconSource FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="" />
|
|
</InfoBar.IconSource>
|
|
</InfoBar>
|
|
</controls:SettingsGroup>
|
|
</StackPanel>
|
|
</controls:SettingsPageControl.ModuleContent>
|
|
<controls:SettingsPageControl.PrimaryLinks>
|
|
<controls:PageLink x:Uid="LearnMore_MouseWithoutBorders" Link="https://aka.ms/PowerToysOverview_MouseWithoutBorders" />
|
|
</controls:SettingsPageControl.PrimaryLinks>
|
|
<controls:SettingsPageControl.SecondaryLinks>
|
|
<controls:PageLink Link="http://aka.ms/mm" Text="Mouse without Borders" />
|
|
<controls:PageLink Link="https://github.com/microsoft/PowerToys/blob/main/COMMUNITY.md#mouse-without-borders-original-contributors" Text="Truong Do (Đỗ Đức Trường) and other original contributors" />
|
|
</controls:SettingsPageControl.SecondaryLinks>
|
|
</controls:SettingsPageControl>
|
|
</Page>
|