[Dev]Consolidate XAML Namespaces (#30728)

* xmlns CommunityToolkit.WinUI.UI.Controls

* remove unneeded tk7controls

* xmlns CommunityToolkit.WinUI.Controls

* xmlns Microsoft.PowerToys.Settings.UI.Converters

* remove unneeded Microsoft.PowerToys.Settings.UI.OOBE.Views

* xmlns Microsoft.PowerToys.Settings.UI.Controls

* xmlns CommunityToolkit.WinUI.Converters

* remove unneeded "controls"

* xmlns Microsoft.PowerToys.Settings.UI.Controls

* remove unneeded "controls"

* change WinUI.UI to WinUI

* Styler

* fixes

* Styler

* fixes

* fixes

* Update expect and MainPage
This commit is contained in:
Jay
2024-01-12 18:01:40 +01:00
committed by GitHub
parent 30402d5d35
commit d2d9cc6bff
74 changed files with 1560 additions and 1602 deletions

View File

@@ -2,11 +2,11 @@
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:CommunityToolkit.WinUI.Controls"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:converters="using:CommunityToolkit.WinUI.UI.Converters"
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:tkcontrols="using:CommunityToolkit.WinUI.Controls"
xmlns:ui="using:CommunityToolkit.WinUI"
AutomationProperties.LandmarkType="Main"
mc:Ignorable="d">
@@ -17,11 +17,11 @@
FalseValue="2"
TrueValue="4" />
</Page.Resources>
<custom:SettingsPageControl x:Uid="MouseWithoutBorders" ModuleImageSource="ms-appx:///Assets/Settings/Modules/MouseWithoutBorders.png">
<custom:SettingsPageControl.ModuleContent>
<controls:SettingsPageControl x:Uid="MouseWithoutBorders" ModuleImageSource="ms-appx:///Assets/Settings/Modules/MouseWithoutBorders.png">
<controls:SettingsPageControl.ModuleContent>
<StackPanel Orientation="Vertical">
<custom:SettingsGroup x:Uid="MouseWithoutBorders_ActivationSettings">
<controls:SettingsCard
<controls:SettingsGroup x:Uid="MouseWithoutBorders_ActivationSettings">
<tkcontrols:SettingsCard
x:Uid="MouseWithoutBorders_Toggle_Enable"
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/FluentIcons/FluentIconsMouseWithoutBorders.png}"
IsEnabled="{x:Bind ViewModel.IsEnabledGpoConfigured, Mode=OneWay, Converter={StaticResource BoolNegationConverter}}">
@@ -29,22 +29,22 @@
x:Uid="ToggleSwitch"
IsEnabled="{x:Bind ViewModel.CanBeEnabled, Mode=OneWay}"
IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" />
</controls:SettingsCard>
</tkcontrols:SettingsCard>
<InfoBar
x:Uid="GPO_IsSettingForced"
IsClosable="False"
IsOpen="{x:Bind ViewModel.IsEnabledGpoConfigured, Mode=OneWay}"
IsTabStop="{x:Bind ViewModel.IsEnabledGpoConfigured, Mode=OneWay}"
Severity="Informational" />
</custom:SettingsGroup>
<custom:SettingsGroup x:Uid="MouseWithoutBorders_KeySettings" IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}">
<controls:SettingsExpander
</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=&#xE8D7;}"
IsExpanded="{x:Bind ViewModel.ConnectFieldsVisible, Mode=TwoWay}">
<controls:SettingsExpander.Items>
<controls:SettingsCard ContentAlignment="Right">
<tkcontrols:SettingsExpander.Items>
<tkcontrols:SettingsCard ContentAlignment="Right">
<StackPanel Orientation="Horizontal" Spacing="8">
<TextBox
x:Name="ConnectSecurityKeyTextBox"
@@ -59,8 +59,8 @@
Command="{x:Bind ConnectCommand, Mode=OneTime}"
Style="{StaticResource AccentButtonStyle}" />
</StackPanel>
</controls:SettingsCard>
</controls:SettingsExpander.Items>
</tkcontrols:SettingsCard>
</tkcontrols:SettingsExpander.Items>
<StackPanel Orientation="Horizontal" Spacing="8">
<TextBox IsReadOnly="True" Text="{x:Bind ViewModel.SecurityKey, Mode=TwoWay}" />
<Button
@@ -73,9 +73,9 @@
Style="{StaticResource AccentButtonStyle}"
Visibility="{x:Bind Path=ViewModel.ConnectFieldsVisible, Mode=OneWay, Converter={StaticResource negativeBoolToVisibilityConverter}, ConverterParameter=True}" />
</StackPanel>
</controls:SettingsExpander>
</tkcontrols:SettingsExpander>
<controls:SettingsCard x:Uid="MouseWithoutBorders_ThisMachineNameLabel">
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_ThisMachineNameLabel">
<StackPanel Orientation="Horizontal" Spacing="8">
<TextBlock
VerticalAlignment="Center"
@@ -94,10 +94,10 @@
</ToolTipService.ToolTip>
</Button>
</StackPanel>
</controls:SettingsCard>
</custom:SettingsGroup>
<custom:SettingsGroup x:Uid="MouseWithoutBorders_DeviceLayoutSettings" IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}">
<controls:SettingsCard
</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">
@@ -166,7 +166,7 @@
</StackPanel>
</controls:SettingsCard>
</tkcontrols:SettingsCard>
<InfoBar
x:Uid="MouseWithoutBorders_CannotDragDropAsAdmin"
@@ -177,17 +177,17 @@
<controls:SettingsCard x:Uid="MouseWithoutBorders_MatrixOneRow">
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_MatrixOneRow">
<ToggleSwitch x:Uid="MouseWithoutBorders_MatrixOneRow_ToggleSwitch" IsOn="{x:Bind ViewModel.MatrixOneRow, Mode=TwoWay}" />
</controls:SettingsCard>
</custom:SettingsGroup>
<custom:SettingsGroup x:Uid="MouseWithoutBorders_ServiceSettings" IsEnabled="{x:Bind ViewModel.CanToggleUseService, Mode=OneWay}">
<controls:SettingsCard x:Uid="MouseWithoutBorders_UseService">
</tkcontrols:SettingsCard>
</controls:SettingsGroup>
<controls:SettingsGroup x:Uid="MouseWithoutBorders_ServiceSettings" IsEnabled="{x:Bind ViewModel.CanToggleUseService, Mode=OneWay}">
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_UseService">
<ToggleSwitch
x:Uid="MouseWithoutBorders_UseService_ToggleSwitch"
IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}"
IsOn="{x:Bind ViewModel.UseService, Mode=TwoWay}" />
</controls:SettingsCard>
</tkcontrols:SettingsCard>
<InfoBar
x:Uid="MouseWithoutBorders_RunAsAdminText"
IsClosable="False"
@@ -200,99 +200,99 @@
IsOpen="True"
IsTabStop="True"
Severity="Warning" />
<controls:SettingsCard
<tkcontrols:SettingsCard
x:Uid="MouseWithoutBorders_UninstallService"
ActionIcon="{ui:FontIcon Glyph=&#xE8A7;}"
Command="{x:Bind ViewModel.UninstallServiceEventHandler}"
IsClickEnabled="{x:Bind ViewModel.CanUninstallService, Mode=OneWay}"
IsEnabled="{x:Bind ViewModel.CanUninstallService, Mode=OneWay}" />
</custom:SettingsGroup>
<custom:SettingsGroup x:Uid="MouseWithoutBorders_Settings" IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}">
<controls:SettingsCard x:Uid="MouseWithoutBorders_WrapMouse">
</controls:SettingsGroup>
<controls:SettingsGroup x:Uid="MouseWithoutBorders_Settings" IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}">
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_WrapMouse">
<ToggleSwitch x:Uid="MouseWithoutBorders_WrapMouse_ToggleSwitch" IsOn="{x:Bind ViewModel.WrapMouse, Mode=TwoWay}" />
</controls:SettingsCard>
<controls:SettingsCard x:Uid="MouseWithoutBorders_ShareClipboard">
</tkcontrols:SettingsCard>
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_ShareClipboard">
<ToggleSwitch x:Uid="MouseWithoutBorders_ShareClipboard_ToggleSwitch" IsOn="{x:Bind ViewModel.ShareClipboard, Mode=TwoWay}" />
</controls:SettingsCard>
<controls:SettingsCard x:Uid="MouseWithoutBorders_TransferFile">
</tkcontrols:SettingsCard>
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_TransferFile">
<ToggleSwitch x:Uid="MouseWithoutBorders_TransferFile_ToggleSwitch" IsOn="{x:Bind ViewModel.TransferFile, Mode=TwoWay}" />
</controls:SettingsCard>
<controls:SettingsCard x:Uid="MouseWithoutBorders_HideMouseAtScreenEdge">
</tkcontrols:SettingsCard>
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_HideMouseAtScreenEdge">
<ToggleSwitch x:Uid="MouseWithoutBorders_HideMouseAtScreenEdge_ToggleSwitch" IsOn="{x:Bind ViewModel.HideMouseAtScreenEdge, Mode=TwoWay}" />
</controls:SettingsCard>
<controls:SettingsCard x:Uid="MouseWithoutBorders_DrawMouseCursor">
</tkcontrols:SettingsCard>
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_DrawMouseCursor">
<ToggleSwitch x:Uid="MouseWithoutBorders_DrawMouseCursor_ToggleSwitch" IsOn="{x:Bind ViewModel.DrawMouseCursor, Mode=TwoWay}" />
</controls:SettingsCard>
<controls:SettingsCard x:Uid="MouseWithoutBorders_ValidateRemoteMachineIP">
</tkcontrols:SettingsCard>
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_ValidateRemoteMachineIP">
<ToggleSwitch x:Uid="MouseWithoutBorders_ValidateRemoteMachineIP_ToggleSwitch" IsOn="{x:Bind ViewModel.ValidateRemoteMachineIP, Mode=TwoWay}" />
</controls:SettingsCard>
<controls:SettingsCard x:Uid="MouseWithoutBorders_SameSubnetOnly">
</tkcontrols:SettingsCard>
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_SameSubnetOnly">
<ToggleSwitch x:Uid="MouseWithoutBorders_SameSubnetOnly_ToggleSwitch" IsOn="{x:Bind ViewModel.SameSubnetOnly, Mode=TwoWay}" />
</controls:SettingsCard>
<controls:SettingsCard x:Uid="MouseWithoutBorders_BlockScreenSaverOnOtherMachines">
</tkcontrols:SettingsCard>
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_BlockScreenSaverOnOtherMachines">
<ToggleSwitch x:Uid="MouseWithoutBorders_BlockScreenSaverOnOtherMachines_ToggleSwitch" IsOn="{x:Bind ViewModel.BlockScreenSaverOnOtherMachines, Mode=TwoWay}" />
</controls:SettingsCard>
<controls:SettingsCard x:Uid="MouseWithoutBorders_MoveMouseRelatively">
</tkcontrols:SettingsCard>
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_MoveMouseRelatively">
<ToggleSwitch x:Uid="MouseWithoutBorders_MoveMouseRelatively_ToggleSwitch" IsOn="{x:Bind ViewModel.MoveMouseRelatively, Mode=TwoWay}" />
</controls:SettingsCard>
<controls:SettingsCard x:Uid="MouseWithoutBorders_BlockMouseAtScreenCorners">
</tkcontrols:SettingsCard>
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_BlockMouseAtScreenCorners">
<ToggleSwitch x:Uid="MouseWithoutBorders_BlockMouseAtScreenCorners_ToggleSwitch" IsOn="{x:Bind ViewModel.BlockMouseAtScreenCorners, Mode=TwoWay}" />
</controls:SettingsCard>
<controls:SettingsCard x:Uid="MouseWithoutBorders_ShowClipboardAndNetworkStatusMessages">
</tkcontrols:SettingsCard>
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_ShowClipboardAndNetworkStatusMessages">
<ToggleSwitch x:Uid="MouseWithoutBorders_ShowClipboardAndNetworkStatusMessages_ToggleSwitch" IsOn="{x:Bind ViewModel.ShowClipboardAndNetworkStatusMessages, Mode=TwoWay}" />
</controls:SettingsCard>
</custom:SettingsGroup>
<custom:SettingsGroup x:Uid="MouseWithoutBorders_KeyboardShortcuts_Group" IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}">
<controls:SettingsCard x:Uid="MouseWithoutBorders_EasyMouseOption">
</tkcontrols:SettingsCard>
</controls:SettingsGroup>
<controls:SettingsGroup x:Uid="MouseWithoutBorders_KeyboardShortcuts_Group" IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}">
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_EasyMouseOption">
<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>
</controls:SettingsCard>
</tkcontrols:SettingsCard>
<controls:SettingsCard x:Uid="MouseWithoutBorders_ToggleEasyMouseShortcut" HeaderIcon="{ui:FontIcon Glyph=&#xEDA7;}">
<custom:ShortcutControl
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_ToggleEasyMouseShortcut" HeaderIcon="{ui:FontIcon Glyph=&#xEDA7;}">
<controls:ShortcutControl
MinWidth="{StaticResource SettingActionControlMinWidth}"
AllowDisable="True"
HotkeySettings="{x:Bind Path=ViewModel.ToggleEasyMouseShortcut, Mode=TwoWay}" />
</controls:SettingsCard>
</tkcontrols:SettingsCard>
<controls:SettingsCard x:Uid="MouseWithoutBorders_LockMachinesShortcut" HeaderIcon="{ui:FontIcon Glyph=&#xEDA7;}">
<custom:ShortcutControl
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_LockMachinesShortcut" HeaderIcon="{ui:FontIcon Glyph=&#xEDA7;}">
<controls:ShortcutControl
MinWidth="{StaticResource SettingActionControlMinWidth}"
AllowDisable="True"
HotkeySettings="{x:Bind Path=ViewModel.LockMachinesShortcut, Mode=TwoWay}" />
</controls:SettingsCard>
</tkcontrols:SettingsCard>
<controls:SettingsCard x:Uid="MouseWithoutBorders_Switch2AllPcShortcut" HeaderIcon="{ui:FontIcon Glyph=&#xEDA7;}">
<custom:ShortcutControl
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_Switch2AllPcShortcut" HeaderIcon="{ui:FontIcon Glyph=&#xEDA7;}">
<controls:ShortcutControl
MinWidth="{StaticResource SettingActionControlMinWidth}"
AllowDisable="True"
HotkeySettings="{x:Bind Path=ViewModel.HotKeySwitch2AllPC, Mode=TwoWay}" />
</controls:SettingsCard>
</tkcontrols:SettingsCard>
<controls:SettingsCard x:Uid="MouseWithoutBorders_ReconnectShortcut" HeaderIcon="{ui:FontIcon Glyph=&#xEDA7;}">
<custom:ShortcutControl
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_ReconnectShortcut" HeaderIcon="{ui:FontIcon Glyph=&#xEDA7;}">
<controls:ShortcutControl
MinWidth="{StaticResource SettingActionControlMinWidth}"
AllowDisable="True"
HotkeySettings="{x:Bind Path=ViewModel.ReconnectShortcut, Mode=TwoWay}" />
</controls:SettingsCard>
</tkcontrols:SettingsCard>
<controls:SettingsCard x:Uid="MouseWithoutBorders_SwitchBetweenMachineShortcut" HeaderIcon="{ui:FontIcon Glyph=&#xE92E;}">
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_SwitchBetweenMachineShortcut" HeaderIcon="{ui:FontIcon Glyph=&#xE92E;}">
<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>
</controls:SettingsCard>
</custom:SettingsGroup>
<custom:SettingsGroup x:Uid="MouseWithoutBorders_AdvancedSettings_Group" IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}">
<controls:SettingsExpander x:Uid="MouseWithoutBorders_IPAddressMapping" IsExpanded="True">
<controls:SettingsExpander.Items>
<controls:SettingsCard HorizontalContentAlignment="Stretch" ContentAlignment="Vertical">
</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">
<TextBox
x:Uid="MouseWithoutBorders_IPAddressMapping_TextBoxControl"
MinWidth="240"
@@ -303,31 +303,31 @@
ScrollViewer.VerticalScrollMode="Enabled"
Text="{x:Bind ViewModel.Name2IP, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
TextWrapping="Wrap" />
</controls:SettingsCard>
</controls:SettingsExpander.Items>
</controls:SettingsExpander>
</custom:SettingsGroup>
<custom:SettingsGroup x:Uid="MouseWithoutBorders_TroubleShooting" IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}">
<controls:SettingsCard
</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=&#xE8A7;}"
Command="{x:Bind ViewModel.AddFirewallRuleEventHandler}"
IsClickEnabled="True" />
<controls:SettingsCard x:Uid="MouseWithoutBorders_ShowOriginalUI">
<tkcontrols:SettingsCard x:Uid="MouseWithoutBorders_ShowOriginalUI">
<ToggleSwitch
x:Uid="MouseWithoutBorders_ShowOriginalUI_ToggleSwitch"
IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}"
IsOn="{x:Bind ViewModel.ShowOriginalUI, Mode=TwoWay}" />
</controls:SettingsCard>
</custom:SettingsGroup>
</tkcontrols:SettingsCard>
</controls:SettingsGroup>
</StackPanel>
</custom:SettingsPageControl.ModuleContent>
<custom:SettingsPageControl.PrimaryLinks>
<custom:PageLink x:Uid="LearnMore_MouseWithoutBorders" Link="https://aka.ms/PowerToysOverview_MouseWithoutBorders" />
</custom:SettingsPageControl.PrimaryLinks>
<custom:SettingsPageControl.SecondaryLinks>
<custom:PageLink Link="http://aka.ms/mm" Text="Mouse without Borders" />
<custom: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" />
</custom:SettingsPageControl.SecondaryLinks>
</custom:SettingsPageControl>
</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>