mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 09:46:54 +02:00
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request Based on https://github.com/microsoft/PowerToys/pull/40260#issuecomment-3085099815 feedback, this PR remove the title bar shutdown button in favor of a menu item in the navigation view footer. - Menu item is visible only when tray icon is hidden - A confirm dialog has been added <img width="848" height="448" alt="image" src="https://github.com/user-attachments/assets/529bcfa9-94ed-48b1-b2bb-ca6993d12e0f" /> <img width="848" height="448" alt="image" src="https://github.com/user-attachments/assets/febafbb4-3a5b-4b04-8065-28f0d269ab6c" /> - Close is used in tray icon menu for closing app <img alt="image" src="https://github.com/user-attachments/assets/3ac79a8c-961f-4f95-8967-adef00aba77b" /> <img alt="image" src="https://github.com/user-attachments/assets/c2800a77-c733-41a9-aa4f-fa4c2afd30a3" /> <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] **Closes:** #40346 #40577 - [x] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [x] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed - Open settings with tray icon visible: close menu is hidden - Open settings with tray icon hidden: close menu is visible - Tested close menu visibility change when tray icon option is changed - Tested cancel button of close dialog - Tested close button of dialog --------- Co-authored-by: Niels Laute <niels.laute@live.nl>
503 lines
34 KiB
XML
503 lines
34 KiB
XML
<Page
|
|
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:Microsoft.PowerToys.Settings.UI.Controls"
|
|
xmlns:converters="using:Microsoft.PowerToys.Settings.UI.Converters"
|
|
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">
|
|
|
|
<Page.Resources>
|
|
<converters:StringToInfoBarSeverityConverter x:Key="StringToInfoBarSeverityConverter" />
|
|
</Page.Resources>
|
|
|
|
<controls:SettingsPageControl x:Uid="General" ModuleImageSource="ms-appx:///Assets/Settings/Modules/PT.png">
|
|
<controls:SettingsPageControl.ModuleContent>
|
|
<StackPanel ChildrenTransitions="{StaticResource SettingsCardsAnimations}" Orientation="Vertical">
|
|
<controls:SettingsGroup x:Uid="General_VersionAndUpdate" Margin="0,-32,0,0">
|
|
<tkcontrols:SettingsExpander Header="{x:Bind ViewModel.PowerToysVersion, Mode=OneWay}" HeaderIcon="{ui:FontIcon Glyph=}">
|
|
<tkcontrols:SettingsExpander.Description>
|
|
<StackPanel Orientation="Vertical">
|
|
<TextBlock Style="{StaticResource SecondaryTextStyle}">
|
|
<Run x:Uid="General_VersionLastChecked" />
|
|
<Run Text="{x:Bind ViewModel.UpdateCheckedDate, Mode=OneWay}" />
|
|
</TextBlock>
|
|
<HyperlinkButton
|
|
x:Uid="ReleaseNotes"
|
|
Margin="0,2,0,0"
|
|
FontWeight="SemiBold"
|
|
NavigateUri="https://github.com/microsoft/PowerToys/releases/" />
|
|
</StackPanel>
|
|
</tkcontrols:SettingsExpander.Description>
|
|
<Grid Visibility="{x:Bind ViewModel.IsUpdatePanelVisible, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}">
|
|
<StackPanel
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal"
|
|
Spacing="18"
|
|
Visibility="{x:Bind ViewModel.IsNewVersionDownloading, Converter={StaticResource BoolToVisibilityConverter}, Mode=OneWay}">
|
|
<ProgressRing Width="24" Height="24" />
|
|
<TextBlock
|
|
x:Uid="General_CheckingForUpdates"
|
|
VerticalAlignment="Center"
|
|
FontWeight="SemiBold"
|
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}" />
|
|
</StackPanel>
|
|
|
|
<Button
|
|
x:Uid="GeneralPage_CheckForUpdates"
|
|
HorizontalAlignment="Right"
|
|
Command="{Binding CheckForUpdatesEventHandler}"
|
|
IsEnabled="{Binding IsDownloadAllowed}"
|
|
Visibility="{Binding Mode=OneWay, Path=IsNewVersionDownloading, Converter={StaticResource BoolNegationConverter}}" />
|
|
</Grid>
|
|
<tkcontrols:SettingsExpander.ItemsHeader>
|
|
<InfoBar
|
|
x:Uid="GPO_SomeSettingsAreManaged"
|
|
BorderThickness="0"
|
|
CornerRadius="0"
|
|
IsClosable="False"
|
|
IsOpen="{x:Bind ViewModel.SomeUpdateSettingsAreGpoManaged, Mode=OneWay}"
|
|
IsTabStop="{x:Bind ViewModel.SomeUpdateSettingsAreGpoManaged, Mode=OneWay}"
|
|
Severity="Informational">
|
|
<InfoBar.IconSource>
|
|
<FontIconSource FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="" />
|
|
</InfoBar.IconSource>
|
|
</InfoBar>
|
|
</tkcontrols:SettingsExpander.ItemsHeader>
|
|
<tkcontrols:SettingsExpander.Items>
|
|
<tkcontrols:SettingsCard
|
|
ContentAlignment="Left"
|
|
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsAutoDownloadUpdatesCardEnabled}"
|
|
Visibility="{x:Bind ViewModel.IsAdmin, Converter={StaticResource BoolToVisibilityConverter}, Mode=OneWay}">
|
|
<controls:CheckBoxWithDescriptionControl x:Uid="GeneralPage_AutoDownloadAndInstallUpdates" IsChecked="{Binding Mode=TwoWay, Path=AutoDownloadUpdates}" />
|
|
</tkcontrols:SettingsCard>
|
|
<tkcontrols:SettingsCard ContentAlignment="Left" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsShowNewUpdatesToastNotificationCardEnabled}">
|
|
<controls:CheckBoxWithDescriptionControl x:Uid="GeneralPage_ShowNewUpdatesToast" IsChecked="{Binding Mode=TwoWay, Path=ShowNewUpdatesToastNotification}" />
|
|
</tkcontrols:SettingsCard>
|
|
<tkcontrols:SettingsCard ContentAlignment="Left" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsShowWhatsNewAfterUpdatesCardEnabled}">
|
|
<CheckBox x:Uid="GeneralPage_ShowWhatsNewAfterUpdates" IsChecked="{Binding Mode=TwoWay, Path=ShowWhatsNewAfterUpdates}" />
|
|
</tkcontrols:SettingsCard>
|
|
</tkcontrols:SettingsExpander.Items>
|
|
</tkcontrols:SettingsExpander>
|
|
|
|
<StackPanel Orientation="Vertical">
|
|
<InfoBar
|
|
x:Uid="General_UpToDate"
|
|
IsClosable="False"
|
|
IsOpen="{x:Bind ViewModel.IsNewVersionCheckedAndUpToDate, Mode=OneWay}"
|
|
IsTabStop="{x:Bind ViewModel.IsNewVersionCheckedAndUpToDate, Mode=OneWay}"
|
|
Severity="Success" />
|
|
|
|
<!-- Network error while checking for new version -->
|
|
<InfoBar
|
|
x:Uid="General_CantCheck"
|
|
IsClosable="False"
|
|
IsOpen="{x:Bind ViewModel.IsNoNetwork, Mode=OneWay}"
|
|
IsTabStop="{x:Bind ViewModel.IsNoNetwork, Mode=OneWay}"
|
|
Severity="Error" />
|
|
|
|
<!-- New version available -->
|
|
<InfoBar
|
|
x:Uid="General_NewVersionAvailable"
|
|
IsClosable="False"
|
|
IsOpen="{x:Bind ViewModel.PowerToysUpdatingState, Mode=OneWay, Converter={StaticResource UpdateStateToBoolConverter}, ConverterParameter=ReadyToDownload}"
|
|
IsTabStop="{x:Bind ViewModel.PowerToysUpdatingState, Mode=OneWay, Converter={StaticResource UpdateStateToBoolConverter}, ConverterParameter=ReadyToDownload}"
|
|
Message="{x:Bind ViewModel.PowerToysNewAvailableVersion, Mode=OneWay}"
|
|
Severity="Informational">
|
|
|
|
<InfoBar.Content>
|
|
<StackPanel Spacing="16">
|
|
<Button
|
|
x:Uid="General_DownloadAndInstall"
|
|
Margin="0,0,0,16"
|
|
Command="{Binding UpdateNowButtonEventHandler}"
|
|
IsEnabled="{Binding IsDownloadAllowed}"
|
|
Visibility="{Binding Mode=OneWay, Path=IsNewVersionDownloading, Converter={StaticResource BoolNegationConverter}}" />
|
|
|
|
<!-- In progress panel -->
|
|
<StackPanel
|
|
Margin="0,0,0,16"
|
|
Orientation="Horizontal"
|
|
Spacing="18"
|
|
Visibility="{x:Bind ViewModel.IsNewVersionDownloading, Converter={StaticResource BoolToVisibilityConverter}, Mode=OneWay}">
|
|
<ProgressRing Width="24" Height="24" />
|
|
<TextBlock
|
|
x:Uid="General_Downloading"
|
|
FontWeight="SemiBold"
|
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</InfoBar.Content>
|
|
<InfoBar.ActionButton>
|
|
<HyperlinkButton
|
|
x:Uid="SeeWhatsNew"
|
|
HorizontalAlignment="Right"
|
|
NavigateUri="{Binding PowerToysNewAvailableVersionLink, Mode=OneWay}"
|
|
Style="{StaticResource TextButtonStyle}" />
|
|
</InfoBar.ActionButton>
|
|
</InfoBar>
|
|
|
|
|
|
<!-- Ready to install -->
|
|
<InfoBar
|
|
x:Uid="General_NewVersionReadyToInstall"
|
|
IsClosable="False"
|
|
IsOpen="{x:Bind ViewModel.PowerToysUpdatingState, Mode=OneWay, Converter={StaticResource UpdateStateToBoolConverter}, ConverterParameter=ReadyToInstall}"
|
|
IsTabStop="{x:Bind ViewModel.PowerToysUpdatingState, Mode=OneWay, Converter={StaticResource UpdateStateToBoolConverter}, ConverterParameter=ReadyToInstall}"
|
|
Message="{x:Bind ViewModel.PowerToysNewAvailableVersion, Mode=OneWay}"
|
|
Severity="Success">
|
|
<InfoBar.Content>
|
|
<Button
|
|
x:Uid="General_InstallNow"
|
|
Margin="0,0,0,16"
|
|
Command="{Binding UpdateNowButtonEventHandler}"
|
|
IsEnabled="{Binding IsDownloadAllowed}" />
|
|
</InfoBar.Content>
|
|
<InfoBar.ActionButton>
|
|
<HyperlinkButton
|
|
x:Uid="SeeWhatsNew"
|
|
HorizontalAlignment="Right"
|
|
NavigateUri="{Binding PowerToysNewAvailableVersionLink, Mode=OneWay}"
|
|
Style="{StaticResource TextButtonStyle}" />
|
|
</InfoBar.ActionButton>
|
|
</InfoBar>
|
|
|
|
<!-- Install failed -->
|
|
<InfoBar
|
|
x:Uid="General_FailedToDownloadTheNewVersion"
|
|
IsClosable="False"
|
|
IsOpen="{x:Bind ViewModel.PowerToysUpdatingState, Mode=OneWay, Converter={StaticResource UpdateStateToBoolConverter}, ConverterParameter=ErrorDownloading}"
|
|
IsTabStop="{x:Bind ViewModel.PowerToysUpdatingState, Mode=OneWay, Converter={StaticResource UpdateStateToBoolConverter}, ConverterParameter=ErrorDownloading}"
|
|
Message="{x:Bind ViewModel.PowerToysNewAvailableVersion, Mode=OneWay}"
|
|
Severity="Error">
|
|
<InfoBar.Content>
|
|
<StackPanel Spacing="16">
|
|
<Button
|
|
x:Uid="General_TryAgainToDownloadAndInstall"
|
|
Command="{Binding UpdateNowButtonEventHandler}"
|
|
IsEnabled="{Binding IsDownloadAllowed}"
|
|
Visibility="{Binding Mode=OneWay, Path=IsNewVersionDownloading, Converter={StaticResource BoolNegationConverter}}" />
|
|
|
|
<!-- In progress panel -->
|
|
<StackPanel
|
|
Margin="0,0,0,16"
|
|
Orientation="Horizontal"
|
|
Spacing="18"
|
|
Visibility="{x:Bind ViewModel.IsNewVersionDownloading, Converter={StaticResource BoolToVisibilityConverter}}">
|
|
<ProgressRing Width="24" Height="24" />
|
|
<TextBlock
|
|
x:Uid="General_Downloading"
|
|
FontWeight="SemiBold"
|
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</InfoBar.Content>
|
|
<InfoBar.ActionButton>
|
|
<HyperlinkButton
|
|
x:Uid="SeeWhatsNew"
|
|
HorizontalAlignment="Right"
|
|
NavigateUri="{Binding PowerToysNewAvailableVersionLink, Mode=OneWay}"
|
|
Style="{StaticResource TextButtonStyle}" />
|
|
</InfoBar.ActionButton>
|
|
</InfoBar>
|
|
</StackPanel>
|
|
</controls:SettingsGroup>
|
|
|
|
<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">
|
|
<tkcontrols:SettingsExpander.Description>
|
|
<HyperlinkButton x:Uid="GeneralPage_ToggleSwitch_AlwaysRunElevated_Link" NavigateUri="https://aka.ms/powertoysDetectedElevatedHelp" />
|
|
</tkcontrols:SettingsExpander.Description>
|
|
<Button
|
|
x:Uid="GeneralPage_RestartAsAdmin_Button"
|
|
Command="{Binding RestartElevatedButtonEventHandler}"
|
|
IsEnabled="{Binding IsAdminButtonEnabled}" />
|
|
<tkcontrols:SettingsExpander.Items>
|
|
<tkcontrols:SettingsCard ContentAlignment="Left" IsEnabled="{x:Bind ViewModel.IsElevated, Mode=OneWay}">
|
|
<controls:CheckBoxWithDescriptionControl x:Uid="GeneralSettings_AlwaysRunAsAdminText" IsChecked="{x:Bind ViewModel.RunElevated, Mode=TwoWay}" />
|
|
</tkcontrols:SettingsCard>
|
|
<tkcontrols:SettingsCard ContentAlignment="Left">
|
|
<CheckBox x:Uid="GeneralPage_WarningsElevatedApps" IsChecked="{Binding Mode=TwoWay, Path=EnableWarningsElevatedApps}" />
|
|
</tkcontrols:SettingsCard>
|
|
</tkcontrols:SettingsExpander.Items>
|
|
</tkcontrols:SettingsExpander>
|
|
</controls:SettingsGroup>
|
|
|
|
<controls:SettingsGroup x:Uid="Appearance_Behavior" IsEnabled="True">
|
|
<tkcontrols:SettingsCard x:Uid="LanguageHeader" HeaderIcon="{ui:FontIcon Glyph=}">
|
|
<ComboBox
|
|
x:Name="Languages_ComboBox"
|
|
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
|
DisplayMemberPath="Language"
|
|
ItemsSource="{Binding Languages, Mode=TwoWay}"
|
|
SelectedIndex="{Binding LanguagesIndex, Mode=TwoWay}" />
|
|
</tkcontrols:SettingsCard>
|
|
<InfoBar
|
|
x:Uid="LanguageRestartInfo"
|
|
IsClosable="False"
|
|
IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.LanguageChanged}"
|
|
IsTabStop="True"
|
|
Severity="Informational">
|
|
<InfoBar.ActionButton>
|
|
<Button x:Uid="LanguageRestartInfoButton" Click="Click_LanguageRestart" />
|
|
</InfoBar.ActionButton>
|
|
</InfoBar>
|
|
|
|
<tkcontrols:SettingsCard x:Uid="ColorModeHeader" HeaderIcon="{ui:FontIcon Glyph=}">
|
|
<tkcontrols:SettingsCard.Description>
|
|
<HyperlinkButton x:Uid="Windows_Color_Settings" Click="OpenColorsSettings_Click" />
|
|
</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>
|
|
</tkcontrols:SettingsCard>
|
|
|
|
<tkcontrols:SettingsCard x:Uid="GeneralPage_RunAtStartUp" IsEnabled="{x:Bind ViewModel.IsRunAtStartupGPOManaged, Mode=OneWay, Converter={StaticResource BoolNegationConverter}}">
|
|
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.Startup, Mode=TwoWay}" />
|
|
</tkcontrols:SettingsCard>
|
|
|
|
<tkcontrols:SettingsCard x:Uid="ShowSystemTrayIcon">
|
|
<ToggleSwitch
|
|
x:Uid="ShowSystemTrayIcon_ToggleSwitch"
|
|
IsOn="{x:Bind ViewModel.ShowSysTrayIcon, Mode=TwoWay}"
|
|
Toggled="ShowSystemTrayIcon_Toggled" />
|
|
</tkcontrols:SettingsCard>
|
|
<InfoBar
|
|
x:Uid="GPO_SettingIsManaged"
|
|
BorderThickness="0"
|
|
CornerRadius="0"
|
|
IsClosable="False"
|
|
IsOpen="{x:Bind ViewModel.IsRunAtStartupGPOManaged, Mode=OneWay}"
|
|
IsTabStop="{x:Bind ViewModel.IsRunAtStartupGPOManaged, Mode=OneWay}"
|
|
Severity="Informational">
|
|
<InfoBar.IconSource>
|
|
<FontIconSource FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="" />
|
|
</InfoBar.IconSource>
|
|
</InfoBar>
|
|
</controls:SettingsGroup>
|
|
|
|
<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>
|
|
<tkcontrols:SettingsExpander.Items>
|
|
<tkcontrols:SettingsCard x:Uid="General_SettingsBackupAndRestoreLocationText">
|
|
<Grid ColumnSpacing="8">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock
|
|
x:Name="pathTextBlock"
|
|
VerticalAlignment="Center"
|
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
|
IsTextSelectionEnabled="True"
|
|
Text="{x:Bind ViewModel.SettingsBackupAndRestoreDir, Mode=TwoWay}"
|
|
TextWrapping="Wrap">
|
|
<ToolTipService.ToolTip>
|
|
<ToolTip IsEnabled="{Binding IsTextTrimmed, ElementName=pathTextBlock, Mode=OneWay}">
|
|
<TextBlock Text="{x:Bind ViewModel.SettingsBackupAndRestoreDir, Mode=TwoWay}" />
|
|
</ToolTip>
|
|
</ToolTipService.ToolTip>
|
|
</TextBlock>
|
|
<Button
|
|
x:Uid="General_SettingsBackupAndRestore_ButtonSelectFolder"
|
|
Grid.Column="1"
|
|
Command="{Binding SelectSettingBackupDirEventHandler}"
|
|
Content=""
|
|
FontFamily="{ThemeResource SymbolThemeFontFamily}">
|
|
<ToolTipService.ToolTip>
|
|
<ToolTip>
|
|
<TextBlock x:Uid="General_SettingsBackupAndRestore_ButtonSelectLocation" />
|
|
</ToolTip>
|
|
</ToolTipService.ToolTip>
|
|
</Button>
|
|
</Grid>
|
|
</tkcontrols:SettingsCard>
|
|
<tkcontrols:SettingsCard
|
|
x:Uid="General_SettingsBackupAndRestoreStatusInfo"
|
|
HorizontalContentAlignment="Left"
|
|
ContentAlignment="Vertical">
|
|
<Grid
|
|
Margin="0,0,0,6"
|
|
ColumnSpacing="36"
|
|
RowSpacing="4">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<TextBlock x:Uid="General_SettingsBackupInfo_StatusHeader" />
|
|
<TextBlock
|
|
Grid.Column="1"
|
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
|
TextWrapping="WrapWholeWords">
|
|
<Run Text="{x:Bind ViewModel.CurrentSettingMatchText, Mode=OneWay}" />
|
|
<Hyperlink Click="UpdateBackupAndRestoreStatusText" TextDecorations="Underline">
|
|
<Run x:Uid="General_SettingsBackupAndRestore_LinkRefresh" />
|
|
</Hyperlink>
|
|
</TextBlock>
|
|
|
|
<TextBlock x:Uid="General_SettingsBackupInfo_FileNameHeader" Grid.Row="1" />
|
|
<TextBlock
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
|
Text="{x:Bind ViewModel.LastSettingsBackupFileName, Mode=OneWay}"
|
|
TextWrapping="WrapWholeWords" />
|
|
|
|
<TextBlock x:Uid="General_SettingsBackupInfo_SourceHeader" Grid.Row="2" />
|
|
<TextBlock
|
|
Grid.Row="2"
|
|
Grid.Column="1"
|
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
|
Text="{x:Bind ViewModel.LastSettingsBackupSource, Mode=OneWay}"
|
|
TextWrapping="WrapWholeWords" />
|
|
<TextBlock x:Uid="General_SettingsBackupInfo_DateHeader" Grid.Row="3" />
|
|
<TextBlock
|
|
Grid.Row="3"
|
|
Grid.Column="1"
|
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
|
Text="{x:Bind ViewModel.LastSettingsBackupDate, Mode=OneWay}"
|
|
TextWrapping="WrapWholeWords" />
|
|
</Grid>
|
|
</tkcontrols:SettingsCard>
|
|
</tkcontrols:SettingsExpander.Items>
|
|
</tkcontrols:SettingsExpander>
|
|
</controls:SettingsGroup>
|
|
<InfoBar
|
|
x:Uid="General_SettingsBackupMessageResults"
|
|
Title="{x:Bind ViewModel.SettingsBackupMessage, Mode=OneWay}"
|
|
IsClosable="False"
|
|
IsOpen="{x:Bind ViewModel.SettingsBackupRestoreMessageVisible, Mode=OneWay}"
|
|
IsTabStop="{x:Bind ViewModel.SettingsBackupRestoreMessageVisible, Mode=OneWay}"
|
|
Severity="{x:Bind ViewModel.BackupRestoreMessageSeverity, Converter={StaticResource StringToInfoBarSeverityConverter}}" />
|
|
<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" />
|
|
</tkcontrols:SettingsCard.HeaderIcon>
|
|
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.EnableExperimentation, Mode=TwoWay}" />
|
|
</tkcontrols:SettingsCard>
|
|
<InfoBar
|
|
x:Uid="GPO_SettingIsManaged"
|
|
IsClosable="False"
|
|
IsOpen="{x:Bind ViewModel.IsExperimentationGpoDisallowed, Mode=OneWay}"
|
|
IsTabStop="{x:Bind ViewModel.IsExperimentationGpoDisallowed, Mode=OneWay}"
|
|
Severity="Informational">
|
|
<InfoBar.IconSource>
|
|
<FontIconSource FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="" />
|
|
</InfoBar.IconSource>
|
|
</InfoBar>
|
|
</controls:SettingsGroup>
|
|
<controls:SettingsGroup x:Uid="General_DiagnosticsAndFeedback">
|
|
<tkcontrols:SettingsExpander
|
|
x:Uid="GeneralPage_EnableDataDiagnostics"
|
|
HeaderIcon="{ui:FontIcon Glyph=}"
|
|
IsEnabled="{x:Bind ViewModel.IsDataDiagnosticsGPOManaged, Mode=OneWay, Converter={StaticResource BoolNegationConverter}}"
|
|
IsExpanded="True">
|
|
<tkcontrols:SettingsExpander.Description>
|
|
<StackPanel Orientation="Vertical">
|
|
<TextBlock
|
|
x:Uid="GeneralPage_EnableDataDiagnosticsText"
|
|
Style="{StaticResource SecondaryTextStyle}"
|
|
TextWrapping="WrapWholeWords" />
|
|
<HyperlinkButton
|
|
x:Uid="GeneralPage_DiagnosticsAndFeedback_Link"
|
|
Margin="0,2,0,0"
|
|
FontWeight="SemiBold"
|
|
NavigateUri="https://aka.ms/powertoys-data-and-privacy-documentation" />
|
|
</StackPanel>
|
|
</tkcontrols:SettingsExpander.Description>
|
|
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.EnableDataDiagnostics, Mode=TwoWay}" />
|
|
<tkcontrols:SettingsExpander.Items>
|
|
<tkcontrols:SettingsCard x:Uid="GeneralPage_EnableViewDiagnosticData" IsEnabled="{x:Bind ViewModel.EnableDataDiagnostics, Mode=TwoWay}">
|
|
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.EnableViewDataDiagnostics, Mode=TwoWay}" />
|
|
<tkcontrols:SettingsCard.Description>
|
|
<StackPanel Orientation="Vertical">
|
|
<TextBlock
|
|
x:Uid="GeneralPage_EnableViewDiagnosticDataText"
|
|
Style="{StaticResource SecondaryTextStyle}"
|
|
TextWrapping="WrapWholeWords" />
|
|
<HyperlinkButton
|
|
Margin="0,2,0,0"
|
|
Click="ViewDiagnosticData_Click"
|
|
Content="View diagnostic data"
|
|
FontWeight="SemiBold" />
|
|
</StackPanel>
|
|
</tkcontrols:SettingsCard.Description>
|
|
</tkcontrols:SettingsCard>
|
|
</tkcontrols:SettingsExpander.Items>
|
|
<tkcontrols:SettingsExpander.ItemsFooter>
|
|
<InfoBar
|
|
x:Uid="GeneralPage_ViewDiagnosticDataViewerInfo"
|
|
BorderThickness="0"
|
|
CornerRadius="0,0,4,4"
|
|
IsClosable="False"
|
|
IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.ViewDiagnosticDataViewerChanged}"
|
|
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.ViewDiagnosticDataViewerChanged}"
|
|
Severity="Informational">
|
|
<InfoBar.ActionButton>
|
|
<Button x:Uid="GeneralPage_ViewDiagnosticDataViewerInfoButton" Click="Click_ViewDiagnosticDataViewerRestart" />
|
|
</InfoBar.ActionButton>
|
|
</InfoBar>
|
|
</tkcontrols:SettingsExpander.ItemsFooter>
|
|
</tkcontrols:SettingsExpander>
|
|
<InfoBar
|
|
x:Uid="GPO_SettingIsManaged"
|
|
IsClosable="False"
|
|
IsOpen="{x:Bind ViewModel.IsDataDiagnosticsGPOManaged, Mode=OneWay}"
|
|
IsTabStop="{x:Bind ViewModel.IsDataDiagnosticsGPOManaged, Mode=OneWay}"
|
|
Severity="Informational">
|
|
<InfoBar.IconSource>
|
|
<FontIconSource FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="" />
|
|
</InfoBar.IconSource>
|
|
</InfoBar>
|
|
<tkcontrols:SettingsCard x:Uid="GeneralPage_ReportBugPackage" HeaderIcon="{ui:FontIcon Glyph=}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<Button
|
|
x:Uid="GeneralPageReportBugPackage"
|
|
Click="BugReportToolClicked"
|
|
Visibility="{x:Bind ViewModel.IsBugReportRunning, Converter={StaticResource ReverseBoolToVisibilityConverter}, Mode=OneWay}" />
|
|
<ProgressRing
|
|
Width="24"
|
|
Height="24"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Center"
|
|
Visibility="{x:Bind ViewModel.IsBugReportRunning, Mode=OneWay}" />
|
|
</StackPanel>
|
|
</tkcontrols:SettingsCard>
|
|
</controls:SettingsGroup>
|
|
</StackPanel>
|
|
|
|
</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="{x:Bind ViewModel.ReportBugLink, Mode=OneWay}" />
|
|
<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>
|