2020-04-18 06:25:08 +08:00
|
|
|
<Page
|
2020-03-12 14:25:24 +08:00
|
|
|
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"
|
2021-07-05 22:25:23 +08:00
|
|
|
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls"
|
2020-03-12 14:25:24 +08:00
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
2022-04-20 04:00:28 +08:00
|
|
|
xmlns:converters="using:CommunityToolkit.WinUI.UI.Converters"
|
2021-05-21 18:32:34 +08:00
|
|
|
xmlns:localConverters="using:Microsoft.PowerToys.Settings.UI.Converters"
|
2020-03-12 14:25:24 +08:00
|
|
|
mc:Ignorable="d"
|
2020-10-29 02:10:08 +08:00
|
|
|
AutomationProperties.LandmarkType="Main">
|
2020-03-12 14:25:24 +08:00
|
|
|
|
2020-04-18 06:25:08 +08:00
|
|
|
<Page.Resources>
|
2020-05-14 17:36:27 +08:00
|
|
|
<converters:BoolToVisibilityConverter x:Key="VisibleIfTrueConverter"/>
|
2021-08-24 01:48:52 +08:00
|
|
|
<converters:BoolNegationConverter x:Key="NegationConverter"/>
|
|
|
|
<localConverters:UpdateStateToBoolConverter x:Key="UpdateStateToBoolConverter" />
|
2020-04-18 06:25:08 +08:00
|
|
|
</Page.Resources>
|
|
|
|
|
2021-08-24 01:48:52 +08:00
|
|
|
<controls:SettingsPageControl x:Uid="General"
|
2021-08-25 15:22:12 +08:00
|
|
|
ModuleImageSource="ms-appx:///Assets/Modules/PT.png">
|
2021-07-05 22:25:23 +08:00
|
|
|
<controls:SettingsPageControl.ModuleContent>
|
|
|
|
<StackPanel Orientation="Vertical">
|
2021-08-24 01:48:52 +08:00
|
|
|
<controls:SettingsGroup x:Uid="General_Version" Margin="0,-32,0,0">
|
2022-07-15 17:17:18 +08:00
|
|
|
<controls:Setting Header="{Binding PowerToysVersion}" Icon="">
|
2021-08-24 01:48:52 +08:00
|
|
|
<controls:Setting.Description>
|
|
|
|
<StackPanel Orientation="Vertical">
|
|
|
|
|
|
|
|
<TextBlock Style="{StaticResource SecondaryTextStyle}">
|
|
|
|
<Run x:Uid="General_VersionLastChecked" />
|
|
|
|
<Run Text="{Binding UpdateCheckedDate, Mode=OneWay}"/>
|
|
|
|
</TextBlock>
|
|
|
|
<HyperlinkButton x:Uid="ReleaseNotes"
|
|
|
|
NavigateUri="https://github.com/microsoft/PowerToys/releases/"
|
|
|
|
Margin="0,2,0,0"/>
|
|
|
|
</StackPanel>
|
|
|
|
</controls:Setting.Description>
|
|
|
|
<controls:Setting.ActionContent>
|
|
|
|
<Grid Visibility="{Binding PowerToysUpdatingState, Mode=OneWay, Converter={StaticResource UpdateStateToBoolConverter}, ConverterParameter=UpToDate}">
|
|
|
|
<StackPanel Visibility="{Binding Mode=OneWay, Path=IsNewVersionDownloading, Converter={StaticResource VisibleIfTrueConverter}}"
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
Orientation="Horizontal"
|
|
|
|
Spacing="18">
|
2022-09-21 00:59:18 +08:00
|
|
|
<ProgressRing Height="24"
|
2021-08-24 01:48:52 +08:00
|
|
|
Width="24"/>
|
|
|
|
<TextBlock x:Uid="General_CheckingForUpdates"
|
|
|
|
FontWeight="SemiBold"
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}" />
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
<Button x:Uid="GeneralPage_CheckForUpdates"
|
|
|
|
Command="{Binding CheckForUpdatesEventHandler}"
|
|
|
|
IsEnabled="{Binding IsDownloadAllowed}"
|
|
|
|
Visibility="{Binding Mode=OneWay, Path=IsNewVersionDownloading, Converter={StaticResource NegationConverter}}"
|
|
|
|
HorizontalAlignment="Right"/>
|
|
|
|
</Grid>
|
|
|
|
</controls:Setting.ActionContent>
|
|
|
|
</controls:Setting>
|
|
|
|
|
2022-09-21 00:59:18 +08:00
|
|
|
<InfoBar x:Uid="General_UpToDate"
|
2021-08-24 01:48:52 +08:00
|
|
|
IsClosable="False"
|
|
|
|
Severity="Success"
|
2021-11-17 00:10:43 +08:00
|
|
|
IsTabStop="{Binding IsNewVersionCheckedAndUpToDate, Mode=OneWay}"
|
2021-08-24 01:48:52 +08:00
|
|
|
IsOpen="{Binding IsNewVersionCheckedAndUpToDate, Mode=OneWay}"/>
|
|
|
|
|
|
|
|
<!-- New version available -->
|
2022-09-21 00:59:18 +08:00
|
|
|
<InfoBar x:Uid="General_NewVersionAvailable"
|
2021-08-24 01:48:52 +08:00
|
|
|
IsClosable="False"
|
2021-08-27 01:53:25 +08:00
|
|
|
Severity="Informational"
|
2021-11-17 00:10:43 +08:00
|
|
|
IsTabStop="{Binding PowerToysUpdatingState, Mode=OneWay, Converter={StaticResource UpdateStateToBoolConverter}, ConverterParameter=ReadyToDownload}"
|
2021-08-24 01:48:52 +08:00
|
|
|
IsOpen="{Binding PowerToysUpdatingState, Mode=OneWay, Converter={StaticResource UpdateStateToBoolConverter}, ConverterParameter=ReadyToDownload}"
|
|
|
|
Message="{Binding PowerToysNewAvailableVersion, Mode=OneWay}">
|
2022-09-21 00:59:18 +08:00
|
|
|
<InfoBar.Content>
|
2021-08-24 01:48:52 +08:00
|
|
|
<StackPanel Spacing="16">
|
|
|
|
<Button x:Uid="General_DownloadAndInstall"
|
|
|
|
Command="{Binding UpdateNowButtonEventHandler}"
|
|
|
|
IsEnabled="{Binding IsDownloadAllowed, Mode=OneWay}"
|
|
|
|
Visibility="{Binding Mode=OneWay, Path=IsNewVersionDownloading, Converter={StaticResource NegationConverter}}"/>
|
|
|
|
|
|
|
|
<!-- In progress panel -->
|
|
|
|
<StackPanel Visibility="{Binding Mode=OneWay, Path=IsNewVersionDownloading, Converter={StaticResource VisibleIfTrueConverter}}"
|
|
|
|
Orientation="Horizontal"
|
|
|
|
Spacing="18"
|
|
|
|
Margin="0,0,0,16">
|
2022-09-21 00:59:18 +08:00
|
|
|
<ProgressRing Height="24"
|
2021-08-24 01:48:52 +08:00
|
|
|
Width="24"/>
|
|
|
|
<TextBlock x:Uid="General_Downloading"
|
|
|
|
FontWeight="SemiBold"
|
|
|
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}" />
|
|
|
|
</StackPanel>
|
|
|
|
</StackPanel>
|
2022-09-21 00:59:18 +08:00
|
|
|
</InfoBar.Content>
|
|
|
|
<InfoBar.ActionButton>
|
2021-08-24 01:48:52 +08:00
|
|
|
<HyperlinkButton x:Uid="SeeWhatsNew"
|
2021-09-19 22:22:39 +08:00
|
|
|
Style="{StaticResource TextButtonStyle}"
|
2021-08-24 01:48:52 +08:00
|
|
|
NavigateUri="{Binding PowerToysNewAvailableVersionLink}"
|
|
|
|
HorizontalAlignment="Right" />
|
2022-09-21 00:59:18 +08:00
|
|
|
</InfoBar.ActionButton>
|
|
|
|
</InfoBar>
|
2021-08-24 01:48:52 +08:00
|
|
|
|
|
|
|
|
|
|
|
<!-- Ready to install -->
|
2022-09-21 00:59:18 +08:00
|
|
|
<InfoBar x:Uid="General_NewVersionReadyToInstall"
|
2021-08-24 01:48:52 +08:00
|
|
|
IsClosable="False"
|
|
|
|
Severity="Success"
|
2021-11-17 00:10:43 +08:00
|
|
|
IsTabStop="{Binding PowerToysUpdatingState, Mode=OneWay, Converter={StaticResource UpdateStateToBoolConverter}, ConverterParameter=ReadyToInstall}"
|
2021-08-24 01:48:52 +08:00
|
|
|
IsOpen="{Binding PowerToysUpdatingState, Mode=OneWay, Converter={StaticResource UpdateStateToBoolConverter}, ConverterParameter=ReadyToInstall}"
|
|
|
|
Message="{Binding PowerToysNewAvailableVersion}">
|
2022-09-21 00:59:18 +08:00
|
|
|
<InfoBar.Content>
|
2021-08-24 01:48:52 +08:00
|
|
|
<StackPanel Spacing="16">
|
|
|
|
<Button x:Uid="General_InstallNow"
|
|
|
|
Command="{Binding UpdateNowButtonEventHandler}"
|
|
|
|
IsEnabled="{Binding IsDownloadAllowed, Mode=OneWay}"
|
|
|
|
Margin="0,0,0,16"/>
|
|
|
|
</StackPanel>
|
2022-09-21 00:59:18 +08:00
|
|
|
</InfoBar.Content>
|
|
|
|
<InfoBar.ActionButton>
|
2021-08-24 01:48:52 +08:00
|
|
|
<HyperlinkButton x:Uid="SeeWhatsNew"
|
2021-09-19 22:22:39 +08:00
|
|
|
Style="{StaticResource TextButtonStyle}"
|
2021-08-24 01:48:52 +08:00
|
|
|
NavigateUri="{Binding PowerToysNewAvailableVersionLink}"
|
|
|
|
HorizontalAlignment="Right" />
|
2022-09-21 00:59:18 +08:00
|
|
|
</InfoBar.ActionButton>
|
|
|
|
</InfoBar>
|
2021-08-24 01:48:52 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Install failed -->
|
2022-09-21 00:59:18 +08:00
|
|
|
<InfoBar x:Uid="General_FailedToDownloadTheNewVersion"
|
2021-08-24 01:48:52 +08:00
|
|
|
IsClosable="False"
|
|
|
|
Severity="Error"
|
2021-11-17 00:10:43 +08:00
|
|
|
IsTabStop="{Binding PowerToysUpdatingState, Mode=OneWay, Converter={StaticResource UpdateStateToBoolConverter}, ConverterParameter=ErrorDownloading}"
|
2021-08-24 01:48:52 +08:00
|
|
|
IsOpen="{Binding PowerToysUpdatingState, Mode=OneWay, Converter={StaticResource UpdateStateToBoolConverter}, ConverterParameter=ErrorDownloading}"
|
|
|
|
Message="{Binding PowerToysNewAvailableVersion}">
|
2022-09-21 00:59:18 +08:00
|
|
|
<InfoBar.Content>
|
2021-08-24 01:48:52 +08:00
|
|
|
<StackPanel Spacing="16">
|
|
|
|
<Button x:Uid="General_TryAgainToDownloadAndInstall"
|
|
|
|
Command="{Binding UpdateNowButtonEventHandler}"
|
|
|
|
IsEnabled="{Binding IsDownloadAllowed, Mode=OneWay}"
|
|
|
|
Visibility="{Binding Mode=OneWay, Path=IsNewVersionDownloading, Converter={StaticResource NegationConverter}}"/>
|
|
|
|
|
|
|
|
<!-- In progress panel -->
|
|
|
|
<StackPanel Visibility="{Binding Mode=OneWay, Path=IsNewVersionDownloading, Converter={StaticResource VisibleIfTrueConverter}}"
|
|
|
|
Orientation="Horizontal"
|
|
|
|
Spacing="18"
|
|
|
|
Margin="0,0,0,16">
|
2022-09-21 00:59:18 +08:00
|
|
|
<ProgressRing Height="24"
|
2021-08-24 01:48:52 +08:00
|
|
|
Width="24"/>
|
|
|
|
<TextBlock x:Uid="General_Downloading"
|
|
|
|
FontWeight="SemiBold"
|
|
|
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}" />
|
|
|
|
</StackPanel>
|
|
|
|
</StackPanel>
|
2022-09-21 00:59:18 +08:00
|
|
|
</InfoBar.Content>
|
|
|
|
<InfoBar.ActionButton>
|
2021-08-24 01:48:52 +08:00
|
|
|
<HyperlinkButton x:Uid="SeeWhatsNew"
|
2022-09-20 22:21:05 +08:00
|
|
|
NavigateUri="{Binding PowerToysNewAvailableVersionLink}"
|
|
|
|
HorizontalAlignment="Right"
|
2021-09-19 22:22:39 +08:00
|
|
|
Style="{StaticResource TextButtonStyle}"/>
|
2022-09-21 00:59:18 +08:00
|
|
|
</InfoBar.ActionButton>
|
|
|
|
</InfoBar>
|
2021-08-24 01:48:52 +08:00
|
|
|
|
|
|
|
<controls:Setting x:Uid="GeneralPage_ToggleSwitch_AutoDownloadUpdates"
|
|
|
|
Margin="0,-6,0,0"
|
2021-11-30 21:43:04 +08:00
|
|
|
IsEnabled="{Binding AutoUpdatesEnabled}"
|
2021-08-24 01:48:52 +08:00
|
|
|
Visibility="{Binding Mode=OneWay, Path=IsAdmin, Converter={StaticResource VisibleIfTrueConverter}}">
|
2021-11-30 21:43:04 +08:00
|
|
|
<controls:Setting.ActionContent>
|
2021-12-20 20:15:08 +08:00
|
|
|
<ToggleSwitch IsOn="{Binding Mode=TwoWay, Path=AutoDownloadUpdates}" x:Uid="ToggleSwitch"/>
|
2021-11-30 21:43:04 +08:00
|
|
|
</controls:Setting.ActionContent>
|
2021-08-24 01:48:52 +08:00
|
|
|
</controls:Setting>
|
|
|
|
</controls:SettingsGroup>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<controls:SettingsGroup x:Uid="Admin_Mode">
|
|
|
|
<controls:SettingExpander IsExpanded="True">
|
|
|
|
<controls:SettingExpander.Header>
|
2022-09-20 22:21:05 +08:00
|
|
|
<controls:Setting x:Uid="Admin_Mode_Running_As" Icon="" Header="{Binding Mode=OneWay, Path=RunningAsText}" Style="{StaticResource ExpanderHeaderSettingStyle}">
|
|
|
|
<controls:Setting.Description>
|
|
|
|
<HyperlinkButton NavigateUri="https://aka.ms/powertoysDetectedElevatedHelp" x:Uid="GeneralPage_ToggleSwitch_AlwaysRunElevated_Link"/>
|
|
|
|
</controls:Setting.Description>
|
2021-08-24 01:48:52 +08:00
|
|
|
<controls:Setting.ActionContent>
|
|
|
|
<Button x:Uid="GeneralPage_RestartAsAdmin_Button"
|
|
|
|
Command = "{Binding RestartElevatedButtonEventHandler}"
|
|
|
|
IsEnabled="{Binding Mode=OneWay, Path=IsAdminButtonEnabled}"/>
|
|
|
|
</controls:Setting.ActionContent>
|
|
|
|
</controls:Setting>
|
|
|
|
</controls:SettingExpander.Header>
|
|
|
|
<controls:SettingExpander.Content>
|
|
|
|
<StackPanel Orientation="Vertical">
|
|
|
|
<controls:Setting x:Uid="GeneralSettings_AlwaysRunAsAdminText" IsEnabled="{Binding Mode=OneWay, Path=IsElevated}" Style="{StaticResource ExpanderContentSettingStyle}">
|
|
|
|
<controls:Setting.ActionContent>
|
2021-12-20 20:15:08 +08:00
|
|
|
<ToggleSwitch IsOn="{Binding Mode=TwoWay, Path=RunElevated}" x:Uid="ToggleSwitch"/>
|
2021-08-24 01:48:52 +08:00
|
|
|
</controls:Setting.ActionContent>
|
|
|
|
</controls:Setting>
|
2022-09-21 00:59:18 +08:00
|
|
|
<InfoBar x:Uid="General_RunAsAdminRequired"
|
2022-09-20 22:21:05 +08:00
|
|
|
Severity="Warning"
|
|
|
|
IsTabStop="{Binding Mode=OneWay, Path=IsElevated, Converter={StaticResource NegationConverter}}"
|
|
|
|
IsClosable="False"
|
|
|
|
IsOpen="{Binding Mode=OneWay, Path=IsElevated, Converter={StaticResource NegationConverter}}">
|
2022-09-21 00:59:18 +08:00
|
|
|
</InfoBar>
|
2021-08-24 01:48:52 +08:00
|
|
|
</StackPanel>
|
|
|
|
</controls:SettingExpander.Content>
|
|
|
|
</controls:SettingExpander>
|
|
|
|
</controls:SettingsGroup>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<controls:SettingsGroup IsEnabled="True" x:Uid="ShortcutGuide_Appearance_Behavior">
|
2021-09-19 22:22:39 +08:00
|
|
|
<controls:Setting x:Uid="ColorModeHeader" Icon="">
|
2021-08-24 01:48:52 +08:00
|
|
|
<controls:Setting.Description>
|
|
|
|
<HyperlinkButton Click="OpenColorsSettings_Click"
|
|
|
|
x:Uid="Windows_Color_Settings"/>
|
|
|
|
</controls:Setting.Description>
|
|
|
|
<controls:Setting.ActionContent>
|
|
|
|
<ComboBox SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.ThemeIndex}" MinWidth="{StaticResource SettingActionControlMinWidth}">
|
|
|
|
<ComboBoxItem x:Uid="Radio_Theme_Dark"/>
|
|
|
|
<ComboBoxItem x:Uid="Radio_Theme_Light"/>
|
|
|
|
<ComboBoxItem x:Uid="Radio_Theme_Default"/>
|
|
|
|
</ComboBox>
|
|
|
|
</controls:Setting.ActionContent>
|
|
|
|
</controls:Setting>
|
|
|
|
<controls:Setting x:Uid="GeneralPage_RunAtStartUp">
|
|
|
|
<controls:Setting.ActionContent>
|
2021-12-20 20:15:08 +08:00
|
|
|
<ToggleSwitch IsOn="{Binding Mode=TwoWay, Path=Startup}" x:Uid="ToggleSwitch"/>
|
2021-08-24 01:48:52 +08:00
|
|
|
</controls:Setting.ActionContent>
|
|
|
|
</controls:Setting>
|
|
|
|
</controls:SettingsGroup>
|
2020-07-25 03:02:56 +08:00
|
|
|
</StackPanel>
|
2021-08-24 01:48:52 +08:00
|
|
|
|
2021-07-05 22:25:23 +08:00
|
|
|
</controls:SettingsPageControl.ModuleContent>
|
2021-08-24 01:48:52 +08:00
|
|
|
<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"/>
|
2021-11-02 01:21:47 +08:00
|
|
|
<controls:PageLink x:Uid="OpenSource_Notice" Link="https://github.com/microsoft/PowerToys/blob/main/NOTICE.md"/>
|
2021-08-24 01:48:52 +08:00
|
|
|
</controls:SettingsPageControl.SecondaryLinks>
|
2021-07-05 22:25:23 +08:00
|
|
|
</controls:SettingsPageControl>
|
2020-07-25 03:02:56 +08:00
|
|
|
</Page>
|