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"
2020-05-12 03:36:55 +08:00
xmlns:converters="using:Microsoft.Toolkit.Uwp.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
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
AutomationProperties.LandmarkType="Main">
2020-03-12 14:25:24 +08:00
2020-04-18 06:25:08 +08:00
<Page.Resources>
2020-05-12 03:36:55 +08:00
<converters:BoolToObjectConverter x:Key="BoolToVisibilityConverter" TrueValue="Collapsed" FalseValue="Visible"/>
2020-05-14 17:36:27 +08:00
<converters:BoolToVisibilityConverter x:Key="VisibleIfTrueConverter"/>
2021-05-21 18:32:34 +08:00
<localConverters:UpdatingStateUpToDateToVisibilityConverter x:Key="UpdatingStateUpToDateToVisibilityConverter" />
<localConverters:UpdatingStateCannotDownloadToVisibilityConverter x:Key="UpdatingStateCannotDownloadToVisibilityConverter" />
<localConverters:UpdatingStateReadyToDownloadToVisibilityConverter x:Key="UpdatingStateReadyToDownloadToVisibilityConverter" />
<localConverters:UpdatingStateReadyToInstallToVisibilityConverter x:Key="UpdatingStateReadyToInstallToVisibilityConverter" />
2020-04-18 06:25:08 +08:00
</Page.Resources>
2021-07-05 22:25:23 +08:00
<controls:SettingsPageControl x:Uid="About_PowerToys"
ModuleImageSource="ms-appx:///Assets/Modules/PT.png"
ModuleImageLink="https://aka.ms/powertoys">
<controls:SettingsPageControl.ModuleContent>
<StackPanel Orientation="Vertical">
<Button Click="OobeButton_Click"
Style="{StaticResource AccentButtonStyle}"
Margin="0,12,0,24">
<Button.Content>
<StackPanel Orientation="Horizontal">
<FontIcon FontSize="13" Glyph="" />
<TextBlock Margin="8,0,0,0"
x:Uid="Oobe_Button"/>
</StackPanel>
</Button.Content>
</Button>
<TextBlock x:Uid="Admin_Mode"
2020-10-23 05:37:10 +08:00
FontWeight="SemiBold"
TextWrapping="Wrap"
2020-10-24 04:35:57 +08:00
AutomationProperties.HeadingLevel="Level2"
2020-05-12 03:36:55 +08:00
Style="{StaticResource SubtitleTextBlockStyle}"/>
2020-05-16 00:38:47 +08:00
2021-07-05 22:25:23 +08:00
<TextBlock Text="{Binding Mode=TwoWay, Path=RunningAsText}"
2020-10-23 05:37:10 +08:00
TextWrapping="Wrap"
2020-05-12 03:36:55 +08:00
Margin="{StaticResource SmallTopMargin}"/>
2020-05-06 01:02:31 +08:00
2021-07-05 22:25:23 +08:00
<Button x:Uid="GeneralPage_RestartAsAdmin_Button"
2020-05-06 01:02:31 +08:00
Margin="{StaticResource SmallTopMargin}"
2020-08-14 06:02:05 +08:00
Command = "{Binding RestartElevatedButtonEventHandler}"
IsEnabled="{Binding Mode=TwoWay, Path=IsAdminButtonEnabled}"
2020-05-06 01:02:31 +08:00
/>
2021-07-05 22:25:23 +08:00
<TextBlock x:Uid="General_RunAsAdminRequired"
2020-05-12 03:36:55 +08:00
Foreground="{ThemeResource SystemControlErrorTextForegroundBrush}"
2020-10-23 05:37:10 +08:00
TextWrapping="Wrap"
2020-08-14 06:02:05 +08:00
Visibility="{Binding Mode=TwoWay, Path=IsElevated, Converter={StaticResource BoolToVisibilityConverter}}"
2020-05-12 03:36:55 +08:00
Margin="0,24,0,-8" />
2020-05-06 01:02:31 +08:00
2021-07-05 22:25:23 +08:00
<ToggleSwitch Margin="{StaticResource SmallTopMargin}"
2020-05-12 03:36:55 +08:00
x:Uid="GeneralSettings_AlwaysRunAsAdminText"
2020-08-14 06:02:05 +08:00
IsEnabled="{Binding Mode=TwoWay, Path=IsElevated}"
IsOn="{Binding Mode=TwoWay, Path=RunElevated}"/>
2020-07-25 03:02:56 +08:00
2021-07-05 22:25:23 +08:00
<HyperlinkButton NavigateUri="https://aka.ms/powertoysDetectedElevatedHelp">
<TextBlock x:Uid="GeneralPage_ToggleSwitch_AlwaysRunElevated_Link" TextWrapping="Wrap" />
</HyperlinkButton>
2020-05-12 03:36:55 +08:00
2021-07-05 22:25:23 +08:00
<TextBlock x:Uid="ShortcutGuide_Appearance_Behavior"
2020-05-12 03:36:55 +08:00
Style="{StaticResource SettingsGroupTitleStyle}"/>
2020-05-06 01:02:31 +08:00
2021-07-05 22:25:23 +08:00
<!-- Replaced the Radiobuttons parent control with a StackPanel to mitigate the Tab and Arrow key related keyboard navigation issues due to XAML Islands
2020-08-20 02:29:13 +08:00
Tracking issue in the winui repository - https://github.com/microsoft/microsoft-ui-xaml/issues/3156 -->
2021-07-05 22:25:23 +08:00
<TextBlock x:Name="RadioButtons_Name_Theme"
2020-10-25 21:37:43 +08:00
x:Uid="ColorModeHeader"
2020-08-20 02:29:13 +08:00
Margin="{StaticResource SmallTopMargin}"/>
2021-07-05 22:25:23 +08:00
<StackPanel AutomationProperties.LabeledBy="{Binding ElementName=RadioButtons_Name_Theme}">
<RadioButton x:Uid="Radio_Theme_Dark"
2020-08-14 06:02:05 +08:00
IsChecked="{ Binding Mode=TwoWay, Path=IsDarkThemeRadioButtonChecked}"/>
2020-04-18 06:25:08 +08:00
2021-07-05 22:25:23 +08:00
<RadioButton x:Uid="Radio_Theme_Light"
2020-08-14 06:02:05 +08:00
IsChecked="{ Binding Mode=TwoWay, Path=IsLightThemeRadioButtonChecked}"/>
2020-04-18 06:25:08 +08:00
2021-07-05 22:25:23 +08:00
<RadioButton x:Uid="Radio_Theme_Default"
2020-08-14 06:02:05 +08:00
IsChecked="{ Binding Mode=TwoWay, Path=IsSystemThemeRadioButtonChecked}"/>
2021-07-05 22:25:23 +08:00
<HyperlinkButton Click="OpenColorsSettings_Click">
<TextBlock x:Uid="Windows_Color_Settings" />
</HyperlinkButton>
</StackPanel>
2020-07-25 03:02:56 +08:00
2021-07-05 22:25:23 +08:00
<ToggleSwitch x:Uid="GeneralPage_ToggleSwitch_RunAtStartUp"
2020-05-12 03:36:55 +08:00
Margin="{StaticResource SmallTopMargin}"
2020-08-14 06:02:05 +08:00
IsOn="{Binding Mode=TwoWay, Path=Startup}"/>
2020-07-25 03:02:56 +08:00
2021-07-05 22:25:23 +08:00
<TextBlock x:Uid="General_Updates"
2020-07-25 03:02:56 +08:00
Style="{StaticResource SettingsGroupTitleStyle}"/>
2021-05-21 18:32:34 +08:00
2021-07-28 18:07:43 +08:00
2021-07-05 22:25:23 +08:00
<StackPanel Visibility="{Binding PowerToysUpdatingState, Converter={StaticResource UpdatingStateUpToDateToVisibilityConverter}}">
2021-05-21 18:32:34 +08:00
2021-07-28 18:07:43 +08:00
<TextBlock Margin="{StaticResource SmallTopMargin}" Opacity="{Binding AutoUpdatesEnabled, Converter={StaticResource ModuleEnabledToOpacityConverter}}">
<Run x:Uid="General_Version" />
<Run Text="{Binding PowerToysVersion}"/>
</TextBlock>
2021-05-21 18:32:34 +08:00
2021-07-28 18:07:43 +08:00
<TextBlock Margin="{StaticResource SmallTopMargin}" Opacity="{Binding AutoUpdatesEnabled, Converter={StaticResource ModuleEnabledToOpacityConverter}}">
<Run x:Uid="General_VersionLastChecked" />
<Run Text="{Binding UpdateCheckedDate, Mode=OneWay}"/>
</TextBlock>
2021-05-21 18:32:34 +08:00
2021-07-28 18:07:43 +08:00
<TextBlock x:Uid="General_CheckingForUpdates" Margin="{StaticResource SmallTopMargin}" Visibility="{Binding IsNewVersionDownloading, Converter={StaticResource VisibleIfTrueConverter}}"/>
2021-05-21 18:32:34 +08:00
2021-07-28 18:07:43 +08:00
<TextBlock x:Uid="General_UpToDate"
Margin="{StaticResource SmallTopMargin}"
Opacity="{Binding AutoUpdatesEnabled, Converter={StaticResource ModuleEnabledToOpacityConverter}}"
Visibility="{Binding IsNewVersionCheckedAndUpToDate, Converter={StaticResource VisibleIfTrueConverter}}"/>
2021-05-21 18:32:34 +08:00
2021-07-05 22:25:23 +08:00
<Button x:Uid="GeneralPage_CheckForUpdates"
2020-08-20 02:29:13 +08:00
Margin="{StaticResource SmallTopMargin}"
2021-05-21 18:32:34 +08:00
Command="{Binding CheckForUpdatesEventHandler}"
IsEnabled="{Binding IsDownloadAllowed}"
/>
2021-07-05 22:25:23 +08:00
</StackPanel>
2021-05-21 18:32:34 +08:00
2021-07-28 18:07:43 +08:00
<StackPanel Visibility="{Binding PowerToysUpdatingState, Converter={StaticResource UpdatingStateReadyToDownloadToVisibilityConverter}}">
<TextBlock Margin="{StaticResource SmallTopMargin}" Opacity="{Binding AutoUpdatesEnabled, Converter={StaticResource ModuleEnabledToOpacityConverter}}">
<Run x:Uid="General_Version" />
<Run Text="{Binding PowerToysVersion}" />
</TextBlock>
2021-05-21 18:32:34 +08:00
2021-07-05 22:25:23 +08:00
<StackPanel Orientation="Horizontal"
2021-05-21 18:32:34 +08:00
Margin="{StaticResource SmallTopMargin}"
AutomationProperties.LabeledBy="{Binding ElementName=General_Version}">
2021-07-05 22:25:23 +08:00
<TextBlock x:Name="General_NewVersionAvailable"
2021-05-21 21:03:18 +08:00
x:Uid="General_NewVersionAvailable"
FontWeight="SemiBold"
2021-07-02 18:24:49 +08:00
Opacity="{Binding AutoUpdatesEnabled, Converter={StaticResource ModuleEnabledToOpacityConverter}}"/>
2021-07-17 03:21:06 +08:00
<HyperlinkButton NavigateUri="{Binding PowerToysNewAvailableVersionLink}" Content="{Binding PowerToysNewAvailableVersion}" Margin="4,-6,0,0" IsEnabled="{Binding AutoUpdatesEnabled}"/>
2021-07-05 22:25:23 +08:00
</StackPanel>
2021-05-21 18:32:34 +08:00
2021-07-05 22:25:23 +08:00
<TextBlock x:Name="General_Downloading"
2021-05-21 18:32:34 +08:00
x:Uid="General_Downloading"
Visibility="{Binding Mode=OneWay, Path=IsNewVersionDownloading, Converter={StaticResource VisibleIfTrueConverter}}"
2021-07-02 18:24:49 +08:00
Opacity="{Binding AutoUpdatesEnabled, Converter={StaticResource ModuleEnabledToOpacityConverter}}"/>
2021-05-21 18:32:34 +08:00
2021-07-05 22:25:23 +08:00
<Button x:Uid="General_DownloadAndInstall"
2021-05-21 18:32:34 +08:00
Margin="{StaticResource SmallTopMargin}"
Command="{Binding UpdateNowButtonEventHandler}"
IsEnabled="{Binding IsDownloadAllowed}"/>
2021-07-05 22:25:23 +08:00
</StackPanel>
2020-07-25 03:02:56 +08:00
2021-07-05 22:25:23 +08:00
<StackPanel Visibility="{Binding PowerToysUpdatingState, Converter={StaticResource UpdatingStateReadyToInstallToVisibilityConverter}}">
2021-07-28 18:07:43 +08:00
<TextBlock Margin="{StaticResource SmallTopMargin}" Opacity="{Binding AutoUpdatesEnabled, Converter={StaticResource ModuleEnabledToOpacityConverter}}">
<Run x:Uid="General_Version" />
<Run Text="{Binding PowerToysVersion}"/>
</TextBlock>
2021-07-05 22:25:23 +08:00
<StackPanel Orientation="Horizontal"
2021-05-21 18:32:34 +08:00
Margin="{StaticResource SmallTopMargin}"
AutomationProperties.LabeledBy="{Binding ElementName=General_Version}">
2021-07-05 22:25:23 +08:00
<TextBlock x:Name="General_NewVersionReadyToInstall"
2021-05-21 21:03:18 +08:00
x:Uid="General_NewVersionReadyToInstall"
Style="{StaticResource SemiBoldBody}"
2021-07-02 18:24:49 +08:00
Opacity="{Binding AutoUpdatesEnabled, Converter={StaticResource ModuleEnabledToOpacityConverter}}"/>
2021-07-17 03:21:06 +08:00
<HyperlinkButton NavigateUri="{Binding PowerToysNewAvailableVersionLink}" Content="{Binding PowerToysNewAvailableVersion}" Margin="4,-6,0,0" IsEnabled="{Binding AutoUpdatesEnabled}"/>
2021-07-05 22:25:23 +08:00
</StackPanel>
2021-05-21 18:32:34 +08:00
2021-07-05 22:25:23 +08:00
<Button x:Uid="General_InstallNow"
2021-05-21 18:32:34 +08:00
Margin="{StaticResource SmallTopMargin}"
Command="{Binding UpdateNowButtonEventHandler}"
IsEnabled="{Binding AutoUpdatesEnabled}"/>
2021-07-05 22:25:23 +08:00
</StackPanel>
2020-07-25 03:02:56 +08:00
2021-07-05 22:25:23 +08:00
<StackPanel Visibility="{Binding PowerToysUpdatingState, Converter={StaticResource UpdatingStateCannotDownloadToVisibilityConverter}}">
2021-05-21 18:32:34 +08:00
2021-07-28 18:07:43 +08:00
<TextBlock Margin="{StaticResource SmallTopMargin}" Opacity="{Binding AutoUpdatesEnabled, Converter={StaticResource ModuleEnabledToOpacityConverter}}">
<Run x:Uid="General_Version" />
<Run Text="{Binding PowerToysVersion}"/>
</TextBlock>
2021-07-05 22:25:23 +08:00
<StackPanel Orientation="Horizontal"
2021-05-21 18:32:34 +08:00
Margin="{StaticResource SmallTopMargin}"
AutomationProperties.LabeledBy="{Binding ElementName=General_Version}">
2021-07-05 22:25:23 +08:00
<TextBlock x:Name="General_FailedToDownloadTheNewVersion"
2021-05-21 18:32:34 +08:00
x:Uid="General_FailedToDownloadTheNewVersion"
2021-05-21 20:15:36 +08:00
Foreground="{ThemeResource SystemControlErrorTextForegroundBrush}"/>
2021-07-17 03:21:06 +08:00
<HyperlinkButton NavigateUri="{Binding PowerToysNewAvailableVersionLink}" Content="{Binding PowerToysNewAvailableVersion}" Margin="4,-6,0,0" IsEnabled="{Binding AutoUpdatesEnabled}"/>
2021-07-05 22:25:23 +08:00
</StackPanel>
2021-05-21 18:32:34 +08:00
2021-07-05 22:25:23 +08:00
<TextBlock x:Name="General_Downloading_TryAgain"
2021-05-21 18:32:34 +08:00
x:Uid="General_Downloading"
Visibility="{Binding Mode=OneWay, Path=IsNewVersionDownloading, Converter={StaticResource VisibleIfTrueConverter}}"
2021-07-02 18:24:49 +08:00
Opacity="{Binding AutoUpdatesEnabled, Converter={StaticResource ModuleEnabledToOpacityConverter}}"/>
2021-07-05 22:25:23 +08:00
<Button x:Uid="General_TryAgainToDownloadAndInstall"
2021-05-21 18:32:34 +08:00
Margin="{StaticResource SmallTopMargin}"
Command="{Binding UpdateNowButtonEventHandler}"
IsEnabled="{Binding IsDownloadAllowed}"/>
2021-07-05 22:25:23 +08:00
</StackPanel>
2020-05-12 03:36:55 +08:00
2021-07-28 18:07:43 +08:00
2021-07-05 22:25:23 +08:00
<ToggleSwitch x:Uid="GeneralPage_ToggleSwitch_AutoDownloadUpdates"
2020-05-12 03:36:55 +08:00
Margin="{StaticResource MediumTopMargin}"
2020-08-14 06:02:05 +08:00
Visibility="{Binding Mode=TwoWay, Path=IsAdmin, Converter={StaticResource VisibleIfTrueConverter}}"
2021-01-12 23:34:02 +08:00
IsOn="{Binding Mode=TwoWay, Path=AutoDownloadUpdates}"
IsEnabled="{Binding AutoUpdatesEnabled}" />
2020-07-25 03:02:56 +08:00
</StackPanel>
2021-07-05 22:25:23 +08:00
</controls:SettingsPageControl.ModuleContent>
<!--
2021-03-03 01:56:37 +08:00
<HyperlinkButton Click="OobeButton_Click">
<TextBlock x:Uid="Oobe_Button"/>
2021-07-05 22:25:23 +08:00
</HyperlinkButton> -->
<!-- Side panel -->
<controls:SettingsPageControl.ModuleLinks>
2021-08-19 22:32:03 +08:00
<controls:SidePanelLink x:Uid="GeneralPage_Documentation" Link="https://aka.ms/PowerToysOverview"/>
2021-07-05 22:25:23 +08:00
<controls:SidePanelLink x:Uid="General_Repository" Link="https://aka.ms/powertoys"/>
<controls:SidePanelLink x:Uid="GeneralPage_ReportAbug" Link="https://aka.ms/powerToysReportBug"/>
<controls:SidePanelLink x:Uid="GeneralPage_RequestAFeature_URL" Link="https://aka.ms/powerToysRequestFeature"/>
<controls:SidePanelLink x:Uid="GeneralPage_PrivacyStatement_URL" Link="http://go.microsoft.com/fwlink/?LinkId=521839"/>
<controls:SidePanelLink x:Uid="OpenSource_Notice" Link="https://github.com/microsoft/PowerToys/blob/master/NOTICE.md"/>
</controls:SettingsPageControl.ModuleLinks>
</controls:SettingsPageControl>
2020-07-25 03:02:56 +08:00
</Page>