2023-05-25 11:10:52 +02:00
<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"
2024-01-12 18:01:40 +01:00
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls"
2023-09-14 18:41:31 +02:00
xmlns:converters="using:CommunityToolkit.WinUI.UI.Converters"
2023-05-25 11:10:52 +02:00
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
2024-01-12 18:01:40 +01:00
xmlns:tkcontrols="using:CommunityToolkit.WinUI.Controls"
2023-09-14 18:41:31 +02:00
xmlns:ui="using:CommunityToolkit.WinUI"
2023-05-25 11:10:52 +02:00
AutomationProperties.LandmarkType="Main"
mc:Ignorable="d">
2023-05-15 23:32:26 +01:00
<Page.Resources>
2023-09-14 18:41:31 +02:00
<converters:BoolToVisibilityConverter x:Key="negativeBoolToVisibilityConverter" />
<converters:BoolToObjectConverter
2023-05-25 11:10:52 +02:00
x:Key="OneRowMatrixBoolToNumberOfRowsConverter"
FalseValue="2"
TrueValue="4" />
2023-05-15 23:32:26 +01:00
</Page.Resources>
2024-01-12 18:01:40 +01:00
<controls:SettingsPageControl x:Uid="MouseWithoutBorders" ModuleImageSource="ms-appx:///Assets/Settings/Modules/MouseWithoutBorders.png">
<controls:SettingsPageControl.ModuleContent>
2023-05-15 23:32:26 +01:00
<StackPanel Orientation="Vertical">
2024-01-12 18:01:40 +01:00
<controls:SettingsGroup x:Uid="MouseWithoutBorders_ActivationSettings">
<tkcontrols:SettingsCard
2023-05-25 11:10:52 +02:00
x:Uid="MouseWithoutBorders_Toggle_Enable"
2024-01-26 17:12:33 +01:00
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/Icons/MouseWithoutBorders.png}"
2024-01-03 16:41:26 +01:00
IsEnabled="{x:Bind ViewModel.IsEnabledGpoConfigured, Mode=OneWay, Converter={StaticResource BoolNegationConverter}}">
2023-05-25 11:10:52 +02:00
<ToggleSwitch
x:Uid="ToggleSwitch"
2024-01-03 16:41:26 +01:00
IsEnabled="{x:Bind ViewModel.CanBeEnabled, Mode=OneWay}"
IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" />
2024-01-12 18:01:40 +01:00
</tkcontrols:SettingsCard>
2023-05-25 11:10:52 +02:00
<InfoBar
2024-01-25 14:59:00 +01:00
x:Uid="GPO_SettingIsManaged"
2023-05-25 11:10:52 +02:00
IsClosable="False"
2024-01-03 16:41:26 +01:00
IsOpen="{x:Bind ViewModel.IsEnabledGpoConfigured, Mode=OneWay}"
IsTabStop="{x:Bind ViewModel.IsEnabledGpoConfigured, Mode=OneWay}"
2025-01-19 15:32:46 +01:00
Severity="Informational">
<InfoBar.IconSource>
<FontIconSource FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="" />
</InfoBar.IconSource>
</InfoBar>
2024-01-12 18:01:40 +01:00
</controls:SettingsGroup>
<controls:SettingsGroup x:Uid="MouseWithoutBorders_KeySettings" IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}">
<tkcontrols:SettingsExpander
2023-05-25 11:10:52 +02:00
x:Name="MouseWithoutBorders_ConnectSettings"
x:Uid="MouseWithoutBorders_SecurityKey"
2023-09-14 18:41:31 +02:00
HeaderIcon="{ui:FontIcon Glyph=}"
2024-01-03 16:41:26 +01:00
IsExpanded="{x:Bind ViewModel.ConnectFieldsVisible, Mode=TwoWay}">
2024-01-12 18:01:40 +01:00
<tkcontrols:SettingsExpander.Items>
<tkcontrols:SettingsCard ContentAlignment="Right">
2023-05-25 11:10:52 +02:00
<StackPanel Orientation="Horizontal" Spacing="8">
<TextBox
x:Name="ConnectSecurityKeyTextBox"
2023-09-14 18:41:31 +02:00
x:Uid="MWB_SecurityKeyLabel"
Width="248" />
2023-05-25 11:10:52 +02:00
<TextBox
x:Name="ConnectPCNameTextBox"
x:Uid="MWB_PCNameLabel"
Width="248" />
<Button
x:Uid="MouseWithoutBorders_Connect"
2024-01-03 16:41:26 +01:00
Command="{x:Bind ConnectCommand, Mode=OneTime}"
2023-05-25 11:10:52 +02:00
Style="{StaticResource AccentButtonStyle}" />
2023-05-15 23:32:26 +01:00
</StackPanel>
2024-01-12 18:01:40 +01:00
</tkcontrols:SettingsCard>
</tkcontrols:SettingsExpander.Items>
2023-05-25 11:10:52 +02:00
<StackPanel Orientation="Horizontal" Spacing="8">
2024-01-03 16:41:26 +01:00
<TextBox IsReadOnly="True" Text="{x:Bind ViewModel.SecurityKey, Mode=TwoWay}" />
2023-05-25 11:10:52 +02:00
<Button
x:Uid="MouseWithoutBorders_NewKey"
2024-01-03 16:41:26 +01:00
Command="{x:Bind GenerateNewKeyCommand, Mode=OneTime}"
2023-05-25 11:10:52 +02:00
Style="{StaticResource AccentButtonStyle}" />
<Button
x:Uid="MouseWithoutBorders_Connect"
2024-01-03 16:41:26 +01:00
Command="{x:Bind ShowConnectFieldsCommand, Mode=OneTime}"
2023-05-25 11:10:52 +02:00
Style="{StaticResource AccentButtonStyle}"
2023-09-14 18:41:31 +02:00
Visibility="{x:Bind Path=ViewModel.ConnectFieldsVisible, Mode=OneWay, Converter={StaticResource negativeBoolToVisibilityConverter}, ConverterParameter=True}" />
2023-05-15 23:32:26 +01:00
</StackPanel>
2024-01-12 18:01:40 +01:00
</tkcontrols:SettingsExpander>
2023-05-25 11:10:52 +02:00
2024-01-12 18:01:40 +01:00
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_ThisMachineNameLabel">
2023-05-25 11:10:52 +02:00
<StackPanel Orientation="Horizontal" Spacing="8">
2023-05-15 23:32:26 +01:00
<TextBlock
2023-05-25 11:10:52 +02:00
VerticalAlignment="Center"
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
IsTextSelectionEnabled="True"
2024-01-03 16:41:26 +01:00
Text="{x:Bind ViewModel.MachineHostName, Mode=OneTime}" />
2023-05-25 11:10:52 +02:00
<Button
Width="32"
Height="32"
Padding="4"
2024-01-03 16:41:26 +01:00
Command="{x:Bind CopyPCNameCommand, Mode=OneTime}"
2023-05-25 11:10:52 +02:00
Content=""
FontFamily="{StaticResource SymbolThemeFontFamily}">
<ToolTipService.ToolTip>
2023-05-31 16:59:15 +01:00
<TextBlock x:Uid="MouseWithoutBorders_CopyMachineName" TextWrapping="Wrap" />
2023-05-25 11:10:52 +02:00
</ToolTipService.ToolTip>
</Button>
</StackPanel>
2024-01-12 18:01:40 +01:00
</tkcontrols:SettingsCard>
</controls:SettingsGroup>
<controls:SettingsGroup x:Uid="MouseWithoutBorders_DeviceLayoutSettings" IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}">
<tkcontrols:SettingsCard
2023-05-25 11:10:52 +02:00
HorizontalContentAlignment="Stretch"
Background="{ThemeResource CardBackgroundFillColorSecondaryBrush}"
ContentAlignment="Vertical">
<StackPanel Orientation="Vertical" Spacing="8">
<ItemsControl
x:Name="DevicesItemsControl"
HorizontalAlignment="Center"
ItemsSource="{Binding MachineMatrixString, Mode=TwoWay}">
2023-05-15 23:32:26 +01:00
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
2023-05-25 11:10:52 +02:00
<WrapGrid MaximumRowsOrColumns="{Binding MatrixOneRow, Mode=OneWay, Converter={StaticResource OneRowMatrixBoolToNumberOfRowsConverter}}" Orientation="Horizontal" />
2023-05-15 23:32:26 +01:00
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
2023-05-25 11:10:52 +02:00
<!-- TODO: colors? -->
<!--
BorderBrush="#DFDFDF"
Background="#d4d4d4"
-->
<!-- Dragging while elevated crashes on WinUI3: https://github.com/microsoft/microsoft-ui-xaml/issues/7690 -->
2023-05-15 23:32:26 +01:00
<Border
2023-05-25 11:10:52 +02:00
Width="136"
Height="90"
Margin="4"
2024-01-03 16:41:26 +01:00
AllowDrop="{Binding Item.CanDragDrop, Mode=OneWay}"
2023-05-25 11:10:52 +02:00
Background="{ThemeResource SolidBackgroundFillColorBaseAltBrush}"
BorderBrush="{Binding Item.StatusBrush}"
2023-09-14 18:41:31 +02:00
BorderThickness="2"
2024-01-03 16:41:26 +01:00
CanDrag="{Binding Item.CanDragDrop, Mode=OneWay}"
2023-05-25 11:10:52 +02:00
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"
2023-05-15 23:32:26 +01:00
VerticalAlignment="Center"
2023-05-25 11:10:52 +02:00
FontSize="32"
Glyph="" />
<TextBlock
Grid.Row="1"
Margin="12"
HorizontalAlignment="Center"
Style="{StaticResource CaptionTextBlockStyle}"
Tag="DeviceName"
Text="{Binding Item.Name}" />
</Grid>
2023-05-15 23:32:26 +01:00
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
2024-01-03 16:41:26 +01:00
<Button HorizontalAlignment="Right" Command="{x:Bind ReconnectCommand, Mode=OneTime}">
2023-05-25 11:10:52 +02:00
<ToolTipService.ToolTip>
2023-09-14 18:41:31 +02:00
<TextBlock x:Uid="MouseWithoutBorders_ReconnectTooltip" TextWrapping="Wrap" />
2023-05-25 11:10:52 +02:00
</ToolTipService.ToolTip>
<TextBlock x:Uid="MouseWithoutBorders_ReconnectButton" />
</Button>
2023-05-15 23:32:26 +01:00
</StackPanel>
2024-01-12 18:01:40 +01:00
</tkcontrols:SettingsCard>
2023-05-25 11:10:52 +02:00
<InfoBar
x:Uid="MouseWithoutBorders_CannotDragDropAsAdmin"
2024-07-17 15:42:22 +02:00
IsClosable="False"
IsOpen="{x:Bind ViewModel.ShowInfobarCannotDragDropAsAdmin, Mode=OneWay}"
IsTabStop="{x:Bind ViewModel.ShowInfobarCannotDragDropAsAdmin, Mode=OneWay}"
2023-05-25 11:10:52 +02:00
Severity="Informational" />
2024-01-12 18:01:40 +01:00
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_MatrixOneRow">
2023-05-25 11:10:52 +02:00
<ToggleSwitch x:Uid="MouseWithoutBorders_MatrixOneRow_ToggleSwitch" IsOn="{x:Bind ViewModel.MatrixOneRow, Mode=TwoWay}" />
2024-01-12 18:01:40 +01:00
</tkcontrols:SettingsCard>
</controls:SettingsGroup>
<controls:SettingsGroup x:Uid="MouseWithoutBorders_ServiceSettings" IsEnabled="{x:Bind ViewModel.CanToggleUseService, Mode=OneWay}">
2025-02-12 18:49:26 +00:00
<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}" />
2024-01-12 18:01:40 +01:00
</tkcontrols:SettingsCard>
2025-02-12 18:49:26 +00:00
<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>
2023-05-15 23:32:26 +01:00
<InfoBar
2023-05-25 11:10:52 +02:00
x:Uid="MouseWithoutBorders_RunAsAdminText"
IsClosable="False"
2024-07-17 15:42:22 +02:00
IsOpen="{x:Bind ViewModel.ShowInfobarRunAsAdminText, Mode=OneWay}"
IsTabStop="{x:Bind ViewModel.ShowInfobarRunAsAdminText, Mode=OneWay}"
2023-05-25 11:10:52 +02:00
Severity="Informational" />
<InfoBar
x:Uid="MouseWithoutBorders_ServiceUserUninstallWarning"
2024-07-17 15:42:22 +02:00
IsClosable="False"
IsOpen="{x:Bind ViewModel.IsEnabled, Mode=OneWay}"
IsTabStop="{x:Bind ViewModel.IsEnabled, Mode=OneWay}"
2023-05-25 11:10:52 +02:00
Severity="Warning" />
2024-01-12 18:01:40 +01:00
<tkcontrols:SettingsCard
2023-05-25 11:10:52 +02:00
x:Uid="MouseWithoutBorders_UninstallService"
2023-09-14 18:41:31 +02:00
ActionIcon="{ui:FontIcon Glyph=}"
2023-05-25 11:10:52 +02:00
Command="{x:Bind ViewModel.UninstallServiceEventHandler}"
2024-01-03 16:41:26 +01:00
IsClickEnabled="{x:Bind ViewModel.CanUninstallService, Mode=OneWay}"
IsEnabled="{x:Bind ViewModel.CanUninstallService, Mode=OneWay}" />
2024-01-12 18:01:40 +01:00
</controls:SettingsGroup>
<controls:SettingsGroup x:Uid="MouseWithoutBorders_Settings" IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}">
2024-07-22 16:49:45 +02:00
<InfoBar
x:Uid="GPO_SomeSettingsAreManaged"
IsClosable="False"
IsOpen="{x:Bind ViewModel.ShowPolicyConfiguredInfoForBehaviorSettings, Mode=OneWay}"
IsTabStop="{x:Bind ViewModel.ShowPolicyConfiguredInfoForBehaviorSettings, Mode=OneWay}"
Severity="Informational">
2025-01-19 15:32:46 +01:00
<InfoBar.IconSource>
<FontIconSource FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="" />
</InfoBar.IconSource>
2024-07-22 16:49:45 +02:00
</InfoBar>
2024-01-12 18:01:40 +01:00
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_WrapMouse">
2023-05-25 11:10:52 +02:00
<ToggleSwitch x:Uid="MouseWithoutBorders_WrapMouse_ToggleSwitch" IsOn="{x:Bind ViewModel.WrapMouse, Mode=TwoWay}" />
2024-01-12 18:01:40 +01:00
</tkcontrols:SettingsCard>
2024-07-22 16:49:45 +02:00
<tkcontrols:SettingsExpander
x:Uid="MouseWithoutBorders_ShareClipboard"
IsEnabled="{x:Bind ViewModel.CardForShareClipboardSettingIsEnabled, Mode=OneWay}"
IsExpanded="True">
2023-05-25 11:10:52 +02:00
<ToggleSwitch x:Uid="MouseWithoutBorders_ShareClipboard_ToggleSwitch" IsOn="{x:Bind ViewModel.ShareClipboard, Mode=TwoWay}" />
2024-07-22 16:49:45 +02:00
<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>
2024-01-12 18:01:40 +01:00
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_HideMouseAtScreenEdge">
2023-05-25 11:10:52 +02:00
<ToggleSwitch x:Uid="MouseWithoutBorders_HideMouseAtScreenEdge_ToggleSwitch" IsOn="{x:Bind ViewModel.HideMouseAtScreenEdge, Mode=TwoWay}" />
2024-01-12 18:01:40 +01:00
</tkcontrols:SettingsCard>
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_DrawMouseCursor">
2023-05-25 11:10:52 +02:00
<ToggleSwitch x:Uid="MouseWithoutBorders_DrawMouseCursor_ToggleSwitch" IsOn="{x:Bind ViewModel.DrawMouseCursor, Mode=TwoWay}" />
2024-01-12 18:01:40 +01:00
</tkcontrols:SettingsCard>
2024-07-22 16:49:45 +02:00
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_ValidateRemoteMachineIP" IsEnabled="{x:Bind ViewModel.CardForValidateRemoteIpSettingIsEnabled, Mode=OneWay}">
2023-05-25 11:10:52 +02:00
<ToggleSwitch x:Uid="MouseWithoutBorders_ValidateRemoteMachineIP_ToggleSwitch" IsOn="{x:Bind ViewModel.ValidateRemoteMachineIP, Mode=TwoWay}" />
2024-01-12 18:01:40 +01:00
</tkcontrols:SettingsCard>
2024-07-22 16:49:45 +02:00
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_SameSubnetOnly" IsEnabled="{x:Bind ViewModel.CardForSameSubnetOnlySettingIsEnabled, Mode=OneWay}">
2023-05-25 11:10:52 +02:00
<ToggleSwitch x:Uid="MouseWithoutBorders_SameSubnetOnly_ToggleSwitch" IsOn="{x:Bind ViewModel.SameSubnetOnly, Mode=TwoWay}" />
2024-01-12 18:01:40 +01:00
</tkcontrols:SettingsCard>
2024-07-22 16:49:45 +02:00
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_BlockScreenSaverOnOtherMachines" IsEnabled="{x:Bind ViewModel.CardForBlockScreensaverSettingIsEnabled, Mode=OneWay}">
2023-05-25 11:10:52 +02:00
<ToggleSwitch x:Uid="MouseWithoutBorders_BlockScreenSaverOnOtherMachines_ToggleSwitch" IsOn="{x:Bind ViewModel.BlockScreenSaverOnOtherMachines, Mode=TwoWay}" />
2024-01-12 18:01:40 +01:00
</tkcontrols:SettingsCard>
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_MoveMouseRelatively">
2023-05-25 11:10:52 +02:00
<ToggleSwitch x:Uid="MouseWithoutBorders_MoveMouseRelatively_ToggleSwitch" IsOn="{x:Bind ViewModel.MoveMouseRelatively, Mode=TwoWay}" />
2024-01-12 18:01:40 +01:00
</tkcontrols:SettingsCard>
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_BlockMouseAtScreenCorners">
2023-05-25 11:10:52 +02:00
<ToggleSwitch x:Uid="MouseWithoutBorders_BlockMouseAtScreenCorners_ToggleSwitch" IsOn="{x:Bind ViewModel.BlockMouseAtScreenCorners, Mode=TwoWay}" />
2024-01-12 18:01:40 +01:00
</tkcontrols:SettingsCard>
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_ShowClipboardAndNetworkStatusMessages">
2023-05-25 11:10:52 +02:00
<ToggleSwitch x:Uid="MouseWithoutBorders_ShowClipboardAndNetworkStatusMessages_ToggleSwitch" IsOn="{x:Bind ViewModel.ShowClipboardAndNetworkStatusMessages, Mode=TwoWay}" />
2024-01-12 18:01:40 +01:00
</tkcontrols:SettingsCard>
</controls:SettingsGroup>
<controls:SettingsGroup x:Uid="MouseWithoutBorders_KeyboardShortcuts_Group" IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}">
2024-07-17 16:21:38 +02:00
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_EasyMouseOption" HeaderIcon="{ui:FontIcon Glyph=}">
2023-05-25 11:10:52 +02:00
<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" />
2023-05-15 23:32:26 +01:00
</ComboBox>
2024-01-12 18:01:40 +01:00
</tkcontrols:SettingsCard>
2023-09-14 18:41:31 +02:00
2024-01-12 18:01:40 +01:00
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_ToggleEasyMouseShortcut" HeaderIcon="{ui:FontIcon Glyph=}">
<controls:ShortcutControl
2023-09-14 18:41:31 +02:00
MinWidth="{StaticResource SettingActionControlMinWidth}"
AllowDisable="True"
HotkeySettings="{x:Bind Path=ViewModel.ToggleEasyMouseShortcut, Mode=TwoWay}" />
2024-01-12 18:01:40 +01:00
</tkcontrols:SettingsCard>
2023-09-14 18:41:31 +02:00
2024-01-12 18:01:40 +01:00
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_LockMachinesShortcut" HeaderIcon="{ui:FontIcon Glyph=}">
<controls:ShortcutControl
2023-09-14 18:41:31 +02:00
MinWidth="{StaticResource SettingActionControlMinWidth}"
AllowDisable="True"
HotkeySettings="{x:Bind Path=ViewModel.LockMachinesShortcut, Mode=TwoWay}" />
2024-01-12 18:01:40 +01:00
</tkcontrols:SettingsCard>
2023-09-14 18:41:31 +02:00
2024-01-12 18:01:40 +01:00
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_Switch2AllPcShortcut" HeaderIcon="{ui:FontIcon Glyph=}">
<controls:ShortcutControl
2023-09-14 18:41:31 +02:00
MinWidth="{StaticResource SettingActionControlMinWidth}"
AllowDisable="True"
HotkeySettings="{x:Bind Path=ViewModel.HotKeySwitch2AllPC, Mode=TwoWay}" />
2024-01-12 18:01:40 +01:00
</tkcontrols:SettingsCard>
2023-09-14 18:41:31 +02:00
2024-01-12 18:01:40 +01:00
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_ReconnectShortcut" HeaderIcon="{ui:FontIcon Glyph=}">
<controls:ShortcutControl
2023-09-14 18:41:31 +02:00
MinWidth="{StaticResource SettingActionControlMinWidth}"
AllowDisable="True"
HotkeySettings="{x:Bind Path=ViewModel.ReconnectShortcut, Mode=TwoWay}" />
2024-01-12 18:01:40 +01:00
</tkcontrols:SettingsCard>
2023-07-26 13:46:41 +02:00
2024-07-17 16:21:38 +02:00
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_SwitchBetweenMachineShortcut" HeaderIcon="{ui:FontIcon Glyph=}">
2023-05-25 11:10:52 +02:00
<ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Path=ViewModel.SelectedSwitchBetweenMachineShortcutOptionsIndex, Mode=TwoWay}">
2023-05-15 23:32:26 +01:00
<!-- These should be in the same order as the array items in MouseWithoutBordersViewModel.cs -->
<ComboBoxItem x:Uid="MouseWithoutBorders_SwitchBetweenMachineShortcut_F1" />
2023-05-25 11:10:52 +02:00
<ComboBoxItem x:Uid="MouseWithoutBorders_SwitchBetweenMachineShortcut_1" />
2023-05-15 23:32:26 +01:00
<ComboBoxItem x:Uid="MouseWithoutBorders_SwitchBetweenMachineShortcut_Disabled" />
</ComboBox>
2024-01-12 18:01:40 +01:00
</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>
2024-07-22 16:49:45 +02:00
<tkcontrols:SettingsCard
HorizontalContentAlignment="Stretch"
ContentAlignment="Vertical"
IsEnabled="{x:Bind ViewModel.CardForName2IpSettingIsEnabled, Mode=OneWay}">
2023-05-25 16:55:11 +02:00
<TextBox
2023-09-14 18:41:31 +02:00
x:Uid="MouseWithoutBorders_IPAddressMapping_TextBoxControl"
MinWidth="240"
MinHeight="160"
2024-07-22 16:49:45 +02:00
MaxHeight="480"
2023-09-14 18:41:31 +02:00
AcceptsReturn="True"
ScrollViewer.IsVerticalRailEnabled="True"
ScrollViewer.VerticalScrollBarVisibility="Visible"
ScrollViewer.VerticalScrollMode="Enabled"
2024-01-03 16:41:26 +01:00
Text="{x:Bind ViewModel.Name2IP, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
2023-09-14 18:41:31 +02:00
TextWrapping="Wrap" />
2024-01-12 18:01:40 +01:00
</tkcontrols:SettingsCard>
2024-07-22 16:49:45 +02:00
<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">
2025-01-19 15:32:46 +01:00
<InfoBar.IconSource>
<FontIconSource FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="" />
</InfoBar.IconSource>
2024-07-22 16:49:45 +02:00
</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>
2024-01-12 18:01:40 +01:00
</tkcontrols:SettingsExpander.Items>
</tkcontrols:SettingsExpander>
</controls:SettingsGroup>
<controls:SettingsGroup x:Uid="MouseWithoutBorders_TroubleShooting" IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}">
<tkcontrols:SettingsCard
2023-05-25 11:10:52 +02:00
x:Uid="MouseWithoutBorders_AddFirewallRuleButtonControl"
2023-09-14 18:41:31 +02:00
ActionIcon="{ui:FontIcon Glyph=}"
2023-05-25 11:10:52 +02:00
Command="{x:Bind ViewModel.AddFirewallRuleEventHandler}"
IsClickEnabled="True" />
2024-07-22 16:49:45 +02:00
<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}" />
2024-01-12 18:01:40 +01:00
</tkcontrols:SettingsCard>
2024-07-22 16:49:45 +02:00
<InfoBar
x:Uid="GPO_SettingIsManaged"
IsClosable="False"
IsOpen="{x:Bind ViewModel.ShowPolicyConfiguredInfoForOriginalUiSetting, Mode=OneWay}"
IsTabStop="{x:Bind ViewModel.ShowPolicyConfiguredInfoForOriginalUiSetting, Mode=OneWay}"
Severity="Informational">
2025-01-19 15:32:46 +01:00
<InfoBar.IconSource>
2024-07-22 16:49:45 +02:00
<FontIconSource FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="" />
2025-01-19 15:32:46 +01:00
</InfoBar.IconSource>
2024-07-22 16:49:45 +02:00
</InfoBar>
2024-01-12 18:01:40 +01:00
</controls:SettingsGroup>
2023-05-15 23:32:26 +01:00
</StackPanel>
2024-01-12 18:01:40 +01:00
</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>
2023-05-15 23:32:26 +01:00
</Page>