diff --git a/src/dsc/PowerToys.Settings.DSC.Schema.Generator/PowerToys.Settings.DSC.Schema.Generator.csproj b/src/dsc/PowerToys.Settings.DSC.Schema.Generator/PowerToys.Settings.DSC.Schema.Generator.csproj index 83ef8f96b4..3186a01d43 100644 --- a/src/dsc/PowerToys.Settings.DSC.Schema.Generator/PowerToys.Settings.DSC.Schema.Generator.csproj +++ b/src/dsc/PowerToys.Settings.DSC.Schema.Generator/PowerToys.Settings.DSC.Schema.Generator.csproj @@ -31,11 +31,11 @@ - + - + diff --git a/src/settings-ui/Settings.UI/PowerToys.Settings.csproj b/src/settings-ui/Settings.UI/PowerToys.Settings.csproj index 18ee80a5bf..68d0348c7d 100644 --- a/src/settings-ui/Settings.UI/PowerToys.Settings.csproj +++ b/src/settings-ui/Settings.UI/PowerToys.Settings.csproj @@ -161,6 +161,9 @@ MSBuild:Compile + + MSBuild:Compile + MSBuild:Compile diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Controls/GPOInfoControl.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Controls/GPOInfoControl.xaml new file mode 100644 index 0000000000..73a862f00a --- /dev/null +++ b/src/settings-ui/Settings.UI/SettingsXAML/Controls/GPOInfoControl.xaml @@ -0,0 +1,28 @@ + + + + diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Controls/GPOInfoControl.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/Controls/GPOInfoControl.xaml.cs new file mode 100644 index 0000000000..8942d5c4db --- /dev/null +++ b/src/settings-ui/Settings.UI/SettingsXAML/Controls/GPOInfoControl.xaml.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices.WindowsRuntime; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Data; +using Microsoft.UI.Xaml.Documents; +using Microsoft.UI.Xaml.Input; +using Microsoft.UI.Xaml.Media; + +namespace Microsoft.PowerToys.Settings.UI.Controls; + +public sealed partial class GPOInfoControl : ContentControl +{ + public static readonly DependencyProperty ShowWarningProperty = + DependencyProperty.Register( + nameof(ShowWarning), + typeof(bool), + typeof(GPOInfoControl), + new PropertyMetadata(false, OnShowWarningPropertyChanged)); + + public bool ShowWarning + { + get => (bool)GetValue(ShowWarningProperty); + set => SetValue(ShowWarningProperty, value); + } + + private static void OnShowWarningPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + if (d is GPOInfoControl gpoInfoControl) + { + if (gpoInfoControl.ShowWarning) + { + gpoInfoControl.IsEnabled = false; + } + } + } + + public GPOInfoControl() + { + DefaultStyleKey = typeof(GPOInfoControl); + } +} diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Panels/MouseJumpPanel.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Panels/MouseJumpPanel.xaml index 478cd994cc..79fd53978c 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Panels/MouseJumpPanel.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/Panels/MouseJumpPanel.xaml @@ -22,25 +22,14 @@ - - - - - - - - - - + + + + + + - + \ No newline at end of file diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/AdvancedPastePage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/AdvancedPastePage.xaml index 28a28bf0b5..628df84c01 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Views/AdvancedPastePage.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/AdvancedPastePage.xaml @@ -46,23 +46,14 @@ ChildrenTransitions="{StaticResource SettingsCardsAnimations}" Orientation="Vertical" Spacing="2"> - - - - - - - - + + + + + - - - - - - - - + + + + + diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/AlwaysOnTopPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/AlwaysOnTopPage.xaml index a5fec151fb..d6194dc5b2 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Views/AlwaysOnTopPage.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/AlwaysOnTopPage.xaml @@ -17,25 +17,15 @@ ModuleImageSource="ms-appx:///Assets/Settings/Modules/AlwaysOnTop.png"> - - - - - - - - + + + + + - - - - - - - - - + + + + + - - - - - - + + + + + - - - - - - - - + + + + + - - - - - - - - + + + + + - - - - - - - - - + + + + + - - - - - - - - - + + + + + - - - - - - - - - + + + + + diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/GeneralPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/GeneralPage.xaml index e06d367941..fcdcc0f60d 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Views/GeneralPage.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/GeneralPage.xaml @@ -48,7 +48,6 @@ FontWeight="SemiBold" Foreground="{ThemeResource TextFillColorSecondaryBrush}" /> - - - - - + + + + + + - - - + + + + + + + diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/PeekPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/PeekPage.xaml index f988f8917d..5ad3a998ad 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Views/PeekPage.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/PeekPage.xaml @@ -14,24 +14,14 @@ - - - - - - - - - + + + + + - - - - - - - - - - + + + + + - - - - - - - - - - + + + + + -