mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 10:46:33 +02:00
[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:
@@ -2,26 +2,26 @@
|
||||
x:Class="Microsoft.PowerToys.Settings.UI.Views.GeneralPage"
|
||||
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:controls="using:Microsoft.PowerToys.Settings.UI.Controls"
|
||||
xmlns:converters="using:Microsoft.PowerToys.Settings.UI.Converters"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:localConverters="using:Microsoft.PowerToys.Settings.UI.Converters"
|
||||
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>
|
||||
<localConverters:UpdateStateToBoolConverter x:Key="UpdateStateToBoolConverter" />
|
||||
<localConverters:StringToInfoBarSeverityConverter x:Key="StringToInfoBarSeverityConverter" />
|
||||
<converters:UpdateStateToBoolConverter x:Key="UpdateStateToBoolConverter" />
|
||||
<converters:StringToInfoBarSeverityConverter x:Key="StringToInfoBarSeverityConverter" />
|
||||
</Page.Resources>
|
||||
|
||||
<custom:SettingsPageControl x:Uid="General" ModuleImageSource="ms-appx:///Assets/Settings/Modules/PT.png">
|
||||
<custom:SettingsPageControl.ModuleContent>
|
||||
<controls:SettingsPageControl x:Uid="General" ModuleImageSource="ms-appx:///Assets/Settings/Modules/PT.png">
|
||||
<controls:SettingsPageControl.ModuleContent>
|
||||
<StackPanel ChildrenTransitions="{StaticResource SettingsCardsAnimations}" Orientation="Vertical">
|
||||
<custom:SettingsGroup x:Uid="General_Version" Margin="0,-32,0,0">
|
||||
<controls:SettingsCard Header="{x:Bind ViewModel.PowerToysVersion, Mode=OneWay}" HeaderIcon="{ui:FontIcon Glyph=}">
|
||||
<controls:SettingsCard.Description>
|
||||
<controls:SettingsGroup x:Uid="General_Version" Margin="0,-32,0,0">
|
||||
<tkcontrols:SettingsCard Header="{x:Bind ViewModel.PowerToysVersion, Mode=OneWay}" HeaderIcon="{ui:FontIcon Glyph=}">
|
||||
<tkcontrols:SettingsCard.Description>
|
||||
<StackPanel Orientation="Vertical">
|
||||
<TextBlock Style="{StaticResource SecondaryTextStyle}">
|
||||
<Run x:Uid="General_VersionLastChecked" />
|
||||
@@ -33,7 +33,7 @@
|
||||
FontWeight="SemiBold"
|
||||
NavigateUri="https://github.com/microsoft/PowerToys/releases/" />
|
||||
</StackPanel>
|
||||
</controls:SettingsCard.Description>
|
||||
</tkcontrols:SettingsCard.Description>
|
||||
<Grid Visibility="{x:Bind ViewModel.IsUpdatePanelVisible, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}">
|
||||
<StackPanel
|
||||
VerticalAlignment="Center"
|
||||
@@ -55,7 +55,7 @@
|
||||
IsEnabled="{Binding IsDownloadAllowed}"
|
||||
Visibility="{Binding Mode=OneWay, Path=IsNewVersionDownloading, Converter={StaticResource BoolNegationConverter}}" />
|
||||
</Grid>
|
||||
</controls:SettingsCard>
|
||||
</tkcontrols:SettingsCard>
|
||||
<InfoBar
|
||||
x:Uid="General_UpToDate"
|
||||
IsClosable="False"
|
||||
@@ -175,70 +175,70 @@
|
||||
</InfoBar.ActionButton>
|
||||
</InfoBar>
|
||||
|
||||
<controls:SettingsCard
|
||||
<tkcontrols:SettingsCard
|
||||
x:Uid="GeneralPage_ToggleSwitch_AutoDownloadUpdates"
|
||||
Margin="0,-6,0,0"
|
||||
IsEnabled="{x:Bind ViewModel.IsAutoDownloadUpdatesCardEnabled, Mode=OneWay}"
|
||||
Visibility="{x:Bind ViewModel.IsAdmin, Converter={StaticResource BoolToVisibilityConverter}, Mode=OneWay}">
|
||||
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.AutoDownloadUpdates, Mode=TwoWay}" />
|
||||
</controls:SettingsCard>
|
||||
</tkcontrols:SettingsCard>
|
||||
<InfoBar
|
||||
x:Uid="GPO_AutoDownloadUpdatesIsDisabled"
|
||||
IsClosable="False"
|
||||
IsOpen="{x:Bind ViewModel.ShowAutoDownloadUpdatesGpoInformation, Mode=OneWay}"
|
||||
IsTabStop="{x:Bind ViewModel.ShowAutoDownloadUpdatesGpoInformation, Mode=OneWay}"
|
||||
Severity="Informational" />
|
||||
</custom:SettingsGroup>
|
||||
</controls:SettingsGroup>
|
||||
|
||||
<custom:SettingsGroup x:Uid="Admin_Mode">
|
||||
<controls:SettingsExpander
|
||||
<controls:SettingsGroup x:Uid="Admin_Mode">
|
||||
<tkcontrols:SettingsExpander
|
||||
x:Uid="Admin_Mode_Running_As"
|
||||
Header="{x:Bind ViewModel.RunningAsText, Mode=OneWay}"
|
||||
HeaderIcon="{ui:FontIcon Glyph=}"
|
||||
IsExpanded="True">
|
||||
<controls:SettingsExpander.Description>
|
||||
<tkcontrols:SettingsExpander.Description>
|
||||
<HyperlinkButton x:Uid="GeneralPage_ToggleSwitch_AlwaysRunElevated_Link" NavigateUri="https://aka.ms/powertoysDetectedElevatedHelp" />
|
||||
</controls:SettingsExpander.Description>
|
||||
</tkcontrols:SettingsExpander.Description>
|
||||
<Button
|
||||
x:Uid="GeneralPage_RestartAsAdmin_Button"
|
||||
Command="{Binding RestartElevatedButtonEventHandler}"
|
||||
IsEnabled="{Binding IsAdminButtonEnabled}" />
|
||||
<controls:SettingsExpander.Items>
|
||||
<controls:SettingsCard x:Uid="GeneralSettings_AlwaysRunAsAdminText" IsEnabled="{x:Bind ViewModel.IsElevated, Mode=OneWay}">
|
||||
<tkcontrols:SettingsExpander.Items>
|
||||
<tkcontrols:SettingsCard x:Uid="GeneralSettings_AlwaysRunAsAdminText" IsEnabled="{x:Bind ViewModel.IsElevated, Mode=OneWay}">
|
||||
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.RunElevated, Mode=TwoWay}" />
|
||||
</controls:SettingsCard>
|
||||
</controls:SettingsExpander.Items>
|
||||
</controls:SettingsExpander>
|
||||
<controls:SettingsCard x:Uid="GeneralPage_WarningsElevatedApps">
|
||||
</tkcontrols:SettingsCard>
|
||||
</tkcontrols:SettingsExpander.Items>
|
||||
</tkcontrols:SettingsExpander>
|
||||
<tkcontrols:SettingsCard x:Uid="GeneralPage_WarningsElevatedApps">
|
||||
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{Binding Mode=TwoWay, Path=EnableWarningsElevatedApps}" />
|
||||
</controls:SettingsCard>
|
||||
</custom:SettingsGroup>
|
||||
</tkcontrols:SettingsCard>
|
||||
</controls:SettingsGroup>
|
||||
|
||||
<custom:SettingsGroup x:Uid="Appearance_Behavior" IsEnabled="True">
|
||||
<controls:SettingsCard x:Uid="ColorModeHeader" HeaderIcon="{ui:FontIcon Glyph=}">
|
||||
<controls:SettingsCard.Description>
|
||||
<controls:SettingsGroup x:Uid="Appearance_Behavior" IsEnabled="True">
|
||||
<tkcontrols:SettingsCard x:Uid="ColorModeHeader" HeaderIcon="{ui:FontIcon Glyph=}">
|
||||
<tkcontrols:SettingsCard.Description>
|
||||
<HyperlinkButton x:Uid="Windows_Color_Settings" Click="OpenColorsSettings_Click" />
|
||||
</controls:SettingsCard.Description>
|
||||
</tkcontrols:SettingsCard.Description>
|
||||
<ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind ViewModel.ThemeIndex, Mode=TwoWay}">
|
||||
<ComboBoxItem x:Uid="Radio_Theme_Dark" />
|
||||
<ComboBoxItem x:Uid="Radio_Theme_Light" />
|
||||
<ComboBoxItem x:Uid="Radio_Theme_Default" />
|
||||
</ComboBox>
|
||||
</controls:SettingsCard>
|
||||
</tkcontrols:SettingsCard>
|
||||
|
||||
<controls:SettingsCard x:Uid="GeneralPage_RunAtStartUp">
|
||||
<tkcontrols:SettingsCard x:Uid="GeneralPage_RunAtStartUp">
|
||||
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.Startup, Mode=TwoWay}" />
|
||||
</controls:SettingsCard>
|
||||
</custom:SettingsGroup>
|
||||
</tkcontrols:SettingsCard>
|
||||
</controls:SettingsGroup>
|
||||
|
||||
<custom:SettingsGroup x:Uid="General_SettingsBackupAndRestoreTitle" Visibility="Visible">
|
||||
<controls:SettingsExpander x:Uid="General_SettingsBackupAndRestore" HeaderIcon="{ui:FontIcon Glyph=}">
|
||||
<controls:SettingsGroup x:Uid="General_SettingsBackupAndRestoreTitle" Visibility="Visible">
|
||||
<tkcontrols:SettingsExpander x:Uid="General_SettingsBackupAndRestore" HeaderIcon="{ui:FontIcon Glyph=}">
|
||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||
<Button x:Uid="General_SettingsBackupAndRestore_ButtonBackup" Command="{Binding BackupConfigsEventHandler}" />
|
||||
<Button x:Uid="General_SettingsBackupAndRestore_ButtonRestore" Command="{Binding RestoreConfigsEventHandler}" />
|
||||
</StackPanel>
|
||||
<controls:SettingsExpander.Items>
|
||||
<controls:SettingsCard x:Uid="General_SettingsBackupAndRestoreLocationText">
|
||||
<tkcontrols:SettingsExpander.Items>
|
||||
<tkcontrols:SettingsCard x:Uid="General_SettingsBackupAndRestoreLocationText">
|
||||
<Grid ColumnSpacing="8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
@@ -269,8 +269,8 @@
|
||||
</ToolTipService.ToolTip>
|
||||
</Button>
|
||||
</Grid>
|
||||
</controls:SettingsCard>
|
||||
<controls:SettingsCard
|
||||
</tkcontrols:SettingsCard>
|
||||
<tkcontrols:SettingsCard
|
||||
x:Uid="General_SettingsBackupAndRestoreStatusInfo"
|
||||
HorizontalContentAlignment="Left"
|
||||
ContentAlignment="Vertical">
|
||||
@@ -322,10 +322,10 @@
|
||||
Text="{x:Bind ViewModel.LastSettingsBackupDate, Mode=OneWay}"
|
||||
TextWrapping="WrapWholeWords" />
|
||||
</Grid>
|
||||
</controls:SettingsCard>
|
||||
</controls:SettingsExpander.Items>
|
||||
</controls:SettingsExpander>
|
||||
</custom:SettingsGroup>
|
||||
</tkcontrols:SettingsCard>
|
||||
</tkcontrols:SettingsExpander.Items>
|
||||
</tkcontrols:SettingsExpander>
|
||||
</controls:SettingsGroup>
|
||||
<InfoBar
|
||||
x:Uid="General_SettingsBackupMessageResults"
|
||||
Title="{x:Bind ViewModel.SettingsBackupMessage, Mode=OneWay}"
|
||||
@@ -333,32 +333,32 @@
|
||||
IsOpen="{x:Bind ViewModel.SettingsBackupRestoreMessageVisible, Mode=OneWay}"
|
||||
IsTabStop="{x:Bind ViewModel.SettingsBackupRestoreMessageVisible, Mode=OneWay}"
|
||||
Severity="{x:Bind ViewModel.BackupRestoreMessageSeverity, Converter={StaticResource StringToInfoBarSeverityConverter}}" />
|
||||
<custom:SettingsGroup x:Uid="General_Experimentation" Visibility="Visible">
|
||||
<controls:SettingsCard x:Uid="GeneralPage_EnableExperimentation" IsEnabled="{x:Bind ViewModel.IsExperimentationGpoDisallowed, Mode=OneWay, Converter={StaticResource BoolNegationConverter}}">
|
||||
<controls:SettingsCard.HeaderIcon>
|
||||
<controls:SettingsGroup x:Uid="General_Experimentation" Visibility="Visible">
|
||||
<tkcontrols:SettingsCard x:Uid="GeneralPage_EnableExperimentation" IsEnabled="{x:Bind ViewModel.IsExperimentationGpoDisallowed, Mode=OneWay, Converter={StaticResource BoolNegationConverter}}">
|
||||
<tkcontrols:SettingsCard.HeaderIcon>
|
||||
<PathIcon Data="M1859 1758q14 23 21 47t7 51q0 40-15 75t-41 61-61 41-75 15H354q-40 0-75-15t-61-41-41-61-15-75q0-27 6-51t21-47l569-992q10-14 10-34V128H640V0h768v128h-128v604q0 19 10 35l569 991zM896 732q0 53-27 99l-331 577h972l-331-577q-27-46-27-99V128H896v604zm799 1188q26 0 44-19t19-45q0-10-2-17t-8-16l-164-287H464l-165 287q-9 15-9 33 0 26 18 45t46 19h1341z" />
|
||||
</controls:SettingsCard.HeaderIcon>
|
||||
</tkcontrols:SettingsCard.HeaderIcon>
|
||||
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.EnableExperimentation, Mode=TwoWay}" />
|
||||
</controls:SettingsCard>
|
||||
</tkcontrols:SettingsCard>
|
||||
<InfoBar
|
||||
x:Uid="GPO_ExperimentationIsDisallowed"
|
||||
IsClosable="False"
|
||||
IsOpen="{x:Bind ViewModel.IsExperimentationGpoDisallowed, Mode=OneWay}"
|
||||
IsTabStop="{x:Bind ViewModel.IsExperimentationGpoDisallowed, Mode=OneWay}"
|
||||
Severity="Informational" />
|
||||
</custom:SettingsGroup>
|
||||
</controls:SettingsGroup>
|
||||
</StackPanel>
|
||||
|
||||
</custom:SettingsPageControl.ModuleContent>
|
||||
<custom:SettingsPageControl.PrimaryLinks>
|
||||
<custom:PageLink x:Uid="GeneralPage_Documentation" Link="https://aka.ms/PowerToysOverview" />
|
||||
<custom:PageLink x:Uid="General_Repository" Link="https://aka.ms/powertoys" />
|
||||
<custom:PageLink x:Uid="GeneralPage_ReportAbug" Link="https://aka.ms/powerToysReportBug" />
|
||||
<custom:PageLink x:Uid="GeneralPage_RequestAFeature_URL" Link="https://aka.ms/powerToysRequestFeature" />
|
||||
</custom:SettingsPageControl.PrimaryLinks>
|
||||
<custom:SettingsPageControl.SecondaryLinks>
|
||||
<custom:PageLink x:Uid="GeneralPage_PrivacyStatement_URL" Link="http://go.microsoft.com/fwlink/?LinkId=521839" />
|
||||
<custom:PageLink x:Uid="OpenSource_Notice" Link="https://github.com/microsoft/PowerToys/blob/main/NOTICE.md" />
|
||||
</custom:SettingsPageControl.SecondaryLinks>
|
||||
</custom:SettingsPageControl>
|
||||
</controls:SettingsPageControl.ModuleContent>
|
||||
<controls:SettingsPageControl.PrimaryLinks>
|
||||
<controls:PageLink x:Uid="GeneralPage_Documentation" Link="https://aka.ms/PowerToysOverview" />
|
||||
<controls:PageLink x:Uid="General_Repository" Link="https://aka.ms/powertoys" />
|
||||
<controls:PageLink x:Uid="GeneralPage_ReportAbug" Link="https://aka.ms/powerToysReportBug" />
|
||||
<controls:PageLink x:Uid="GeneralPage_RequestAFeature_URL" Link="https://aka.ms/powerToysRequestFeature" />
|
||||
</controls:SettingsPageControl.PrimaryLinks>
|
||||
<controls:SettingsPageControl.SecondaryLinks>
|
||||
<controls:PageLink x:Uid="GeneralPage_PrivacyStatement_URL" Link="http://go.microsoft.com/fwlink/?LinkId=521839" />
|
||||
<controls:PageLink x:Uid="OpenSource_Notice" Link="https://github.com/microsoft/PowerToys/blob/main/NOTICE.md" />
|
||||
</controls:SettingsPageControl.SecondaryLinks>
|
||||
</controls:SettingsPageControl>
|
||||
</Page>
|
||||
Reference in New Issue
Block a user