From e9b1fcb26f15eb44188f46a564f3713f44baa1a7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 30 Apr 2026 05:53:15 +0000 Subject: [PATCH 1/8] Switch desktop UI to built-in WPF Fluent theme Agent-Logs-Url: https://github.com/webprofusion/certify/sessions/616a86b7-12dc-41e0-95ad-0d2a2b433894 Co-authored-by: webprofusion-chrisc <2445502+webprofusion-chrisc@users.noreply.github.com> --- src/Certify.UI.Desktop/App.xaml | 50 ++- .../Certify.UI.Shared.csproj | 4 +- .../Controls/Fluent/MahAppsCompatibility.cs | 327 ++++++++++++++++++ .../Controls/GettingStarted.xaml | 2 +- .../ManagedCertificate/AdvancedOptions.xaml | 2 +- .../AuthorityTokenList.xaml | 4 +- .../CertificateIdentifiers.xaml | 2 +- .../ChallengeConfigItem.xaml | 2 +- .../ManagedCertificate/Deployment.xaml | 2 +- .../ManagedCertificate/DeploymentTask.xaml | 4 +- .../IdentifiersAuthorization.xaml | 4 +- .../ManagedCertificateSettings.xaml | 4 +- .../ManagedCertificateSettings.xaml.cs | 1 - .../Controls/ManagedCertificate/TaskList.xaml | 2 +- .../Controls/ManagedCertificates.xaml | 2 +- .../Controls/QuickStart.xaml | 4 +- .../Controls/Settings/General.xaml | 2 +- .../Controls/Settings/MaintenanceWindows.xaml | 2 +- .../Controls/Settings/ManagementHub.xaml | 4 +- src/Certify.UI.Shared/ICertifyApp.cs | 14 +- .../Windows/AddToDashboard.xaml | 2 +- .../Windows/DataStoreConnections.xaml | 4 +- .../Windows/EditAccountDialog.xaml | 2 +- .../Windows/EditCertificateAuthority.xaml | 2 +- .../Windows/EditCertificateAuthority.xaml.cs | 2 +- .../Windows/EditCredential.xaml | 4 +- .../Windows/EditDataStoreConnection.xaml | 2 +- .../Windows/EditDeploymentTask.xaml | 4 +- .../Windows/EditMaintenanceWindow.xaml | 2 +- .../Windows/EditServerConnection.xaml | 2 +- src/Certify.UI.Shared/Windows/Feedback.xaml | 2 +- .../Windows/GettingStartedGuide.xaml | 2 +- .../Windows/ImportExport.xaml | 4 +- src/Certify.UI.Shared/Windows/MainWindow.xaml | 2 +- .../Windows/Registration.xaml | 2 +- .../Windows/ServerConnections.xaml | 4 +- .../Windows/UpdateAvailable.xaml | 2 +- 37 files changed, 418 insertions(+), 64 deletions(-) create mode 100644 src/Certify.UI.Shared/Controls/Fluent/MahAppsCompatibility.cs diff --git a/src/Certify.UI.Desktop/App.xaml b/src/Certify.UI.Desktop/App.xaml index 05f269b45..9c5746315 100644 --- a/src/Certify.UI.Desktop/App.xaml +++ b/src/Certify.UI.Desktop/App.xaml @@ -2,19 +2,55 @@ x:Class="Certify.UI.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls" + xmlns:controls="clr-namespace:MahApps.Metro.Controls;assembly=Certify.UI.Shared" xmlns:utils="clr-namespace:Certify.UI.Utils;assembly=Certify.UI.Shared" StartupUri="pack://application:,,,/Certify.UI.Shared;component/Windows/MainWindow.xaml"> - - - - + + #FF767676 + #FFEAEAEA + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - diff --git a/src/Certify.UI.Shared/Certify.UI.Shared.csproj b/src/Certify.UI.Shared/Certify.UI.Shared.csproj index a2ff71ac2..b1accc0fb 100644 --- a/src/Certify.UI.Shared/Certify.UI.Shared.csproj +++ b/src/Certify.UI.Shared/Certify.UI.Shared.csproj @@ -6,7 +6,7 @@ true 6.0.0.* - NU1701 + $(NoWarn);NU1701;WPF0001 latest @@ -25,12 +25,10 @@ - NU1701 - diff --git a/src/Certify.UI.Shared/Controls/Fluent/MahAppsCompatibility.cs b/src/Certify.UI.Shared/Controls/Fluent/MahAppsCompatibility.cs new file mode 100644 index 000000000..5cdca0821 --- /dev/null +++ b/src/Certify.UI.Shared/Controls/Fluent/MahAppsCompatibility.cs @@ -0,0 +1,327 @@ +using System; +using System.Globalization; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Media; + +namespace MahApps.Metro.Controls +{ + public class MetroWindow : Window + { + public static readonly DependencyProperty TitleCharacterCasingProperty = + DependencyProperty.Register(nameof(TitleCharacterCasing), typeof(string), typeof(MetroWindow)); + + public static readonly DependencyProperty WindowButtonCommandsOverlayBehaviorProperty = + DependencyProperty.Register(nameof(WindowButtonCommandsOverlayBehavior), typeof(string), typeof(MetroWindow)); + + public static readonly DependencyProperty WindowTransitionsEnabledProperty = + DependencyProperty.Register(nameof(WindowTransitionsEnabled), typeof(bool), typeof(MetroWindow), new PropertyMetadata(false)); + + public static readonly DependencyProperty GlowBrushProperty = + DependencyProperty.Register(nameof(GlowBrush), typeof(Brush), typeof(MetroWindow)); + + public static readonly DependencyProperty FlyoutsProperty = + DependencyProperty.Register(nameof(Flyouts), typeof(object), typeof(MetroWindow), new PropertyMetadata(null, OnFlyoutsChanged)); + + public string TitleCharacterCasing + { + get => (string)GetValue(TitleCharacterCasingProperty); + set => SetValue(TitleCharacterCasingProperty, value); + } + + public string WindowButtonCommandsOverlayBehavior + { + get => (string)GetValue(WindowButtonCommandsOverlayBehaviorProperty); + set => SetValue(WindowButtonCommandsOverlayBehaviorProperty, value); + } + + public bool WindowTransitionsEnabled + { + get => (bool)GetValue(WindowTransitionsEnabledProperty); + set => SetValue(WindowTransitionsEnabledProperty, value); + } + + public Brush GlowBrush + { + get => (Brush)GetValue(GlowBrushProperty); + set => SetValue(GlowBrushProperty, value); + } + + public object Flyouts + { + get => GetValue(FlyoutsProperty); + set => SetValue(FlyoutsProperty, value); + } + + private static void OnFlyoutsChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + if (d is MetroWindow window && e.NewValue is UIElement flyouts && window.Content is Panel panel && !panel.Children.Contains(flyouts)) + { + if (flyouts is FrameworkElement frameworkElement) + { + frameworkElement.HorizontalAlignment = HorizontalAlignment.Stretch; + frameworkElement.VerticalAlignment = VerticalAlignment.Stretch; + } + + panel.Children.Add(flyouts); + } + } + } + + public class FlyoutsControl : Grid + { + } + + public class Flyout : GroupBox + { + public static readonly DependencyProperty IsOpenProperty = + DependencyProperty.Register(nameof(IsOpen), typeof(bool), typeof(Flyout), new PropertyMetadata(false, OnIsOpenChanged)); + + public static readonly DependencyProperty PositionProperty = + DependencyProperty.Register(nameof(Position), typeof(string), typeof(Flyout)); + + public static readonly DependencyProperty ThemeProperty = + DependencyProperty.Register(nameof(Theme), typeof(string), typeof(Flyout)); + + public Flyout() + { + HorizontalAlignment = HorizontalAlignment.Right; + VerticalAlignment = VerticalAlignment.Stretch; + Margin = new Thickness(8); + Padding = new Thickness(8); + Visibility = Visibility.Collapsed; + } + + public bool IsOpen + { + get => (bool)GetValue(IsOpenProperty); + set => SetValue(IsOpenProperty, value); + } + + public string Position + { + get => (string)GetValue(PositionProperty); + set => SetValue(PositionProperty, value); + } + + public string Theme + { + get => (string)GetValue(ThemeProperty); + set => SetValue(ThemeProperty, value); + } + + private static void OnIsOpenChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + if (d is Flyout flyout) + { + flyout.Visibility = (bool)e.NewValue ? Visibility.Visible : Visibility.Collapsed; + } + } + } + + public class NumericUpDown : TextBox + { + public static readonly DependencyProperty ValueProperty = + DependencyProperty.Register(nameof(Value), typeof(double?), typeof(NumericUpDown), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnValueChanged)); + + public static readonly DependencyProperty MinimumProperty = + DependencyProperty.Register(nameof(Minimum), typeof(double), typeof(NumericUpDown), new PropertyMetadata(double.MinValue)); + + public static readonly DependencyProperty MaximumProperty = + DependencyProperty.Register(nameof(Maximum), typeof(double), typeof(NumericUpDown), new PropertyMetadata(double.MaxValue)); + + public static readonly DependencyProperty IntervalProperty = + DependencyProperty.Register(nameof(Interval), typeof(double), typeof(NumericUpDown), new PropertyMetadata(1d)); + + private bool _updatingText; + + public NumericUpDown() + { + TextChanged += NumericUpDown_TextChanged; + } + + public event RoutedPropertyChangedEventHandler ValueChanged; + + public double? Value + { + get => (double?)GetValue(ValueProperty); + set => SetValue(ValueProperty, CoerceValue(value)); + } + + public double Minimum + { + get => (double)GetValue(MinimumProperty); + set => SetValue(MinimumProperty, value); + } + + public double Maximum + { + get => (double)GetValue(MaximumProperty); + set => SetValue(MaximumProperty, value); + } + + public double Interval + { + get => (double)GetValue(IntervalProperty); + set => SetValue(IntervalProperty, value); + } + + private static void OnValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + if (d is NumericUpDown numeric) + { + numeric.UpdateText(); + numeric.ValueChanged?.Invoke(numeric, new RoutedPropertyChangedEventArgs((double?)e.OldValue, (double?)e.NewValue)); + } + } + + private void NumericUpDown_TextChanged(object sender, TextChangedEventArgs e) + { + if (_updatingText) + { + return; + } + + if (double.TryParse(Text, NumberStyles.Float, CultureInfo.CurrentCulture, out var value)) + { + Value = CoerceValue(value); + } + } + + private double? CoerceValue(double? value) + { + if (value == null) + { + return null; + } + + return Math.Max(Minimum, Math.Min(Maximum, value.Value)); + } + + private void UpdateText() + { + _updatingText = true; + Text = Value?.ToString(CultureInfo.CurrentCulture) ?? string.Empty; + _updatingText = false; + } + } + + public class ToggleSwitch : CheckBox + { + public static readonly DependencyProperty IsOnProperty = + DependencyProperty.Register(nameof(IsOn), typeof(bool?), typeof(ToggleSwitch), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnIsOnChanged)); + + public ToggleSwitch() + { + Checked += (_, _) => IsOn = true; + Unchecked += (_, _) => IsOn = false; + } + + public bool? IsOn + { + get => (bool?)GetValue(IsOnProperty); + set => SetValue(IsOnProperty, value); + } + + private static void OnIsOnChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + if (d is ToggleSwitch toggleSwitch) + { + toggleSwitch.IsChecked = (bool?)e.NewValue; + } + } + } + + public class MetroProgressBar : ProgressBar + { + } + + public class MetroTabControl : TabControl + { + } + + public class FlipView : TabControl + { + public static readonly DependencyProperty IsBannerEnabledProperty = + DependencyProperty.Register(nameof(IsBannerEnabled), typeof(bool), typeof(FlipView), new PropertyMetadata(true)); + + public static readonly DependencyProperty MouseHoverBorderEnabledProperty = + DependencyProperty.Register(nameof(MouseHoverBorderEnabled), typeof(bool), typeof(FlipView), new PropertyMetadata(true)); + + public bool IsBannerEnabled + { + get => (bool)GetValue(IsBannerEnabledProperty); + set => SetValue(IsBannerEnabledProperty, value); + } + + public bool MouseHoverBorderEnabled + { + get => (bool)GetValue(MouseHoverBorderEnabledProperty); + set => SetValue(MouseHoverBorderEnabledProperty, value); + } + } + + public class FlipViewItem : TabItem + { + } + + public static class TextBoxHelper + { + public static readonly DependencyProperty WatermarkProperty = + DependencyProperty.RegisterAttached("Watermark", typeof(object), typeof(TextBoxHelper)); + + public static readonly DependencyProperty ClearTextButtonProperty = + DependencyProperty.RegisterAttached("ClearTextButton", typeof(bool), typeof(TextBoxHelper)); + + public static object GetWatermark(DependencyObject obj) => obj.GetValue(WatermarkProperty); + public static void SetWatermark(DependencyObject obj, object value) => obj.SetValue(WatermarkProperty, value); + public static bool GetClearTextButton(DependencyObject obj) => (bool)obj.GetValue(ClearTextButtonProperty); + public static void SetClearTextButton(DependencyObject obj, bool value) => obj.SetValue(ClearTextButtonProperty, value); + } + + public static class ControlsHelper + { + public static readonly DependencyProperty ContentCharacterCasingProperty = + DependencyProperty.RegisterAttached("ContentCharacterCasing", typeof(string), typeof(ControlsHelper)); + + public static readonly DependencyProperty CornerRadiusProperty = + DependencyProperty.RegisterAttached("CornerRadius", typeof(CornerRadius), typeof(ControlsHelper)); + + public static string GetContentCharacterCasing(DependencyObject obj) => (string)obj.GetValue(ContentCharacterCasingProperty); + public static void SetContentCharacterCasing(DependencyObject obj, string value) => obj.SetValue(ContentCharacterCasingProperty, value); + public static CornerRadius GetCornerRadius(DependencyObject obj) => (CornerRadius)obj.GetValue(CornerRadiusProperty); + public static void SetCornerRadius(DependencyObject obj, CornerRadius value) => obj.SetValue(CornerRadiusProperty, value); + } + + public static class TabControlHelper + { + public static readonly DependencyProperty UnderlineBrushProperty = + DependencyProperty.RegisterAttached("UnderlineBrush", typeof(Brush), typeof(TabControlHelper)); + + public static readonly DependencyProperty UnderlinedProperty = + DependencyProperty.RegisterAttached("Underlined", typeof(string), typeof(TabControlHelper)); + + public static Brush GetUnderlineBrush(DependencyObject obj) => (Brush)obj.GetValue(UnderlineBrushProperty); + public static void SetUnderlineBrush(DependencyObject obj, Brush value) => obj.SetValue(UnderlineBrushProperty, value); + public static string GetUnderlined(DependencyObject obj) => (string)obj.GetValue(UnderlinedProperty); + public static void SetUnderlined(DependencyObject obj, string value) => obj.SetValue(UnderlinedProperty, value); + } + + public static class HeaderedControlHelper + { + public static readonly DependencyProperty HeaderFontSizeProperty = + DependencyProperty.RegisterAttached("HeaderFontSize", typeof(double), typeof(HeaderedControlHelper)); + + public static double GetHeaderFontSize(DependencyObject obj) => (double)obj.GetValue(HeaderFontSizeProperty); + public static void SetHeaderFontSize(DependencyObject obj, double value) => obj.SetValue(HeaderFontSizeProperty, value); + } + + public static class ScrollViewerHelper + { + public static readonly DependencyProperty IsHorizontalScrollWheelEnabledProperty = + DependencyProperty.RegisterAttached("IsHorizontalScrollWheelEnabled", typeof(bool), typeof(ScrollViewerHelper)); + + public static bool GetIsHorizontalScrollWheelEnabled(DependencyObject obj) => (bool)obj.GetValue(IsHorizontalScrollWheelEnabledProperty); + public static void SetIsHorizontalScrollWheelEnabled(DependencyObject obj, bool value) => obj.SetValue(IsHorizontalScrollWheelEnabledProperty, value); + } +} diff --git a/src/Certify.UI.Shared/Controls/GettingStarted.xaml b/src/Certify.UI.Shared/Controls/GettingStarted.xaml index 638d6be29..324f759df 100644 --- a/src/Certify.UI.Shared/Controls/GettingStarted.xaml +++ b/src/Certify.UI.Shared/Controls/GettingStarted.xaml @@ -2,7 +2,7 @@ x:Class="Certify.UI.Controls.GettingStarted" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:Custom="http://metro.mahapps.com/winfx/xaml/controls" + xmlns:Custom="clr-namespace:MahApps.Metro.Controls;assembly=Certify.UI.Shared" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:fa="http://schemas.fontawesome.io/icons/" xmlns:local="clr-namespace:Certify.UI.Controls" diff --git a/src/Certify.UI.Shared/Controls/ManagedCertificate/AdvancedOptions.xaml b/src/Certify.UI.Shared/Controls/ManagedCertificate/AdvancedOptions.xaml index b378b10c5..22d04fe64 100644 --- a/src/Certify.UI.Shared/Controls/ManagedCertificate/AdvancedOptions.xaml +++ b/src/Certify.UI.Shared/Controls/ManagedCertificate/AdvancedOptions.xaml @@ -2,7 +2,7 @@ x:Class="Certify.UI.Controls.ManagedCertificate.AdvancedOptions" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro" + xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=Certify.UI.Shared" xmlns:Resources="clr-namespace:Certify.Locales;assembly=Certify.Locales" xmlns:certifyui="clr-namespace:Certify.UI" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" diff --git a/src/Certify.UI.Shared/Controls/ManagedCertificate/AuthorityTokenList.xaml b/src/Certify.UI.Shared/Controls/ManagedCertificate/AuthorityTokenList.xaml index c2047c3e3..5cad9dd2a 100644 --- a/src/Certify.UI.Shared/Controls/ManagedCertificate/AuthorityTokenList.xaml +++ b/src/Certify.UI.Shared/Controls/ManagedCertificate/AuthorityTokenList.xaml @@ -1,8 +1,8 @@ - Date: Thu, 30 Apr 2026 05:55:33 +0000 Subject: [PATCH 2/8] Fix Fluent compatibility build issues Agent-Logs-Url: https://github.com/webprofusion/certify/sessions/616a86b7-12dc-41e0-95ad-0d2a2b433894 Co-authored-by: webprofusion-chrisc <2445502+webprofusion-chrisc@users.noreply.github.com> --- .../Controls/Fluent/MahAppsCompatibility.cs | 32 +++++++++++++++++++ .../Controls/GettingStarted.xaml | 2 +- .../ManagedCertificate/AdvancedOptions.xaml | 2 +- .../AuthorityTokenList.xaml | 2 +- .../CertificateIdentifiers.xaml | 2 +- .../ChallengeConfigItem.xaml | 2 +- .../ManagedCertificate/Deployment.xaml | 2 +- .../ManagedCertificate/DeploymentTask.xaml | 2 +- .../IdentifiersAuthorization.xaml | 4 +-- .../ManagedCertificateSettings.xaml | 4 +-- .../ManagedCertificateSettings.xaml.cs | 1 + .../Controls/ManagedCertificate/TaskList.xaml | 2 +- .../Controls/ManagedCertificates.xaml | 2 +- .../Controls/QuickStart.xaml | 2 +- .../Controls/Settings/General.xaml | 2 +- .../Controls/Settings/MaintenanceWindows.xaml | 2 +- .../Controls/Settings/ManagementHub.xaml | 2 +- .../Windows/AddToDashboard.xaml | 2 +- .../Windows/DataStoreConnections.xaml | 2 +- .../Windows/EditAccountDialog.xaml | 2 +- .../Windows/EditCertificateAuthority.xaml | 2 +- .../Windows/EditCredential.xaml | 2 +- .../Windows/EditDataStoreConnection.xaml | 2 +- .../Windows/EditDeploymentTask.xaml | 2 +- .../Windows/EditMaintenanceWindow.xaml | 2 +- .../Windows/EditServerConnection.xaml | 2 +- src/Certify.UI.Shared/Windows/Feedback.xaml | 2 +- .../Windows/GettingStartedGuide.xaml | 2 +- .../Windows/ImportExport.xaml | 2 +- src/Certify.UI.Shared/Windows/MainWindow.xaml | 4 +-- .../Windows/Registration.xaml | 2 +- .../Windows/ServerConnections.xaml | 2 +- .../Windows/UpdateAvailable.xaml | 2 +- 33 files changed, 67 insertions(+), 34 deletions(-) diff --git a/src/Certify.UI.Shared/Controls/Fluent/MahAppsCompatibility.cs b/src/Certify.UI.Shared/Controls/Fluent/MahAppsCompatibility.cs index 5cdca0821..2c69797c0 100644 --- a/src/Certify.UI.Shared/Controls/Fluent/MahAppsCompatibility.cs +++ b/src/Certify.UI.Shared/Controls/Fluent/MahAppsCompatibility.cs @@ -20,6 +20,12 @@ public class MetroWindow : Window public static readonly DependencyProperty GlowBrushProperty = DependencyProperty.Register(nameof(GlowBrush), typeof(Brush), typeof(MetroWindow)); + public static readonly DependencyProperty ShowMaxRestoreButtonProperty = + DependencyProperty.Register(nameof(ShowMaxRestoreButton), typeof(bool), typeof(MetroWindow), new PropertyMetadata(true)); + + public static readonly DependencyProperty ShowMinButtonProperty = + DependencyProperty.Register(nameof(ShowMinButton), typeof(bool), typeof(MetroWindow), new PropertyMetadata(true)); + public static readonly DependencyProperty FlyoutsProperty = DependencyProperty.Register(nameof(Flyouts), typeof(object), typeof(MetroWindow), new PropertyMetadata(null, OnFlyoutsChanged)); @@ -47,6 +53,18 @@ public Brush GlowBrush set => SetValue(GlowBrushProperty, value); } + public bool ShowMaxRestoreButton + { + get => (bool)GetValue(ShowMaxRestoreButtonProperty); + set => SetValue(ShowMaxRestoreButtonProperty, value); + } + + public bool ShowMinButton + { + get => (bool)GetValue(ShowMinButtonProperty); + set => SetValue(ShowMinButtonProperty, value); + } + public object Flyouts { get => GetValue(FlyoutsProperty); @@ -133,6 +151,9 @@ public class NumericUpDown : TextBox public static readonly DependencyProperty IntervalProperty = DependencyProperty.Register(nameof(Interval), typeof(double), typeof(NumericUpDown), new PropertyMetadata(1d)); + public static readonly DependencyProperty NumericInputModeProperty = + DependencyProperty.Register(nameof(NumericInputMode), typeof(string), typeof(NumericUpDown)); + private bool _updatingText; public NumericUpDown() @@ -166,6 +187,12 @@ public double Interval set => SetValue(IntervalProperty, value); } + public string NumericInputMode + { + get => (string)GetValue(NumericInputModeProperty); + set => SetValue(NumericInputModeProperty, value); + } + private static void OnValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { if (d is NumericUpDown numeric) @@ -312,8 +339,13 @@ public static class HeaderedControlHelper public static readonly DependencyProperty HeaderFontSizeProperty = DependencyProperty.RegisterAttached("HeaderFontSize", typeof(double), typeof(HeaderedControlHelper)); + public static readonly DependencyProperty HeaderBackgroundProperty = + DependencyProperty.RegisterAttached("HeaderBackground", typeof(Brush), typeof(HeaderedControlHelper)); + public static double GetHeaderFontSize(DependencyObject obj) => (double)obj.GetValue(HeaderFontSizeProperty); public static void SetHeaderFontSize(DependencyObject obj, double value) => obj.SetValue(HeaderFontSizeProperty, value); + public static Brush GetHeaderBackground(DependencyObject obj) => (Brush)obj.GetValue(HeaderBackgroundProperty); + public static void SetHeaderBackground(DependencyObject obj, Brush value) => obj.SetValue(HeaderBackgroundProperty, value); } public static class ScrollViewerHelper diff --git a/src/Certify.UI.Shared/Controls/GettingStarted.xaml b/src/Certify.UI.Shared/Controls/GettingStarted.xaml index 324f759df..4b7d091d6 100644 --- a/src/Certify.UI.Shared/Controls/GettingStarted.xaml +++ b/src/Certify.UI.Shared/Controls/GettingStarted.xaml @@ -2,7 +2,7 @@ x:Class="Certify.UI.Controls.GettingStarted" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:Custom="clr-namespace:MahApps.Metro.Controls;assembly=Certify.UI.Shared" + xmlns:Custom="clr-namespace:MahApps.Metro.Controls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:fa="http://schemas.fontawesome.io/icons/" xmlns:local="clr-namespace:Certify.UI.Controls" diff --git a/src/Certify.UI.Shared/Controls/ManagedCertificate/AdvancedOptions.xaml b/src/Certify.UI.Shared/Controls/ManagedCertificate/AdvancedOptions.xaml index 22d04fe64..12074687e 100644 --- a/src/Certify.UI.Shared/Controls/ManagedCertificate/AdvancedOptions.xaml +++ b/src/Certify.UI.Shared/Controls/ManagedCertificate/AdvancedOptions.xaml @@ -2,7 +2,7 @@ x:Class="Certify.UI.Controls.ManagedCertificate.AdvancedOptions" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=Certify.UI.Shared" + xmlns:Controls="clr-namespace:MahApps.Metro.Controls" xmlns:Resources="clr-namespace:Certify.Locales;assembly=Certify.Locales" xmlns:certifyui="clr-namespace:Certify.UI" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" diff --git a/src/Certify.UI.Shared/Controls/ManagedCertificate/AuthorityTokenList.xaml b/src/Certify.UI.Shared/Controls/ManagedCertificate/AuthorityTokenList.xaml index 5cad9dd2a..ffaf0397b 100644 --- a/src/Certify.UI.Shared/Controls/ManagedCertificate/AuthorityTokenList.xaml +++ b/src/Certify.UI.Shared/Controls/ManagedCertificate/AuthorityTokenList.xaml @@ -2,7 +2,7 @@ x:Class="Certify.UI.Controls.ManagedCertificate.AuthorityTokenList" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=Certify.UI.Shared" + xmlns:Controls="clr-namespace:MahApps.Metro.Controls" xmlns:certifyui="clr-namespace:Certify.UI" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:fa="http://schemas.fontawesome.io/icons/" diff --git a/src/Certify.UI.Shared/Controls/ManagedCertificate/CertificateIdentifiers.xaml b/src/Certify.UI.Shared/Controls/ManagedCertificate/CertificateIdentifiers.xaml index f1b7f6f53..9b080933b 100644 --- a/src/Certify.UI.Shared/Controls/ManagedCertificate/CertificateIdentifiers.xaml +++ b/src/Certify.UI.Shared/Controls/ManagedCertificate/CertificateIdentifiers.xaml @@ -2,7 +2,7 @@ x:Class="Certify.UI.Controls.ManagedCertificate.CertificateIdentifiers" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=Certify.UI.Shared" + xmlns:Controls="clr-namespace:MahApps.Metro.Controls" xmlns:Resources="clr-namespace:Certify.Locales;assembly=Certify.Locales" xmlns:certifyui="clr-namespace:Certify.UI" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" diff --git a/src/Certify.UI.Shared/Controls/ManagedCertificate/ChallengeConfigItem.xaml b/src/Certify.UI.Shared/Controls/ManagedCertificate/ChallengeConfigItem.xaml index f5b717e2a..d14f463c0 100644 --- a/src/Certify.UI.Shared/Controls/ManagedCertificate/ChallengeConfigItem.xaml +++ b/src/Certify.UI.Shared/Controls/ManagedCertificate/ChallengeConfigItem.xaml @@ -6,7 +6,7 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:fa="http://schemas.fontawesome.io/icons/" xmlns:local="clr-namespace:Certify.UI.Windows" - xmlns:mah="clr-namespace:MahApps.Metro.Controls;assembly=Certify.UI.Shared" + xmlns:mah="clr-namespace:MahApps.Metro.Controls" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:models="clr-namespace:Certify.Models;assembly=Certify.Models" d:DesignHeight="200" diff --git a/src/Certify.UI.Shared/Controls/ManagedCertificate/Deployment.xaml b/src/Certify.UI.Shared/Controls/ManagedCertificate/Deployment.xaml index 59c92c747..e049f9199 100644 --- a/src/Certify.UI.Shared/Controls/ManagedCertificate/Deployment.xaml +++ b/src/Certify.UI.Shared/Controls/ManagedCertificate/Deployment.xaml @@ -2,7 +2,7 @@ x:Class="Certify.UI.Controls.ManagedCertificate.Deployment" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=Certify.UI.Shared" + xmlns:Controls="clr-namespace:MahApps.Metro.Controls" xmlns:Resources="clr-namespace:Certify.Locales;assembly=Certify.Locales" xmlns:certifyui="clr-namespace:Certify.UI" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" diff --git a/src/Certify.UI.Shared/Controls/ManagedCertificate/DeploymentTask.xaml b/src/Certify.UI.Shared/Controls/ManagedCertificate/DeploymentTask.xaml index 37de4d553..06de1c641 100644 --- a/src/Certify.UI.Shared/Controls/ManagedCertificate/DeploymentTask.xaml +++ b/src/Certify.UI.Shared/Controls/ManagedCertificate/DeploymentTask.xaml @@ -2,7 +2,7 @@ x:Class="Certify.UI.Controls.ManagedCertificate.DeploymentTask" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=Certify.UI.Shared" + xmlns:Controls="clr-namespace:MahApps.Metro.Controls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:diag="clr-namespace:System.Diagnostics;assembly=WindowsBase" xmlns:fa="http://schemas.fontawesome.io/icons/" diff --git a/src/Certify.UI.Shared/Controls/ManagedCertificate/IdentifiersAuthorization.xaml b/src/Certify.UI.Shared/Controls/ManagedCertificate/IdentifiersAuthorization.xaml index 9c669b5e6..90d1ec470 100644 --- a/src/Certify.UI.Shared/Controls/ManagedCertificate/IdentifiersAuthorization.xaml +++ b/src/Certify.UI.Shared/Controls/ManagedCertificate/IdentifiersAuthorization.xaml @@ -2,8 +2,8 @@ x:Class="Certify.UI.Controls.ManagedCertificate.IdentifierAuthorization" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=Certify.UI.Shared" - xmlns:Custom="clr-namespace:MahApps.Metro.Controls;assembly=Certify.UI.Shared" + xmlns:Controls="clr-namespace:MahApps.Metro.Controls" + xmlns:Custom="clr-namespace:MahApps.Metro.Controls" xmlns:Resources="clr-namespace:Certify.Locales;assembly=Certify.Locales" xmlns:certifyui="clr-namespace:Certify.UI" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" diff --git a/src/Certify.UI.Shared/Controls/ManagedCertificate/ManagedCertificateSettings.xaml b/src/Certify.UI.Shared/Controls/ManagedCertificate/ManagedCertificateSettings.xaml index 631bfc18f..e679aaea0 100644 --- a/src/Certify.UI.Shared/Controls/ManagedCertificate/ManagedCertificateSettings.xaml +++ b/src/Certify.UI.Shared/Controls/ManagedCertificate/ManagedCertificateSettings.xaml @@ -2,8 +2,8 @@ x:Class="Certify.UI.Controls.ManagedCertificate.ManagedCertificateSettings" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=Certify.UI.Shared" - xmlns:Custom="clr-namespace:MahApps.Metro.Controls;assembly=Certify.UI.Shared" + xmlns:Controls="clr-namespace:MahApps.Metro.Controls" + xmlns:Custom="clr-namespace:MahApps.Metro.Controls" xmlns:Resources="clr-namespace:Certify.Locales;assembly=Certify.Locales" xmlns:certifyui="clr-namespace:Certify.UI" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" diff --git a/src/Certify.UI.Shared/Controls/ManagedCertificate/ManagedCertificateSettings.xaml.cs b/src/Certify.UI.Shared/Controls/ManagedCertificate/ManagedCertificateSettings.xaml.cs index 449921ecf..2f60e0525 100644 --- a/src/Certify.UI.Shared/Controls/ManagedCertificate/ManagedCertificateSettings.xaml.cs +++ b/src/Certify.UI.Shared/Controls/ManagedCertificate/ManagedCertificateSettings.xaml.cs @@ -6,6 +6,7 @@ using Certify.Locales; using Certify.Models; using Certify.UI.Shared; +using MahApps.Metro.Controls; namespace Certify.UI.Controls.ManagedCertificate { diff --git a/src/Certify.UI.Shared/Controls/ManagedCertificate/TaskList.xaml b/src/Certify.UI.Shared/Controls/ManagedCertificate/TaskList.xaml index 8a00f2c8a..688d07106 100644 --- a/src/Certify.UI.Shared/Controls/ManagedCertificate/TaskList.xaml +++ b/src/Certify.UI.Shared/Controls/ManagedCertificate/TaskList.xaml @@ -2,7 +2,7 @@ x:Class="Certify.UI.Controls.ManagedCertificate.TaskList" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=Certify.UI.Shared" + xmlns:Controls="clr-namespace:MahApps.Metro.Controls" xmlns:Resources="clr-namespace:Certify.Locales;assembly=Certify.Locales" xmlns:certifyui="clr-namespace:Certify.UI" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" diff --git a/src/Certify.UI.Shared/Controls/ManagedCertificates.xaml b/src/Certify.UI.Shared/Controls/ManagedCertificates.xaml index ca20b22f1..f49bf5517 100644 --- a/src/Certify.UI.Shared/Controls/ManagedCertificates.xaml +++ b/src/Certify.UI.Shared/Controls/ManagedCertificates.xaml @@ -2,7 +2,7 @@ x:Class="Certify.UI.Controls.ManagedCertificates" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=Certify.UI.Shared" + xmlns:Controls="clr-namespace:MahApps.Metro.Controls" xmlns:certifyui="clr-namespace:Certify.UI" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:fa="http://schemas.fontawesome.io/icons/" diff --git a/src/Certify.UI.Shared/Controls/QuickStart.xaml b/src/Certify.UI.Shared/Controls/QuickStart.xaml index 0d4fceefa..f99139ba3 100644 --- a/src/Certify.UI.Shared/Controls/QuickStart.xaml +++ b/src/Certify.UI.Shared/Controls/QuickStart.xaml @@ -2,7 +2,7 @@ x:Class="Certify.UI.Controls.QuickStart" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:controls="clr-namespace:MahApps.Metro.Controls;assembly=Certify.UI.Shared" + xmlns:controls="clr-namespace:MahApps.Metro.Controls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:Certify.UI.Controls" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" diff --git a/src/Certify.UI.Shared/Controls/Settings/General.xaml b/src/Certify.UI.Shared/Controls/Settings/General.xaml index 97ee9760c..5a3ce5f14 100644 --- a/src/Certify.UI.Shared/Controls/Settings/General.xaml +++ b/src/Certify.UI.Shared/Controls/Settings/General.xaml @@ -2,7 +2,7 @@ x:Class="Certify.UI.Controls.Settings.General" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=Certify.UI.Shared" + xmlns:Controls="clr-namespace:MahApps.Metro.Controls" xmlns:clr="clr-namespace:System;assembly=mscorlib" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:fa="http://schemas.fontawesome.io/icons/" diff --git a/src/Certify.UI.Shared/Controls/Settings/MaintenanceWindows.xaml b/src/Certify.UI.Shared/Controls/Settings/MaintenanceWindows.xaml index 1d0759b02..7f845cfc0 100644 --- a/src/Certify.UI.Shared/Controls/Settings/MaintenanceWindows.xaml +++ b/src/Certify.UI.Shared/Controls/Settings/MaintenanceWindows.xaml @@ -2,7 +2,7 @@ x:Class="Certify.UI.Controls.Settings.MaintenanceWindows" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=Certify.UI.Shared" + xmlns:Controls="clr-namespace:MahApps.Metro.Controls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:fa="http://schemas.fontawesome.io/icons/" xmlns:local="clr-namespace:Certify.UI.Controls.Settings" diff --git a/src/Certify.UI.Shared/Controls/Settings/ManagementHub.xaml b/src/Certify.UI.Shared/Controls/Settings/ManagementHub.xaml index 40342097f..54465c236 100644 --- a/src/Certify.UI.Shared/Controls/Settings/ManagementHub.xaml +++ b/src/Certify.UI.Shared/Controls/Settings/ManagementHub.xaml @@ -2,7 +2,7 @@ x:Class="Certify.UI.Controls.Settings.ManagementHub" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=Certify.UI.Shared" + xmlns:Controls="clr-namespace:MahApps.Metro.Controls" xmlns:Resources="clr-namespace:Certify.Locales;assembly=Certify.Locales" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" diff --git a/src/Certify.UI.Shared/Windows/AddToDashboard.xaml b/src/Certify.UI.Shared/Windows/AddToDashboard.xaml index 0f8ad3724..6ba285bba 100644 --- a/src/Certify.UI.Shared/Windows/AddToDashboard.xaml +++ b/src/Certify.UI.Shared/Windows/AddToDashboard.xaml @@ -2,7 +2,7 @@ x:Class="Certify.UI.Windows.AddToDashboard" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=Certify.UI.Shared" + xmlns:Controls="clr-namespace:MahApps.Metro.Controls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:Certify.UI.Windows" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" diff --git a/src/Certify.UI.Shared/Windows/DataStoreConnections.xaml b/src/Certify.UI.Shared/Windows/DataStoreConnections.xaml index fef5494cd..8b23b92f5 100644 --- a/src/Certify.UI.Shared/Windows/DataStoreConnections.xaml +++ b/src/Certify.UI.Shared/Windows/DataStoreConnections.xaml @@ -2,7 +2,7 @@ x:Class="Certify.UI.Windows.DataStoreConnections" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=Certify.UI.Shared" + xmlns:Controls="clr-namespace:MahApps.Metro.Controls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:fa="http://schemas.fontawesome.io/icons/" xmlns:local="clr-namespace:Certify.UI.Windows" diff --git a/src/Certify.UI.Shared/Windows/EditAccountDialog.xaml b/src/Certify.UI.Shared/Windows/EditAccountDialog.xaml index 6c7a01d37..ff7bc4346 100644 --- a/src/Certify.UI.Shared/Windows/EditAccountDialog.xaml +++ b/src/Certify.UI.Shared/Windows/EditAccountDialog.xaml @@ -2,7 +2,7 @@ x:Class="Certify.UI.Windows.EditAccountDialog" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=Certify.UI.Shared" + xmlns:Controls="clr-namespace:MahApps.Metro.Controls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:Certify.UI.Windows" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" diff --git a/src/Certify.UI.Shared/Windows/EditCertificateAuthority.xaml b/src/Certify.UI.Shared/Windows/EditCertificateAuthority.xaml index 35af623ad..1a3e49a9d 100644 --- a/src/Certify.UI.Shared/Windows/EditCertificateAuthority.xaml +++ b/src/Certify.UI.Shared/Windows/EditCertificateAuthority.xaml @@ -2,7 +2,7 @@ x:Class="Certify.UI.Windows.EditCertificateAuthority" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=Certify.UI.Shared" + xmlns:Controls="clr-namespace:MahApps.Metro.Controls" xmlns:Models="clr-namespace:Certify.Models;assembly=Certify.Core" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:Certify.UI.Windows" diff --git a/src/Certify.UI.Shared/Windows/EditCredential.xaml b/src/Certify.UI.Shared/Windows/EditCredential.xaml index 1c28b2d46..40fdcdfed 100644 --- a/src/Certify.UI.Shared/Windows/EditCredential.xaml +++ b/src/Certify.UI.Shared/Windows/EditCredential.xaml @@ -2,7 +2,7 @@ x:Class="Certify.UI.Windows.EditCredential" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=Certify.UI.Shared" + xmlns:Controls="clr-namespace:MahApps.Metro.Controls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:Certify.UI.Windows" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" diff --git a/src/Certify.UI.Shared/Windows/EditDataStoreConnection.xaml b/src/Certify.UI.Shared/Windows/EditDataStoreConnection.xaml index fd4bf39e4..288b0602b 100644 --- a/src/Certify.UI.Shared/Windows/EditDataStoreConnection.xaml +++ b/src/Certify.UI.Shared/Windows/EditDataStoreConnection.xaml @@ -2,7 +2,7 @@ x:Class="Certify.UI.Windows.EditDataStoreConnectionDialog" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=Certify.UI.Shared" + xmlns:Controls="clr-namespace:MahApps.Metro.Controls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:res="clr-namespace:Certify.Locales;assembly=Certify.Locales" diff --git a/src/Certify.UI.Shared/Windows/EditDeploymentTask.xaml b/src/Certify.UI.Shared/Windows/EditDeploymentTask.xaml index 2c429b540..6239aa665 100644 --- a/src/Certify.UI.Shared/Windows/EditDeploymentTask.xaml +++ b/src/Certify.UI.Shared/Windows/EditDeploymentTask.xaml @@ -2,7 +2,7 @@ x:Class="Certify.UI.Windows.EditDeploymentTask" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=Certify.UI.Shared" + xmlns:Controls="clr-namespace:MahApps.Metro.Controls" xmlns:ManagedCertificate="clr-namespace:Certify.UI.Controls.ManagedCertificate" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:Certify.UI.Windows" diff --git a/src/Certify.UI.Shared/Windows/EditMaintenanceWindow.xaml b/src/Certify.UI.Shared/Windows/EditMaintenanceWindow.xaml index e9c5ce153..c85083903 100644 --- a/src/Certify.UI.Shared/Windows/EditMaintenanceWindow.xaml +++ b/src/Certify.UI.Shared/Windows/EditMaintenanceWindow.xaml @@ -2,7 +2,7 @@ x:Class="Certify.UI.Windows.EditMaintenanceWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=Certify.UI.Shared" + xmlns:Controls="clr-namespace:MahApps.Metro.Controls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:Certify.UI.Windows" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" diff --git a/src/Certify.UI.Shared/Windows/EditServerConnection.xaml b/src/Certify.UI.Shared/Windows/EditServerConnection.xaml index b207a5baf..25c803ec3 100644 --- a/src/Certify.UI.Shared/Windows/EditServerConnection.xaml +++ b/src/Certify.UI.Shared/Windows/EditServerConnection.xaml @@ -2,7 +2,7 @@ x:Class="Certify.UI.Windows.EditServerConnectionDialog" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=Certify.UI.Shared" + xmlns:Controls="clr-namespace:MahApps.Metro.Controls" xmlns:Models="clr-namespace:Certify.Models;assembly=Certify.Core" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:Certify.UI.Windows" diff --git a/src/Certify.UI.Shared/Windows/Feedback.xaml b/src/Certify.UI.Shared/Windows/Feedback.xaml index 94339ecc5..5a3e9d4f0 100644 --- a/src/Certify.UI.Shared/Windows/Feedback.xaml +++ b/src/Certify.UI.Shared/Windows/Feedback.xaml @@ -2,7 +2,7 @@ x:Class="Certify.UI.Windows.Feedback" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=Certify.UI.Shared" + xmlns:Controls="clr-namespace:MahApps.Metro.Controls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:Certify.UI.Windows" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" diff --git a/src/Certify.UI.Shared/Windows/GettingStartedGuide.xaml b/src/Certify.UI.Shared/Windows/GettingStartedGuide.xaml index 5ebd620eb..7034d5815 100644 --- a/src/Certify.UI.Shared/Windows/GettingStartedGuide.xaml +++ b/src/Certify.UI.Shared/Windows/GettingStartedGuide.xaml @@ -2,7 +2,7 @@ x:Class="Certify.UI.Windows.GettingStartedGuide" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=Certify.UI.Shared" + xmlns:Controls="clr-namespace:MahApps.Metro.Controls" xmlns:Controls1="clr-namespace:Certify.UI.Controls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:Certify.UI.Windows" diff --git a/src/Certify.UI.Shared/Windows/ImportExport.xaml b/src/Certify.UI.Shared/Windows/ImportExport.xaml index 4ca71ed4f..ecb278c22 100644 --- a/src/Certify.UI.Shared/Windows/ImportExport.xaml +++ b/src/Certify.UI.Shared/Windows/ImportExport.xaml @@ -2,7 +2,7 @@ x:Class="Certify.UI.Windows.ImportExport" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=Certify.UI.Shared" + xmlns:Controls="clr-namespace:MahApps.Metro.Controls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:Certify.UI.Windows" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" diff --git a/src/Certify.UI.Shared/Windows/MainWindow.xaml b/src/Certify.UI.Shared/Windows/MainWindow.xaml index a5abcf988..0b9541796 100644 --- a/src/Certify.UI.Shared/Windows/MainWindow.xaml +++ b/src/Certify.UI.Shared/Windows/MainWindow.xaml @@ -2,7 +2,7 @@ x:Class="Certify.UI.Windows.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=Certify.UI.Shared" + xmlns:Controls="clr-namespace:MahApps.Metro.Controls" xmlns:CustomControls="clr-namespace:Certify.UI.Controls" xmlns:SettingsControls="clr-namespace:Certify.UI.Controls.Settings" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" @@ -266,7 +266,7 @@ Date: Thu, 30 Apr 2026 05:59:20 +0000 Subject: [PATCH 3/8] Address toggle compatibility review feedback Agent-Logs-Url: https://github.com/webprofusion/certify/sessions/616a86b7-12dc-41e0-95ad-0d2a2b433894 Co-authored-by: webprofusion-chrisc <2445502+webprofusion-chrisc@users.noreply.github.com> --- .../Controls/Fluent/MahAppsCompatibility.cs | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/Certify.UI.Shared/Controls/Fluent/MahAppsCompatibility.cs b/src/Certify.UI.Shared/Controls/Fluent/MahAppsCompatibility.cs index 2c69797c0..f724edea4 100644 --- a/src/Certify.UI.Shared/Controls/Fluent/MahAppsCompatibility.cs +++ b/src/Certify.UI.Shared/Controls/Fluent/MahAppsCompatibility.cs @@ -240,8 +240,20 @@ public class ToggleSwitch : CheckBox public ToggleSwitch() { - Checked += (_, _) => IsOn = true; - Unchecked += (_, _) => IsOn = false; + Checked += (_, _) => + { + if (IsOn != true) + { + IsOn = true; + } + }; + Unchecked += (_, _) => + { + if (IsOn != false) + { + IsOn = false; + } + }; } public bool? IsOn @@ -254,7 +266,11 @@ private static void OnIsOnChanged(DependencyObject d, DependencyPropertyChangedE { if (d is ToggleSwitch toggleSwitch) { - toggleSwitch.IsChecked = (bool?)e.NewValue; + var isOn = (bool?)e.NewValue; + if (toggleSwitch.IsChecked != isOn) + { + toggleSwitch.IsChecked = isOn; + } } } } From 8cda58744586edc6ab247645f0558defa86fc8e7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 30 Apr 2026 06:28:37 +0000 Subject: [PATCH 4/8] Port WPF UI off MahApps compatibility shim Agent-Logs-Url: https://github.com/webprofusion/certify/sessions/f3518714-da23-4e57-9fcf-5399a8acdf6c Co-authored-by: webprofusion-chrisc <2445502+webprofusion-chrisc@users.noreply.github.com> --- src/Certify.UI.Desktop/App.xaml | 62 +-- .../Controls/Fluent/MahAppsCompatibility.cs | 375 ------------------ .../Controls/Fluent/NumberBox.cs | 94 +++++ .../Controls/GettingStarted.xaml | 10 +- .../ManagedCertificate/AdvancedOptions.xaml | 24 +- .../AuthorityTokenList.xaml | 9 +- .../CertificateIdentifiers.xaml | 37 +- .../ChallengeConfigItem.xaml | 14 +- .../ManagedCertificate/Dashboard.xaml | 2 +- .../ManagedCertificate/Deployment.xaml | 1 - .../ManagedCertificate/DeploymentTask.xaml | 18 +- .../IdentifiersAuthorization.xaml | 4 +- .../ManagedCertificateSettings.xaml | 45 +-- .../ManagedCertificateSettings.xaml.cs | 5 +- .../Controls/ManagedCertificate/Preview.xaml | 2 +- .../ManagedCertificate/StatusInfo.xaml | 16 +- .../ManagedCertificate/TabHeader.xaml | 8 +- .../Controls/ManagedCertificate/TaskList.xaml | 7 +- .../Controls/ManagedCertificate/Tasks.xaml | 6 +- .../ManagedCertificate/TestProgress.xaml | 2 +- .../Controls/ManagedCertificates.xaml | 15 +- .../Controls/ProgressMonitor.xaml | 4 +- .../Controls/QuickStart.xaml | 21 +- .../Settings/CertificateAuthorities.xaml | 6 +- .../Controls/Settings/Experiments.xaml | 2 +- .../Controls/Settings/General.xaml | 21 +- .../Controls/Settings/MaintenanceWindows.xaml | 3 +- .../Controls/Settings/ManagementHub.xaml | 4 +- .../Utils/ExpiryDateConverter.cs | 4 +- ...ManagedCertificateHealthColourConverter.cs | 4 +- .../Windows/AddToDashboard.xaml | 13 +- .../Windows/DataStoreConnections.xaml | 24 +- .../Windows/DataStoreConnections.xaml.cs | 4 +- .../Windows/EditAccountDialog.xaml | 23 +- .../Windows/EditCertificateAuthority.xaml | 37 +- .../Windows/EditCredential.xaml | 19 +- .../Windows/EditDataStoreConnection.xaml | 21 +- .../Windows/EditDataStoreConnection.xaml.cs | 4 +- .../Windows/EditDeploymentTask.xaml | 13 +- .../Windows/EditMaintenanceWindow.xaml | 34 +- .../Windows/EditServerConnection.xaml | 19 +- src/Certify.UI.Shared/Windows/Feedback.xaml | 13 +- .../Windows/GettingStartedGuide.xaml | 9 +- .../Windows/ImportExport.xaml | 18 +- src/Certify.UI.Shared/Windows/MainWindow.xaml | 85 ++-- .../Windows/MainWindow.xaml.cs | 4 +- .../Windows/Registration.xaml | 13 +- .../Windows/ServerConnections.xaml | 15 +- .../Windows/ServerConnections.xaml.cs | 4 +- .../Windows/UpdateAvailable.xaml | 19 +- 50 files changed, 364 insertions(+), 852 deletions(-) delete mode 100644 src/Certify.UI.Shared/Controls/Fluent/MahAppsCompatibility.cs create mode 100644 src/Certify.UI.Shared/Controls/Fluent/NumberBox.cs diff --git a/src/Certify.UI.Desktop/App.xaml b/src/Certify.UI.Desktop/App.xaml index 9c5746315..a3a9548a6 100644 --- a/src/Certify.UI.Desktop/App.xaml +++ b/src/Certify.UI.Desktop/App.xaml @@ -2,7 +2,6 @@ x:Class="Certify.UI.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:controls="clr-namespace:MahApps.Metro.Controls;assembly=Certify.UI.Shared" xmlns:utils="clr-namespace:Certify.UI.Utils;assembly=Certify.UI.Shared" StartupUri="pack://application:,,,/Certify.UI.Shared;component/Windows/MainWindow.xaml"> @@ -12,44 +11,7 @@ - #FF767676 - #FFEAEAEA - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -81,30 +43,24 @@ - + - - - - - diff --git a/src/Certify.UI.Shared/Controls/Fluent/MahAppsCompatibility.cs b/src/Certify.UI.Shared/Controls/Fluent/MahAppsCompatibility.cs deleted file mode 100644 index f724edea4..000000000 --- a/src/Certify.UI.Shared/Controls/Fluent/MahAppsCompatibility.cs +++ /dev/null @@ -1,375 +0,0 @@ -using System; -using System.Globalization; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media; - -namespace MahApps.Metro.Controls -{ - public class MetroWindow : Window - { - public static readonly DependencyProperty TitleCharacterCasingProperty = - DependencyProperty.Register(nameof(TitleCharacterCasing), typeof(string), typeof(MetroWindow)); - - public static readonly DependencyProperty WindowButtonCommandsOverlayBehaviorProperty = - DependencyProperty.Register(nameof(WindowButtonCommandsOverlayBehavior), typeof(string), typeof(MetroWindow)); - - public static readonly DependencyProperty WindowTransitionsEnabledProperty = - DependencyProperty.Register(nameof(WindowTransitionsEnabled), typeof(bool), typeof(MetroWindow), new PropertyMetadata(false)); - - public static readonly DependencyProperty GlowBrushProperty = - DependencyProperty.Register(nameof(GlowBrush), typeof(Brush), typeof(MetroWindow)); - - public static readonly DependencyProperty ShowMaxRestoreButtonProperty = - DependencyProperty.Register(nameof(ShowMaxRestoreButton), typeof(bool), typeof(MetroWindow), new PropertyMetadata(true)); - - public static readonly DependencyProperty ShowMinButtonProperty = - DependencyProperty.Register(nameof(ShowMinButton), typeof(bool), typeof(MetroWindow), new PropertyMetadata(true)); - - public static readonly DependencyProperty FlyoutsProperty = - DependencyProperty.Register(nameof(Flyouts), typeof(object), typeof(MetroWindow), new PropertyMetadata(null, OnFlyoutsChanged)); - - public string TitleCharacterCasing - { - get => (string)GetValue(TitleCharacterCasingProperty); - set => SetValue(TitleCharacterCasingProperty, value); - } - - public string WindowButtonCommandsOverlayBehavior - { - get => (string)GetValue(WindowButtonCommandsOverlayBehaviorProperty); - set => SetValue(WindowButtonCommandsOverlayBehaviorProperty, value); - } - - public bool WindowTransitionsEnabled - { - get => (bool)GetValue(WindowTransitionsEnabledProperty); - set => SetValue(WindowTransitionsEnabledProperty, value); - } - - public Brush GlowBrush - { - get => (Brush)GetValue(GlowBrushProperty); - set => SetValue(GlowBrushProperty, value); - } - - public bool ShowMaxRestoreButton - { - get => (bool)GetValue(ShowMaxRestoreButtonProperty); - set => SetValue(ShowMaxRestoreButtonProperty, value); - } - - public bool ShowMinButton - { - get => (bool)GetValue(ShowMinButtonProperty); - set => SetValue(ShowMinButtonProperty, value); - } - - public object Flyouts - { - get => GetValue(FlyoutsProperty); - set => SetValue(FlyoutsProperty, value); - } - - private static void OnFlyoutsChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - if (d is MetroWindow window && e.NewValue is UIElement flyouts && window.Content is Panel panel && !panel.Children.Contains(flyouts)) - { - if (flyouts is FrameworkElement frameworkElement) - { - frameworkElement.HorizontalAlignment = HorizontalAlignment.Stretch; - frameworkElement.VerticalAlignment = VerticalAlignment.Stretch; - } - - panel.Children.Add(flyouts); - } - } - } - - public class FlyoutsControl : Grid - { - } - - public class Flyout : GroupBox - { - public static readonly DependencyProperty IsOpenProperty = - DependencyProperty.Register(nameof(IsOpen), typeof(bool), typeof(Flyout), new PropertyMetadata(false, OnIsOpenChanged)); - - public static readonly DependencyProperty PositionProperty = - DependencyProperty.Register(nameof(Position), typeof(string), typeof(Flyout)); - - public static readonly DependencyProperty ThemeProperty = - DependencyProperty.Register(nameof(Theme), typeof(string), typeof(Flyout)); - - public Flyout() - { - HorizontalAlignment = HorizontalAlignment.Right; - VerticalAlignment = VerticalAlignment.Stretch; - Margin = new Thickness(8); - Padding = new Thickness(8); - Visibility = Visibility.Collapsed; - } - - public bool IsOpen - { - get => (bool)GetValue(IsOpenProperty); - set => SetValue(IsOpenProperty, value); - } - - public string Position - { - get => (string)GetValue(PositionProperty); - set => SetValue(PositionProperty, value); - } - - public string Theme - { - get => (string)GetValue(ThemeProperty); - set => SetValue(ThemeProperty, value); - } - - private static void OnIsOpenChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - if (d is Flyout flyout) - { - flyout.Visibility = (bool)e.NewValue ? Visibility.Visible : Visibility.Collapsed; - } - } - } - - public class NumericUpDown : TextBox - { - public static readonly DependencyProperty ValueProperty = - DependencyProperty.Register(nameof(Value), typeof(double?), typeof(NumericUpDown), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnValueChanged)); - - public static readonly DependencyProperty MinimumProperty = - DependencyProperty.Register(nameof(Minimum), typeof(double), typeof(NumericUpDown), new PropertyMetadata(double.MinValue)); - - public static readonly DependencyProperty MaximumProperty = - DependencyProperty.Register(nameof(Maximum), typeof(double), typeof(NumericUpDown), new PropertyMetadata(double.MaxValue)); - - public static readonly DependencyProperty IntervalProperty = - DependencyProperty.Register(nameof(Interval), typeof(double), typeof(NumericUpDown), new PropertyMetadata(1d)); - - public static readonly DependencyProperty NumericInputModeProperty = - DependencyProperty.Register(nameof(NumericInputMode), typeof(string), typeof(NumericUpDown)); - - private bool _updatingText; - - public NumericUpDown() - { - TextChanged += NumericUpDown_TextChanged; - } - - public event RoutedPropertyChangedEventHandler ValueChanged; - - public double? Value - { - get => (double?)GetValue(ValueProperty); - set => SetValue(ValueProperty, CoerceValue(value)); - } - - public double Minimum - { - get => (double)GetValue(MinimumProperty); - set => SetValue(MinimumProperty, value); - } - - public double Maximum - { - get => (double)GetValue(MaximumProperty); - set => SetValue(MaximumProperty, value); - } - - public double Interval - { - get => (double)GetValue(IntervalProperty); - set => SetValue(IntervalProperty, value); - } - - public string NumericInputMode - { - get => (string)GetValue(NumericInputModeProperty); - set => SetValue(NumericInputModeProperty, value); - } - - private static void OnValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - if (d is NumericUpDown numeric) - { - numeric.UpdateText(); - numeric.ValueChanged?.Invoke(numeric, new RoutedPropertyChangedEventArgs((double?)e.OldValue, (double?)e.NewValue)); - } - } - - private void NumericUpDown_TextChanged(object sender, TextChangedEventArgs e) - { - if (_updatingText) - { - return; - } - - if (double.TryParse(Text, NumberStyles.Float, CultureInfo.CurrentCulture, out var value)) - { - Value = CoerceValue(value); - } - } - - private double? CoerceValue(double? value) - { - if (value == null) - { - return null; - } - - return Math.Max(Minimum, Math.Min(Maximum, value.Value)); - } - - private void UpdateText() - { - _updatingText = true; - Text = Value?.ToString(CultureInfo.CurrentCulture) ?? string.Empty; - _updatingText = false; - } - } - - public class ToggleSwitch : CheckBox - { - public static readonly DependencyProperty IsOnProperty = - DependencyProperty.Register(nameof(IsOn), typeof(bool?), typeof(ToggleSwitch), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnIsOnChanged)); - - public ToggleSwitch() - { - Checked += (_, _) => - { - if (IsOn != true) - { - IsOn = true; - } - }; - Unchecked += (_, _) => - { - if (IsOn != false) - { - IsOn = false; - } - }; - } - - public bool? IsOn - { - get => (bool?)GetValue(IsOnProperty); - set => SetValue(IsOnProperty, value); - } - - private static void OnIsOnChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - if (d is ToggleSwitch toggleSwitch) - { - var isOn = (bool?)e.NewValue; - if (toggleSwitch.IsChecked != isOn) - { - toggleSwitch.IsChecked = isOn; - } - } - } - } - - public class MetroProgressBar : ProgressBar - { - } - - public class MetroTabControl : TabControl - { - } - - public class FlipView : TabControl - { - public static readonly DependencyProperty IsBannerEnabledProperty = - DependencyProperty.Register(nameof(IsBannerEnabled), typeof(bool), typeof(FlipView), new PropertyMetadata(true)); - - public static readonly DependencyProperty MouseHoverBorderEnabledProperty = - DependencyProperty.Register(nameof(MouseHoverBorderEnabled), typeof(bool), typeof(FlipView), new PropertyMetadata(true)); - - public bool IsBannerEnabled - { - get => (bool)GetValue(IsBannerEnabledProperty); - set => SetValue(IsBannerEnabledProperty, value); - } - - public bool MouseHoverBorderEnabled - { - get => (bool)GetValue(MouseHoverBorderEnabledProperty); - set => SetValue(MouseHoverBorderEnabledProperty, value); - } - } - - public class FlipViewItem : TabItem - { - } - - public static class TextBoxHelper - { - public static readonly DependencyProperty WatermarkProperty = - DependencyProperty.RegisterAttached("Watermark", typeof(object), typeof(TextBoxHelper)); - - public static readonly DependencyProperty ClearTextButtonProperty = - DependencyProperty.RegisterAttached("ClearTextButton", typeof(bool), typeof(TextBoxHelper)); - - public static object GetWatermark(DependencyObject obj) => obj.GetValue(WatermarkProperty); - public static void SetWatermark(DependencyObject obj, object value) => obj.SetValue(WatermarkProperty, value); - public static bool GetClearTextButton(DependencyObject obj) => (bool)obj.GetValue(ClearTextButtonProperty); - public static void SetClearTextButton(DependencyObject obj, bool value) => obj.SetValue(ClearTextButtonProperty, value); - } - - public static class ControlsHelper - { - public static readonly DependencyProperty ContentCharacterCasingProperty = - DependencyProperty.RegisterAttached("ContentCharacterCasing", typeof(string), typeof(ControlsHelper)); - - public static readonly DependencyProperty CornerRadiusProperty = - DependencyProperty.RegisterAttached("CornerRadius", typeof(CornerRadius), typeof(ControlsHelper)); - - public static string GetContentCharacterCasing(DependencyObject obj) => (string)obj.GetValue(ContentCharacterCasingProperty); - public static void SetContentCharacterCasing(DependencyObject obj, string value) => obj.SetValue(ContentCharacterCasingProperty, value); - public static CornerRadius GetCornerRadius(DependencyObject obj) => (CornerRadius)obj.GetValue(CornerRadiusProperty); - public static void SetCornerRadius(DependencyObject obj, CornerRadius value) => obj.SetValue(CornerRadiusProperty, value); - } - - public static class TabControlHelper - { - public static readonly DependencyProperty UnderlineBrushProperty = - DependencyProperty.RegisterAttached("UnderlineBrush", typeof(Brush), typeof(TabControlHelper)); - - public static readonly DependencyProperty UnderlinedProperty = - DependencyProperty.RegisterAttached("Underlined", typeof(string), typeof(TabControlHelper)); - - public static Brush GetUnderlineBrush(DependencyObject obj) => (Brush)obj.GetValue(UnderlineBrushProperty); - public static void SetUnderlineBrush(DependencyObject obj, Brush value) => obj.SetValue(UnderlineBrushProperty, value); - public static string GetUnderlined(DependencyObject obj) => (string)obj.GetValue(UnderlinedProperty); - public static void SetUnderlined(DependencyObject obj, string value) => obj.SetValue(UnderlinedProperty, value); - } - - public static class HeaderedControlHelper - { - public static readonly DependencyProperty HeaderFontSizeProperty = - DependencyProperty.RegisterAttached("HeaderFontSize", typeof(double), typeof(HeaderedControlHelper)); - - public static readonly DependencyProperty HeaderBackgroundProperty = - DependencyProperty.RegisterAttached("HeaderBackground", typeof(Brush), typeof(HeaderedControlHelper)); - - public static double GetHeaderFontSize(DependencyObject obj) => (double)obj.GetValue(HeaderFontSizeProperty); - public static void SetHeaderFontSize(DependencyObject obj, double value) => obj.SetValue(HeaderFontSizeProperty, value); - public static Brush GetHeaderBackground(DependencyObject obj) => (Brush)obj.GetValue(HeaderBackgroundProperty); - public static void SetHeaderBackground(DependencyObject obj, Brush value) => obj.SetValue(HeaderBackgroundProperty, value); - } - - public static class ScrollViewerHelper - { - public static readonly DependencyProperty IsHorizontalScrollWheelEnabledProperty = - DependencyProperty.RegisterAttached("IsHorizontalScrollWheelEnabled", typeof(bool), typeof(ScrollViewerHelper)); - - public static bool GetIsHorizontalScrollWheelEnabled(DependencyObject obj) => (bool)obj.GetValue(IsHorizontalScrollWheelEnabledProperty); - public static void SetIsHorizontalScrollWheelEnabled(DependencyObject obj, bool value) => obj.SetValue(IsHorizontalScrollWheelEnabledProperty, value); - } -} diff --git a/src/Certify.UI.Shared/Controls/Fluent/NumberBox.cs b/src/Certify.UI.Shared/Controls/Fluent/NumberBox.cs new file mode 100644 index 000000000..3866452f7 --- /dev/null +++ b/src/Certify.UI.Shared/Controls/Fluent/NumberBox.cs @@ -0,0 +1,94 @@ +using System; +using System.Globalization; +using System.Windows; +using System.Windows.Controls; + +namespace Certify.UI.Controls.Fluent +{ + public class NumberBox : TextBox + { + public static readonly DependencyProperty ValueProperty = + DependencyProperty.Register(nameof(Value), typeof(double?), typeof(NumberBox), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnValueChanged)); + + public static readonly DependencyProperty MinimumProperty = + DependencyProperty.Register(nameof(Minimum), typeof(double), typeof(NumberBox), new PropertyMetadata(double.MinValue)); + + public static readonly DependencyProperty MaximumProperty = + DependencyProperty.Register(nameof(Maximum), typeof(double), typeof(NumberBox), new PropertyMetadata(double.MaxValue)); + + public static readonly DependencyProperty IntervalProperty = + DependencyProperty.Register(nameof(Interval), typeof(double), typeof(NumberBox), new PropertyMetadata(1d)); + + private bool _updatingText; + + public NumberBox() + { + TextChanged += NumberBox_TextChanged; + } + + public event RoutedPropertyChangedEventHandler ValueChanged; + + public double? Value + { + get => (double?)GetValue(ValueProperty); + set => SetValue(ValueProperty, CoerceValue(value)); + } + + public double Minimum + { + get => (double)GetValue(MinimumProperty); + set => SetValue(MinimumProperty, value); + } + + public double Maximum + { + get => (double)GetValue(MaximumProperty); + set => SetValue(MaximumProperty, value); + } + + public double Interval + { + get => (double)GetValue(IntervalProperty); + set => SetValue(IntervalProperty, value); + } + + private static void OnValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + if (d is NumberBox numberBox) + { + numberBox.UpdateText(); + numberBox.ValueChanged?.Invoke(numberBox, new RoutedPropertyChangedEventArgs((double?)e.OldValue, (double?)e.NewValue)); + } + } + + private void NumberBox_TextChanged(object sender, TextChangedEventArgs e) + { + if (_updatingText) + { + return; + } + + if (double.TryParse(Text, NumberStyles.Float, CultureInfo.CurrentCulture, out var value)) + { + Value = CoerceValue(value); + } + } + + private double? CoerceValue(double? value) + { + if (value == null) + { + return null; + } + + return Math.Max(Minimum, Math.Min(Maximum, value.Value)); + } + + private void UpdateText() + { + _updatingText = true; + Text = Value?.ToString(CultureInfo.CurrentCulture) ?? string.Empty; + _updatingText = false; + } + } +} diff --git a/src/Certify.UI.Shared/Controls/GettingStarted.xaml b/src/Certify.UI.Shared/Controls/GettingStarted.xaml index 4b7d091d6..78620af2c 100644 --- a/src/Certify.UI.Shared/Controls/GettingStarted.xaml +++ b/src/Certify.UI.Shared/Controls/GettingStarted.xaml @@ -2,7 +2,6 @@ x:Class="Certify.UI.Controls.GettingStarted" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:Custom="clr-namespace:MahApps.Metro.Controls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:fa="http://schemas.fontawesome.io/icons/" xmlns:local="clr-namespace:Certify.UI.Controls" @@ -27,13 +26,13 @@ Margin="0,0,0,0" FontFamily="Segoe UI" FontSize="30" - Foreground="{DynamicResource MahApps.Brushes.Gray1}" + Foreground="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}" TextWrapping="Wrap"> @@ -47,7 +46,6 @@ @@ -72,7 +70,7 @@ VerticalAlignment="Top" FontSize="12" FontWeight="Bold" - Foreground="{StaticResource MahApps.Brushes.IdealForeground}" + Foreground="{DynamicResource TextOnAccentFillColorPrimaryBrush}" Text="Your license key has expired. Some features will be reduced or unavailable. Please Sign In to https://certifytheweb.com and renew your license key, then re-open the app." TextWrapping="Wrap" /> @@ -153,7 +151,7 @@ HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="12" - Foreground="{StaticResource MahApps.Brushes.IdealForeground}" + Foreground="{DynamicResource TextOnAccentFillColorPrimaryBrush}" Text="{Binding SystemDiagnosticError}" TextWrapping="Wrap" /> diff --git a/src/Certify.UI.Shared/Controls/ManagedCertificate/AdvancedOptions.xaml b/src/Certify.UI.Shared/Controls/ManagedCertificate/AdvancedOptions.xaml index 12074687e..ae1ba113e 100644 --- a/src/Certify.UI.Shared/Controls/ManagedCertificate/AdvancedOptions.xaml +++ b/src/Certify.UI.Shared/Controls/ManagedCertificate/AdvancedOptions.xaml @@ -2,7 +2,6 @@ x:Class="Certify.UI.Controls.ManagedCertificate.AdvancedOptions" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:Controls="clr-namespace:MahApps.Metro.Controls" xmlns:Resources="clr-namespace:Certify.Locales;assembly=Certify.Locales" xmlns:certifyui="clr-namespace:Certify.UI" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" @@ -32,14 +31,11 @@ Margin="0,0,0,0" HorizontalContentAlignment="Left" VerticalContentAlignment="Stretch" - Controls:TabControlHelper.UnderlineBrush="{DynamicResource MahApps.Brushes.Accent4}" - Controls:TabControlHelper.Underlined="TabPanel" DockPanel.Dock="Top" TabStripPlacement="Left"> @@ -89,8 +85,7 @@ @@ -114,7 +108,6 @@ @@ -258,8 +251,7 @@ @@ -274,7 +266,6 @@ @@ -291,8 +282,7 @@ Height="38" MinWidth="300" MaxWidth="600" - HorizontalAlignment="Left" - Controls:TextBoxHelper.Watermark="{x:Static Resources:SR.Comments}" + HorizontalAlignment="Left" ToolTip="{x:Static Resources:SR.Comments}" AcceptsReturn="True" DockPanel.Dock="Top" VerticalScrollBarVisibility="Auto"> @@ -349,7 +339,6 @@ @@ -378,8 +367,7 @@ x:Name="PFXPassword" Width="220" Margin="0,4,0,8" - HorizontalAlignment="Left" - Controls:TextBoxHelper.Watermark="Pfx Unlock Password (if applicable)" + HorizontalAlignment="Left" ToolTip="Pfx Unlock Password (if applicable)" PasswordChanged="PFXPassword_PasswordChanged" /> @@ -424,7 +412,7 @@ BorderThickness="2" Content="{x:Static Resources:SR.ManagedCertificateSettings_CertificateRevokeWarning}" FontWeight="Bold" - Foreground="{DynamicResource MahApps.Brushes.IdealForeground}" /> + Foreground="{DynamicResource TextOnAccentFillColorPrimaryBrush}" /> diff --git a/src/Certify.UI.Shared/Controls/ManagedCertificate/AuthorityTokenList.xaml b/src/Certify.UI.Shared/Controls/ManagedCertificate/AuthorityTokenList.xaml index ffaf0397b..5bf7ee428 100644 --- a/src/Certify.UI.Shared/Controls/ManagedCertificate/AuthorityTokenList.xaml +++ b/src/Certify.UI.Shared/Controls/ManagedCertificate/AuthorityTokenList.xaml @@ -2,7 +2,6 @@ x:Class="Certify.UI.Controls.ManagedCertificate.AuthorityTokenList" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:Controls="clr-namespace:MahApps.Metro.Controls" xmlns:certifyui="clr-namespace:Certify.UI" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:fa="http://schemas.fontawesome.io/icons/" @@ -47,14 +46,12 @@ Orientation="Vertical"> @@ -340,7 +334,7 @@ ToolTip="{x:Static Resources:SR.SelectAll}"> @@ -354,7 +348,7 @@ ToolTip="{x:Static Resources:SR.ManagedCertificateSettings_SelectNone}"> @@ -369,7 +363,7 @@ ToolTip="{x:Static Resources:SR.ManagedCertificatesSettings_RefreshDomains}"> @@ -405,12 +399,11 @@ AutomationProperties.Name="Set As Primary Domain" BorderThickness="0" Click="SetPrimaryDomainOption_Click" - Style="{DynamicResource MahApps.Styles.Button.Circle}" Visibility="{Binding IsPrimaryDomain, Converter={StaticResource ResourceKey=InvBoolToVisConverter}}"> @@ -421,12 +414,11 @@ AutomationProperties.Name="Selected as Primary Domain" BorderThickness="0" Click="SetPrimaryDomainOption_Click" - Style="{DynamicResource MahApps.Styles.Button.Circle}" Visibility="{Binding IsPrimaryDomain, Converter={StaticResource ResourceKey=BoolToVisConverter}}"> @@ -437,13 +429,10 @@ @@ -458,7 +447,7 @@ @@ -509,7 +498,6 @@ @@ -518,7 +506,6 @@ diff --git a/src/Certify.UI.Shared/Controls/ManagedCertificate/ChallengeConfigItem.xaml b/src/Certify.UI.Shared/Controls/ManagedCertificate/ChallengeConfigItem.xaml index d14f463c0..8da32f26d 100644 --- a/src/Certify.UI.Shared/Controls/ManagedCertificate/ChallengeConfigItem.xaml +++ b/src/Certify.UI.Shared/Controls/ManagedCertificate/ChallengeConfigItem.xaml @@ -6,7 +6,6 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:fa="http://schemas.fontawesome.io/icons/" xmlns:local="clr-namespace:Certify.UI.Windows" - xmlns:mah="clr-namespace:MahApps.Metro.Controls" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:models="clr-namespace:Certify.Models;assembly=Certify.Models" d:DesignHeight="200" @@ -23,7 +22,6 @@ diff --git a/src/Certify.UI.Shared/Controls/ManagedCertificate/ManagedCertificateSettings.xaml.cs b/src/Certify.UI.Shared/Controls/ManagedCertificate/ManagedCertificateSettings.xaml.cs index 2f60e0525..6655be3d1 100644 --- a/src/Certify.UI.Shared/Controls/ManagedCertificate/ManagedCertificateSettings.xaml.cs +++ b/src/Certify.UI.Shared/Controls/ManagedCertificate/ManagedCertificateSettings.xaml.cs @@ -6,7 +6,6 @@ using Certify.Locales; using Certify.Models; using Certify.UI.Shared; -using MahApps.Metro.Controls; namespace Certify.UI.Controls.ManagedCertificate { @@ -248,10 +247,10 @@ private void ShowTestResultsUI() { var parentWindow = Window.GetWindow(this); var obj = parentWindow.FindName("MainFlyout"); - var flyout = (Flyout)obj; + var flyout = (GroupBox)obj; flyout.Header = "Test Progress"; flyout.Content = new TestProgress(); - flyout.IsOpen = !flyout.IsOpen; + flyout.Visibility = flyout.Visibility == Visibility.Visible ? Visibility.Collapsed : Visibility.Visible; } private async void TestChallenge_Click(object sender, EventArgs e) diff --git a/src/Certify.UI.Shared/Controls/ManagedCertificate/Preview.xaml b/src/Certify.UI.Shared/Controls/ManagedCertificate/Preview.xaml index bfe0d3be2..5c6db8cfd 100644 --- a/src/Certify.UI.Shared/Controls/ManagedCertificate/Preview.xaml +++ b/src/Certify.UI.Shared/Controls/ManagedCertificate/Preview.xaml @@ -1,4 +1,4 @@ - @@ -143,13 +143,13 @@ Certificate Active @@ -208,13 +208,13 @@ @@ -234,7 +234,7 @@ diff --git a/src/Certify.UI.Shared/Controls/ManagedCertificate/TabHeader.xaml b/src/Certify.UI.Shared/Controls/ManagedCertificate/TabHeader.xaml index 6b472ae06..901b5bcd9 100644 --- a/src/Certify.UI.Shared/Controls/ManagedCertificate/TabHeader.xaml +++ b/src/Certify.UI.Shared/Controls/ManagedCertificate/TabHeader.xaml @@ -1,4 +1,4 @@ - @@ -27,7 +27,7 @@ Width="16" HorizontalAlignment="Center" VerticalAlignment="Center" - Foreground="{StaticResource MahApps.Brushes.Accent}" + Foreground="{DynamicResource AccentFillColorDefaultBrush}" Icon="{Binding IconName}" /> @@ -68,7 +67,7 @@ @@ -84,7 +83,7 @@ diff --git a/src/Certify.UI.Shared/Controls/ManagedCertificate/Tasks.xaml b/src/Certify.UI.Shared/Controls/ManagedCertificate/Tasks.xaml index ee544b25a..74f1ddd59 100644 --- a/src/Certify.UI.Shared/Controls/ManagedCertificate/Tasks.xaml +++ b/src/Certify.UI.Shared/Controls/ManagedCertificate/Tasks.xaml @@ -1,4 +1,4 @@ - Add @@ -65,7 +65,7 @@ Add diff --git a/src/Certify.UI.Shared/Controls/ManagedCertificate/TestProgress.xaml b/src/Certify.UI.Shared/Controls/ManagedCertificate/TestProgress.xaml index eebf55c1e..9a343e69e 100644 --- a/src/Certify.UI.Shared/Controls/ManagedCertificate/TestProgress.xaml +++ b/src/Certify.UI.Shared/Controls/ManagedCertificate/TestProgress.xaml @@ -1,4 +1,4 @@ - @@ -71,7 +70,7 @@ @@ -106,7 +103,7 @@ + Background="{DynamicResource AccentFillColorTertiaryBrush}" /> @@ -114,7 +114,7 @@ HorizontalAlignment="Stretch" DockPanel.Dock="Top" FontSize="10" - Foreground="{DynamicResource MahApps.Brushes.SystemControlForegroundChromeGray}" + Foreground="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" Text="{Binding Message}" TextWrapping="WrapWithOverflow" /> diff --git a/src/Certify.UI.Shared/Controls/QuickStart.xaml b/src/Certify.UI.Shared/Controls/QuickStart.xaml index f99139ba3..4cd8484ce 100644 --- a/src/Certify.UI.Shared/Controls/QuickStart.xaml +++ b/src/Certify.UI.Shared/Controls/QuickStart.xaml @@ -2,20 +2,17 @@ x:Class="Certify.UI.Controls.QuickStart" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:controls="clr-namespace:MahApps.Metro.Controls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:Certify.UI.Controls" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"> - + Margin="16"> - + - - + + - - + + - + - + \ No newline at end of file diff --git a/src/Certify.UI.Shared/Controls/Settings/CertificateAuthorities.xaml b/src/Certify.UI.Shared/Controls/Settings/CertificateAuthorities.xaml index 293bd78a4..7ee72802d 100644 --- a/src/Certify.UI.Shared/Controls/Settings/CertificateAuthorities.xaml +++ b/src/Certify.UI.Shared/Controls/Settings/CertificateAuthorities.xaml @@ -1,4 +1,4 @@ - @@ -127,7 +127,7 @@ diff --git a/src/Certify.UI.Shared/Controls/Settings/Experiments.xaml b/src/Certify.UI.Shared/Controls/Settings/Experiments.xaml index 192120d19..3d9325621 100644 --- a/src/Certify.UI.Shared/Controls/Settings/Experiments.xaml +++ b/src/Certify.UI.Shared/Controls/Settings/Experiments.xaml @@ -1,4 +1,4 @@ - - @@ -353,7 +349,6 @@ Certificate Authority Settings @@ -364,7 +359,6 @@ Stored Credentials @@ -376,7 +370,6 @@ Maintenance Windows @@ -387,7 +380,6 @@ @@ -422,7 +414,6 @@ @@ -452,13 +443,12 @@ @@ -478,7 +468,6 @@ diff --git a/src/Certify.UI.Shared/Controls/Settings/MaintenanceWindows.xaml b/src/Certify.UI.Shared/Controls/Settings/MaintenanceWindows.xaml index 7f845cfc0..a9b41f2a5 100644 --- a/src/Certify.UI.Shared/Controls/Settings/MaintenanceWindows.xaml +++ b/src/Certify.UI.Shared/Controls/Settings/MaintenanceWindows.xaml @@ -2,7 +2,6 @@ x:Class="Certify.UI.Controls.Settings.MaintenanceWindows" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:Controls="clr-namespace:MahApps.Metro.Controls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:fa="http://schemas.fontawesome.io/icons/" xmlns:local="clr-namespace:Certify.UI.Controls.Settings" @@ -33,7 +32,7 @@ Height="16" Margin="0,0,8,0" VerticalAlignment="Center" - Foreground="{DynamicResource MahApps.Brushes.Accent}" + Foreground="{DynamicResource AccentFillColorDefaultBrush}" Icon="Plus" /> Add Window diff --git a/src/Certify.UI.Shared/Controls/Settings/ManagementHub.xaml b/src/Certify.UI.Shared/Controls/Settings/ManagementHub.xaml index 54465c236..72b910372 100644 --- a/src/Certify.UI.Shared/Controls/Settings/ManagementHub.xaml +++ b/src/Certify.UI.Shared/Controls/Settings/ManagementHub.xaml @@ -2,7 +2,6 @@ x:Class="Certify.UI.Controls.Settings.ManagementHub" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:Controls="clr-namespace:MahApps.Metro.Controls" xmlns:Resources="clr-namespace:Certify.Locales;assembly=Certify.Locales" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" @@ -35,8 +34,7 @@ Client ID: diff --git a/src/Certify.UI.Shared/Utils/ExpiryDateConverter.cs b/src/Certify.UI.Shared/Utils/ExpiryDateConverter.cs index 0097f4042..721f791a8 100644 --- a/src/Certify.UI.Shared/Utils/ExpiryDateConverter.cs +++ b/src/Certify.UI.Shared/Utils/ExpiryDateConverter.cs @@ -89,11 +89,11 @@ public static System.Windows.Media.Brush GetColour(Lifetime lifetime) { try { - return (System.Windows.Media.Brush)ViewModel.AppViewModel.Current.GetApplication().Resources["MahApps.Brushes.SystemControlForegroundBaseMediumHigh"]; + return System.Windows.SystemColors.ControlTextBrush; } catch { - //unit test may not reference MahApps + //unit test may not reference WPF application resources return System.Windows.Media.Brushes.Green; } } diff --git a/src/Certify.UI.Shared/Utils/ManagedCertificateHealthColourConverter.cs b/src/Certify.UI.Shared/Utils/ManagedCertificateHealthColourConverter.cs index 884932cf2..0bd992e18 100644 --- a/src/Certify.UI.Shared/Utils/ManagedCertificateHealthColourConverter.cs +++ b/src/Certify.UI.Shared/Utils/ManagedCertificateHealthColourConverter.cs @@ -41,9 +41,7 @@ public static System.Windows.Media.Brush GetColour(ManagedCertificateHealth heal { if (mode == "standard") { - return (System.Windows.Media.Brush) - ViewModel.AppViewModel.Current.GetApplication() - .Resources["MahApps.Brushes.SystemControlForegroundBaseHigh"]; + return System.Windows.SystemColors.ControlTextBrush; } else { diff --git a/src/Certify.UI.Shared/Windows/AddToDashboard.xaml b/src/Certify.UI.Shared/Windows/AddToDashboard.xaml index 6ba285bba..437b0cb01 100644 --- a/src/Certify.UI.Shared/Windows/AddToDashboard.xaml +++ b/src/Certify.UI.Shared/Windows/AddToDashboard.xaml @@ -1,8 +1,7 @@ - - + - + @@ -65,4 +62,4 @@ - + diff --git a/src/Certify.UI.Shared/Windows/DataStoreConnections.xaml b/src/Certify.UI.Shared/Windows/DataStoreConnections.xaml index 8b23b92f5..b2361a72a 100644 --- a/src/Certify.UI.Shared/Windows/DataStoreConnections.xaml +++ b/src/Certify.UI.Shared/Windows/DataStoreConnections.xaml @@ -1,8 +1,7 @@ - @@ -42,14 +39,11 @@ Margin="0,0,0,0" HorizontalContentAlignment="Left" VerticalContentAlignment="Stretch" - Controls:TabControlHelper.UnderlineBrush="{DynamicResource MahApps.Brushes.Accent4}" - Controls:TabControlHelper.Underlined="TabPanel" DockPanel.Dock="Top" TabStripPlacement="Top"> @@ -71,8 +65,8 @@ - - + + @@ -85,7 +79,6 @@ Click="Connect_Click" CommandParameter="{Binding}" DockPanel.Dock="Left" - Style="{DynamicResource MahApps.Styles.Button.Reveal}" ToolTip="Select this Data Store"> @@ -135,7 +128,6 @@ @@ -177,7 +169,7 @@ Margin="4,0,0,0" HorizontalAlignment="Center" VerticalAlignment="Center" - Foreground="{StaticResource MahApps.Brushes.Accent}" + Foreground="{DynamicResource AccentFillColorDefaultBrush}" Icon="Database" /> @@ -208,4 +200,4 @@ - + diff --git a/src/Certify.UI.Shared/Windows/DataStoreConnections.xaml.cs b/src/Certify.UI.Shared/Windows/DataStoreConnections.xaml.cs index ad6c82fd8..daa3d6feb 100644 --- a/src/Certify.UI.Shared/Windows/DataStoreConnections.xaml.cs +++ b/src/Certify.UI.Shared/Windows/DataStoreConnections.xaml.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; using System.Threading; using System.Windows; @@ -101,7 +101,7 @@ private async void Connect_Click(object sender, RoutedEventArgs e) } } - private void MetroWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e) + private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { // cancel pending operations (if any) _cts.Cancel(); diff --git a/src/Certify.UI.Shared/Windows/EditAccountDialog.xaml b/src/Certify.UI.Shared/Windows/EditAccountDialog.xaml index ff7bc4346..7b21462c6 100644 --- a/src/Certify.UI.Shared/Windows/EditAccountDialog.xaml +++ b/src/Certify.UI.Shared/Windows/EditAccountDialog.xaml @@ -1,8 +1,7 @@ - - + - + @@ -110,7 +104,6 @@ @@ -135,8 +128,7 @@ Width="300" Height="23" HorizontalAlignment="Left" - VerticalAlignment="Top" - Controls:TextBoxHelper.Watermark="(optional) e.g. DST Root CA X3" + VerticalAlignment="Top" ToolTip="(optional) e.g. DST Root CA X3" Text="{Binding Item.PreferredChain}" TextWrapping="Wrap" /> @@ -193,8 +185,7 @@ Width="300" Height="23" HorizontalAlignment="Left" - VerticalAlignment="Top" - Controls:TextBoxHelper.Watermark="optional, e.g. HS256 (default), HS384 or HS512" + VerticalAlignment="Top" ToolTip="optional, e.g. HS256 (default), HS384 or HS512" Text="{Binding Item.EabKeyAlgorithm}" TextWrapping="Wrap" /> @@ -288,4 +279,4 @@ DockPanel.Dock="Left" /> - + diff --git a/src/Certify.UI.Shared/Windows/EditCertificateAuthority.xaml b/src/Certify.UI.Shared/Windows/EditCertificateAuthority.xaml index 1a3e49a9d..22760b650 100644 --- a/src/Certify.UI.Shared/Windows/EditCertificateAuthority.xaml +++ b/src/Certify.UI.Shared/Windows/EditCertificateAuthority.xaml @@ -1,8 +1,7 @@ - - + - + @@ -70,8 +66,7 @@ Width="300" Height="48" HorizontalAlignment="Left" - VerticalAlignment="Top" - Controls:TextBoxHelper.Watermark="(Optional description)" + VerticalAlignment="Top" ToolTip="(Optional description)" Text="{Binding Model.Item.Description}" TextWrapping="Wrap" /> @@ -88,8 +83,7 @@ Width="300" Height="23" HorizontalAlignment="Left" - VerticalAlignment="Top" - Controls:TextBoxHelper.Watermark="{x:Static res:SR.EditCertificateAuthority_ProductionDirectoryHelp}" + VerticalAlignment="Top" ToolTip="{x:Static res:SR.EditCertificateAuthority_ProductionDirectoryHelp}" Text="{Binding Model.Item.ProductionAPIEndpoint}" TextWrapping="Wrap" /> @@ -106,8 +100,7 @@ Width="300" Height="23" HorizontalAlignment="Left" - VerticalAlignment="Top" - Controls:TextBoxHelper.Watermark="(Optional Url for the staging/test directory endpoint)" + VerticalAlignment="Top" ToolTip="(Optional Url for the staging/test directory endpoint)" Text="{Binding Model.Item.StagingAPIEndpoint}" TextWrapping="Wrap" /> @@ -121,12 +114,12 @@ VerticalAlignment="Top" Content="Features" /> - - - - - - + + + + + + @@ -159,4 +152,4 @@ - + diff --git a/src/Certify.UI.Shared/Windows/EditCredential.xaml b/src/Certify.UI.Shared/Windows/EditCredential.xaml index 40fdcdfed..6cea38d4b 100644 --- a/src/Certify.UI.Shared/Windows/EditCredential.xaml +++ b/src/Certify.UI.Shared/Windows/EditCredential.xaml @@ -1,8 +1,7 @@ - - + - + - + @@ -34,7 +31,6 @@ @@ -168,4 +163,4 @@ DockPanel.Dock="Right" /> - + diff --git a/src/Certify.UI.Shared/Windows/EditDataStoreConnection.xaml b/src/Certify.UI.Shared/Windows/EditDataStoreConnection.xaml index 288b0602b..f23149677 100644 --- a/src/Certify.UI.Shared/Windows/EditDataStoreConnection.xaml +++ b/src/Certify.UI.Shared/Windows/EditDataStoreConnection.xaml @@ -1,24 +1,21 @@ - - + - + @@ -80,8 +76,7 @@ Width="300" Height="42" HorizontalAlignment="Left" - VerticalAlignment="Top" - Controls:TextBoxHelper.Watermark="e.g. a database connection string" + VerticalAlignment="Top" ToolTip="e.g. a database connection string" Text="{Binding Item.ConnectionConfig}" TextWrapping="Wrap" VerticalScrollBarVisibility="Auto" /> @@ -113,4 +108,4 @@ - + diff --git a/src/Certify.UI.Shared/Windows/EditDataStoreConnection.xaml.cs b/src/Certify.UI.Shared/Windows/EditDataStoreConnection.xaml.cs index a940849d3..1d2b39ad1 100644 --- a/src/Certify.UI.Shared/Windows/EditDataStoreConnection.xaml.cs +++ b/src/Certify.UI.Shared/Windows/EditDataStoreConnection.xaml.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Windows; @@ -47,7 +47,7 @@ public EditDataStoreConnectionDialog(DataStoreConnection editItem = null) } - private async void MetroWindow_Loaded(object sender, RoutedEventArgs e) + private async void Window_Loaded(object sender, RoutedEventArgs e) { Model.DataStoreProviders = await MainViewModel.GetDataStoreProviders(); } diff --git a/src/Certify.UI.Shared/Windows/EditDeploymentTask.xaml b/src/Certify.UI.Shared/Windows/EditDeploymentTask.xaml index 6239aa665..91d95a40d 100644 --- a/src/Certify.UI.Shared/Windows/EditDeploymentTask.xaml +++ b/src/Certify.UI.Shared/Windows/EditDeploymentTask.xaml @@ -1,8 +1,7 @@ - - + - + @@ -48,4 +45,4 @@ VerticalAlignment="Top" DockPanel.Dock="Top" /> - + diff --git a/src/Certify.UI.Shared/Windows/EditMaintenanceWindow.xaml b/src/Certify.UI.Shared/Windows/EditMaintenanceWindow.xaml index c85083903..a038cb191 100644 --- a/src/Certify.UI.Shared/Windows/EditMaintenanceWindow.xaml +++ b/src/Certify.UI.Shared/Windows/EditMaintenanceWindow.xaml @@ -1,22 +1,20 @@ - @@ -41,8 +39,7 @@ Name Description @@ -50,8 +47,7 @@ x:Name="WindowDescription" Height="60" Margin="0,4,0,16" - AcceptsReturn="True" - Controls:TextBoxHelper.Watermark="Optional description of this maintenance window" + AcceptsReturn="True" ToolTip="Optional description of this maintenance window" Text="{Binding EditWindow.Description, UpdateSourceTrigger=PropertyChanged}" VerticalScrollBarVisibility="Auto" /> @@ -153,7 +149,7 @@ Start Time (24-hour format) - : - End Time (24-hour format) - : - @@ -227,8 +223,8 @@ Schedule Preview: @@ -241,4 +237,4 @@ - + diff --git a/src/Certify.UI.Shared/Windows/EditServerConnection.xaml b/src/Certify.UI.Shared/Windows/EditServerConnection.xaml index 25c803ec3..be409b9f1 100644 --- a/src/Certify.UI.Shared/Windows/EditServerConnection.xaml +++ b/src/Certify.UI.Shared/Windows/EditServerConnection.xaml @@ -1,8 +1,7 @@ - - + - + @@ -45,8 +42,7 @@ Width="300" Height="23" HorizontalAlignment="Left" - VerticalAlignment="Top" - Controls:TextBoxHelper.Watermark="e.g. Primary Server, WEB01 etc " + VerticalAlignment="Top" ToolTip="e.g. Primary Server, WEB01 etc " Text="{Binding Item.DisplayName}" TextWrapping="Wrap" /> @@ -79,8 +75,7 @@ Width="300" Height="23" HorizontalAlignment="Left" - VerticalAlignment="Top" - Controls:TextBoxHelper.Watermark="e.g. 9696" + VerticalAlignment="Top" ToolTip="e.g. 9696" Text="{Binding Item.Port}" TextWrapping="Wrap" /> @@ -131,4 +126,4 @@ - + diff --git a/src/Certify.UI.Shared/Windows/Feedback.xaml b/src/Certify.UI.Shared/Windows/Feedback.xaml index 5a3e9d4f0..34c6240de 100644 --- a/src/Certify.UI.Shared/Windows/Feedback.xaml +++ b/src/Certify.UI.Shared/Windows/Feedback.xaml @@ -1,8 +1,7 @@ - - + - + - + diff --git a/src/Certify.UI.Shared/Windows/GettingStartedGuide.xaml b/src/Certify.UI.Shared/Windows/GettingStartedGuide.xaml index 7034d5815..c711164b5 100644 --- a/src/Certify.UI.Shared/Windows/GettingStartedGuide.xaml +++ b/src/Certify.UI.Shared/Windows/GettingStartedGuide.xaml @@ -1,8 +1,7 @@ - - + diff --git a/src/Certify.UI.Shared/Windows/ImportExport.xaml b/src/Certify.UI.Shared/Windows/ImportExport.xaml index ecb278c22..4b119220a 100644 --- a/src/Certify.UI.Shared/Windows/ImportExport.xaml +++ b/src/Certify.UI.Shared/Windows/ImportExport.xaml @@ -1,18 +1,15 @@ - @@ -23,8 +20,7 @@ + HorizontalAlignment="Left" ToolTip="Password" /> @@ -34,14 +30,11 @@ Margin="0,8,0,0" HorizontalContentAlignment="Left" VerticalContentAlignment="Stretch" - Controls:TabControlHelper.UnderlineBrush="{DynamicResource MahApps.Brushes.Accent4}" - Controls:TabControlHelper.Underlined="TabPanel" DockPanel.Dock="Top" TabStripPlacement="Top"> @@ -59,7 +52,6 @@ Import a settings bundle exported from another instance of the app. @@ -97,7 +89,7 @@ - - + diff --git a/src/Certify.UI.Shared/Windows/MainWindow.xaml b/src/Certify.UI.Shared/Windows/MainWindow.xaml index 0b9541796..5c7976529 100644 --- a/src/Certify.UI.Shared/Windows/MainWindow.xaml +++ b/src/Certify.UI.Shared/Windows/MainWindow.xaml @@ -1,8 +1,7 @@ - - + - + - - - - - + + + + + + - - - + + + @@ -111,7 +108,7 @@ @@ -126,17 +123,17 @@ Height="32" Margin="8,0,0,5" AutomationProperties.Name="{x:Static res:SR.Update_Available}" - Background="{DynamicResource MahApps.Brushes.AccentBase}" + Background="{DynamicResource AccentFillColorDefaultBrush}" Click="ButtonUpdateAvailable_Click" FontWeight="DemiBold" - Foreground="{DynamicResource MahApps.Brushes.SystemControlBackgroundAltMediumHigh}"> + Foreground="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"> @@ -182,7 +179,7 @@ @@ -190,12 +187,12 @@ @@ -212,15 +209,12 @@ HorizontalAlignment="Stretch" HorizontalContentAlignment="Left" VerticalContentAlignment="Stretch" - Controls:TabControlHelper.UnderlineBrush="{DynamicResource MahApps.Brushes.Accent4}" - Controls:TabControlHelper.Underlined="TabPanel" SelectedIndex="{Binding MainUITabIndex}"> @@ -243,7 +236,6 @@ HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" - Controls:HeaderedControlHelper.HeaderFontSize="12" Header="{x:Static res:SR.Settings}" IsEnabled="{Binding IsServiceAvailable}"> @@ -252,25 +244,26 @@ MinWidth="80" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" - Controls:HeaderedControlHelper.HeaderFontSize="12" Header="{x:Static res:SR.About}"> - - + - - + + - - - - - + + + + diff --git a/src/Certify.UI.Shared/Windows/MainWindow.xaml.cs b/src/Certify.UI.Shared/Windows/MainWindow.xaml.cs index aee510dca..4a1fa82db 100644 --- a/src/Certify.UI.Shared/Windows/MainWindow.xaml.cs +++ b/src/Certify.UI.Shared/Windows/MainWindow.xaml.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.ComponentModel; using System.Diagnostics; using System.Linq; @@ -521,7 +521,7 @@ private void Connect_Click(object sender, RoutedEventArgs e) } } - private async void MetroWindow_Closing(object sender, CancelEventArgs e) + private async void Window_Closing(object sender, CancelEventArgs e) { // allow canceling exit to save changes if (!await _itemViewModel.ConfirmDiscardUnsavedChanges()) diff --git a/src/Certify.UI.Shared/Windows/Registration.xaml b/src/Certify.UI.Shared/Windows/Registration.xaml index 9416001ff..476bef5ed 100644 --- a/src/Certify.UI.Shared/Windows/Registration.xaml +++ b/src/Certify.UI.Shared/Windows/Registration.xaml @@ -1,8 +1,7 @@ - - + - + @@ -121,4 +118,4 @@ - + diff --git a/src/Certify.UI.Shared/Windows/ServerConnections.xaml b/src/Certify.UI.Shared/Windows/ServerConnections.xaml index f8e6c56d8..e2e8b45a3 100644 --- a/src/Certify.UI.Shared/Windows/ServerConnections.xaml +++ b/src/Certify.UI.Shared/Windows/ServerConnections.xaml @@ -1,8 +1,7 @@ - @@ -48,7 +45,7 @@ @@ -67,7 +64,7 @@ @@ -120,4 +117,4 @@ - + diff --git a/src/Certify.UI.Shared/Windows/ServerConnections.xaml.cs b/src/Certify.UI.Shared/Windows/ServerConnections.xaml.cs index 284df9483..4e7488999 100644 --- a/src/Certify.UI.Shared/Windows/ServerConnections.xaml.cs +++ b/src/Certify.UI.Shared/Windows/ServerConnections.xaml.cs @@ -1,4 +1,4 @@ -using System.Threading; +using System.Threading; using System.Windows; using System.Windows.Controls; using Certify.Shared; @@ -42,7 +42,7 @@ private async void Connect_Click(object sender, RoutedEventArgs e) Close(); } - private void MetroWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e) + private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { // cancel pending operations (if any) _cts.Cancel(); diff --git a/src/Certify.UI.Shared/Windows/UpdateAvailable.xaml b/src/Certify.UI.Shared/Windows/UpdateAvailable.xaml index 5be71cd1e..d9f564911 100644 --- a/src/Certify.UI.Shared/Windows/UpdateAvailable.xaml +++ b/src/Certify.UI.Shared/Windows/UpdateAvailable.xaml @@ -1,8 +1,7 @@ - - + - + Download @@ -71,11 +66,11 @@ Later - + From 29eaf93fa44d08c5c865a56d2532f552e0ef5617 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 30 Apr 2026 06:32:40 +0000 Subject: [PATCH 5/8] Address Fluent port review feedback Agent-Logs-Url: https://github.com/webprofusion/certify/sessions/f3518714-da23-4e57-9fcf-5399a8acdf6c Co-authored-by: webprofusion-chrisc <2445502+webprofusion-chrisc@users.noreply.github.com> --- .../Controls/Fluent/NumberBox.cs | 42 +++++++++++++++---- .../ManagedCertificateSettings.xaml.cs | 2 +- 2 files changed, 34 insertions(+), 10 deletions(-) diff --git a/src/Certify.UI.Shared/Controls/Fluent/NumberBox.cs b/src/Certify.UI.Shared/Controls/Fluent/NumberBox.cs index 3866452f7..e6f73e659 100644 --- a/src/Certify.UI.Shared/Controls/Fluent/NumberBox.cs +++ b/src/Certify.UI.Shared/Controls/Fluent/NumberBox.cs @@ -2,19 +2,20 @@ using System.Globalization; using System.Windows; using System.Windows.Controls; +using System.Windows.Input; namespace Certify.UI.Controls.Fluent { public class NumberBox : TextBox { public static readonly DependencyProperty ValueProperty = - DependencyProperty.Register(nameof(Value), typeof(double?), typeof(NumberBox), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnValueChanged)); + DependencyProperty.Register(nameof(Value), typeof(double?), typeof(NumberBox), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnValueChanged, CoerceValue)); public static readonly DependencyProperty MinimumProperty = - DependencyProperty.Register(nameof(Minimum), typeof(double), typeof(NumberBox), new PropertyMetadata(double.MinValue)); + DependencyProperty.Register(nameof(Minimum), typeof(double), typeof(NumberBox), new PropertyMetadata(double.MinValue, OnLimitChanged)); public static readonly DependencyProperty MaximumProperty = - DependencyProperty.Register(nameof(Maximum), typeof(double), typeof(NumberBox), new PropertyMetadata(double.MaxValue)); + DependencyProperty.Register(nameof(Maximum), typeof(double), typeof(NumberBox), new PropertyMetadata(double.MaxValue, OnLimitChanged)); public static readonly DependencyProperty IntervalProperty = DependencyProperty.Register(nameof(Interval), typeof(double), typeof(NumberBox), new PropertyMetadata(1d)); @@ -24,6 +25,7 @@ public class NumberBox : TextBox public NumberBox() { TextChanged += NumberBox_TextChanged; + PreviewKeyDown += NumberBox_PreviewKeyDown; } public event RoutedPropertyChangedEventHandler ValueChanged; @@ -31,7 +33,7 @@ public NumberBox() public double? Value { get => (double?)GetValue(ValueProperty); - set => SetValue(ValueProperty, CoerceValue(value)); + set => SetValue(ValueProperty, value); } public double Minimum @@ -61,6 +63,21 @@ private static void OnValueChanged(DependencyObject d, DependencyPropertyChanged } } + private static void OnLimitChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + d.CoerceValue(ValueProperty); + } + + private static object CoerceValue(DependencyObject d, object baseValue) + { + if (d is NumberBox numberBox && baseValue is double value) + { + return numberBox.CoerceValueWithinBounds(value); + } + + return baseValue; + } + private void NumberBox_TextChanged(object sender, TextChangedEventArgs e) { if (_updatingText) @@ -70,18 +87,25 @@ private void NumberBox_TextChanged(object sender, TextChangedEventArgs e) if (double.TryParse(Text, NumberStyles.Float, CultureInfo.CurrentCulture, out var value)) { - Value = CoerceValue(value); + Value = value; } } - private double? CoerceValue(double? value) + private void NumberBox_PreviewKeyDown(object sender, KeyEventArgs e) { - if (value == null) + if (e.Key != Key.Up && e.Key != Key.Down) { - return null; + return; } - return Math.Max(Minimum, Math.Min(Maximum, value.Value)); + var currentValue = Value ?? (Minimum > double.MinValue ? Minimum : 0); + Value = currentValue + (e.Key == Key.Up ? Interval : -Interval); + e.Handled = true; + } + + private double CoerceValueWithinBounds(double value) + { + return Math.Max(Minimum, Math.Min(Maximum, value)); } private void UpdateText() diff --git a/src/Certify.UI.Shared/Controls/ManagedCertificate/ManagedCertificateSettings.xaml.cs b/src/Certify.UI.Shared/Controls/ManagedCertificate/ManagedCertificateSettings.xaml.cs index 6655be3d1..d2616b645 100644 --- a/src/Certify.UI.Shared/Controls/ManagedCertificate/ManagedCertificateSettings.xaml.cs +++ b/src/Certify.UI.Shared/Controls/ManagedCertificate/ManagedCertificateSettings.xaml.cs @@ -250,7 +250,7 @@ private void ShowTestResultsUI() var flyout = (GroupBox)obj; flyout.Header = "Test Progress"; flyout.Content = new TestProgress(); - flyout.Visibility = flyout.Visibility == Visibility.Visible ? Visibility.Collapsed : Visibility.Visible; + flyout.Visibility = flyout.Visibility != Visibility.Visible ? Visibility.Visible : Visibility.Collapsed; } private async void TestChallenge_Click(object sender, EventArgs e) From 0e9d008e588c2d039a9726d9b6f9e9c63e70d9e1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 30 Apr 2026 07:04:28 +0000 Subject: [PATCH 6/8] Improve Fluent theming and dark mode resources Agent-Logs-Url: https://github.com/webprofusion/certify/sessions/95583c19-aa9c-49b6-8577-b72b6361dc7b Co-authored-by: webprofusion-chrisc <2445502+webprofusion-chrisc@users.noreply.github.com> --- src/Certify.UI.Desktop/App.xaml | 81 +++++++++++++++++-- .../Controls/GettingStarted.xaml | 10 +-- .../AuthorityTokenList.xaml | 4 +- .../CertificateIdentifiers.xaml | 4 +- .../ChallengeConfigItem.xaml | 2 +- .../ManagedCertificate/DeploymentTask.xaml | 4 +- .../IdentifiersAuthorization.xaml | 2 +- .../ManagedCertificateSettings.xaml | 18 +++-- .../ManagedCertificate/StatusInfo.xaml | 10 +-- .../ManagedCertificate/TabHeader.xaml | 8 +- .../Controls/ManagedCertificate/TaskList.xaml | 6 +- .../Controls/ManagedCertificates.xaml | 31 ++++--- .../Controls/ProgressMonitor.xaml | 4 +- src/Certify.UI.Shared/ICertifyApp.cs | 36 ++++++++- .../Utils/ExpiryDateConverter.cs | 3 +- ...ManagedCertificateHealthColourConverter.cs | 3 +- .../Windows/AddToDashboard.xaml | 2 +- .../Windows/DataStoreConnections.xaml | 4 +- .../Windows/EditAccountDialog.xaml | 2 +- .../Windows/EditCertificateAuthority.xaml | 2 +- .../Windows/EditCredential.xaml | 2 +- .../Windows/EditDataStoreConnection.xaml | 2 +- .../Windows/EditDeploymentTask.xaml | 2 +- .../Windows/EditMaintenanceWindow.xaml | 6 +- .../Windows/EditServerConnection.xaml | 2 +- src/Certify.UI.Shared/Windows/Feedback.xaml | 2 +- .../Windows/GettingStartedGuide.xaml | 2 +- .../Windows/ImportExport.xaml | 2 +- src/Certify.UI.Shared/Windows/MainWindow.xaml | 38 +++++---- .../Windows/Registration.xaml | 2 +- .../Windows/ServerConnections.xaml | 6 +- .../Windows/UpdateAvailable.xaml | 2 +- 32 files changed, 213 insertions(+), 91 deletions(-) diff --git a/src/Certify.UI.Desktop/App.xaml b/src/Certify.UI.Desktop/App.xaml index a3a9548a6..44c984f2c 100644 --- a/src/Certify.UI.Desktop/App.xaml +++ b/src/Certify.UI.Desktop/App.xaml @@ -11,7 +11,21 @@ + + #FF78B83E + #FF8FC75A + #FFA8D27A + #FFDDEECD + #FF5EA02D + #FF467D1F + #FF315916 + + + + + + @@ -34,7 +50,7 @@ - + @@ -43,24 +59,79 @@ - + + + + + + + + + + + + + + + - + diff --git a/src/Certify.UI.Shared/Controls/GettingStarted.xaml b/src/Certify.UI.Shared/Controls/GettingStarted.xaml index 78620af2c..c6cb70b38 100644 --- a/src/Certify.UI.Shared/Controls/GettingStarted.xaml +++ b/src/Certify.UI.Shared/Controls/GettingStarted.xaml @@ -26,13 +26,13 @@ Margin="0,0,0,0" FontFamily="Segoe UI" FontSize="30" - Foreground="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}" + Foreground="{DynamicResource TextOnAccentFillColorPrimaryBrush}" TextWrapping="Wrap"> @@ -117,7 +117,7 @@ Margin="0" HorizontalAlignment="Left" VerticalAlignment="Center" - Foreground="#FF6BB039" + Foreground="{DynamicResource AccentFillColorDefaultBrush}" Icon="PlayCircle" /> @@ -278,7 +278,7 @@ Margin="0" HorizontalAlignment="Left" VerticalAlignment="Center" - Foreground="#FF6BB039" + Foreground="{DynamicResource AccentFillColorDefaultBrush}" Icon="PlusCircle" /> @@ -296,7 +296,7 @@ Margin="0" HorizontalAlignment="Left" VerticalAlignment="Center" - Foreground="#FF6BB039" + Foreground="{DynamicResource AccentFillColorDefaultBrush}" Icon="Leaf" /> diff --git a/src/Certify.UI.Shared/Controls/ManagedCertificate/AuthorityTokenList.xaml b/src/Certify.UI.Shared/Controls/ManagedCertificate/AuthorityTokenList.xaml index 5bf7ee428..fb8651354 100644 --- a/src/Certify.UI.Shared/Controls/ManagedCertificate/AuthorityTokenList.xaml +++ b/src/Certify.UI.Shared/Controls/ManagedCertificate/AuthorityTokenList.xaml @@ -34,7 +34,7 @@ Margin="0" HorizontalAlignment="Left" VerticalAlignment="Center" - Foreground="#FF6BB039" + Foreground="{DynamicResource AccentFillColorDefaultBrush}" Icon="FolderOpen" /> @@ -65,7 +65,7 @@ Margin="0" HorizontalAlignment="Left" VerticalAlignment="Center" - Foreground="#FF6BB039" + Foreground="{DynamicResource AccentFillColorDefaultBrush}" Icon="PlusCircle" /> diff --git a/src/Certify.UI.Shared/Controls/ManagedCertificate/CertificateIdentifiers.xaml b/src/Certify.UI.Shared/Controls/ManagedCertificate/CertificateIdentifiers.xaml index f92d52ec5..c363b260f 100644 --- a/src/Certify.UI.Shared/Controls/ManagedCertificate/CertificateIdentifiers.xaml +++ b/src/Certify.UI.Shared/Controls/ManagedCertificate/CertificateIdentifiers.xaml @@ -108,7 +108,7 @@ - + @@ -403,7 +403,7 @@ diff --git a/src/Certify.UI.Shared/Controls/ManagedCertificate/ChallengeConfigItem.xaml b/src/Certify.UI.Shared/Controls/ManagedCertificate/ChallengeConfigItem.xaml index 8da32f26d..919e9feed 100644 --- a/src/Certify.UI.Shared/Controls/ManagedCertificate/ChallengeConfigItem.xaml +++ b/src/Certify.UI.Shared/Controls/ManagedCertificate/ChallengeConfigItem.xaml @@ -257,7 +257,7 @@ x:Name="RefreshingDnsZones" Height="12" Margin="4,0,0,0" - Foreground="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}" + Foreground="{DynamicResource TextFillColorSecondaryBrush}" Icon="Refresh" Spin="True" SpinDuration="1" diff --git a/src/Certify.UI.Shared/Controls/ManagedCertificate/DeploymentTask.xaml b/src/Certify.UI.Shared/Controls/ManagedCertificate/DeploymentTask.xaml index 30c480827..4e1539e58 100644 --- a/src/Certify.UI.Shared/Controls/ManagedCertificate/DeploymentTask.xaml +++ b/src/Certify.UI.Shared/Controls/ManagedCertificate/DeploymentTask.xaml @@ -128,7 +128,7 @@ diff --git a/src/Certify.UI.Shared/Controls/ManagedCertificate/IdentifiersAuthorization.xaml b/src/Certify.UI.Shared/Controls/ManagedCertificate/IdentifiersAuthorization.xaml index 4a1655c92..f7ee1aff0 100644 --- a/src/Certify.UI.Shared/Controls/ManagedCertificate/IdentifiersAuthorization.xaml +++ b/src/Certify.UI.Shared/Controls/ManagedCertificate/IdentifiersAuthorization.xaml @@ -48,7 +48,7 @@ Style="{StaticResource Subheading}" Text="{Binding SelectedItem.DomainMatch}" /> - + diff --git a/src/Certify.UI.Shared/Controls/ManagedCertificate/ManagedCertificateSettings.xaml b/src/Certify.UI.Shared/Controls/ManagedCertificate/ManagedCertificateSettings.xaml index 6b5969aa8..a979a0b08 100644 --- a/src/Certify.UI.Shared/Controls/ManagedCertificate/ManagedCertificateSettings.xaml +++ b/src/Certify.UI.Shared/Controls/ManagedCertificate/ManagedCertificateSettings.xaml @@ -51,7 +51,7 @@ Margin="0,4,8,4" VerticalAlignment="Top" AutomationProperties.Name="Finish Edit" - Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" + Background="{DynamicResource CardBackgroundFillColorDefaultBrush}" BorderThickness="0" Click="FinishedEditName_Click" DockPanel.Dock="Left" @@ -70,14 +70,14 @@ AutomationProperties.Name="{Binding SelectedItem.Name}" DockPanel.Dock="Left" FontSize="20" - Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" + Foreground="{DynamicResource TextFillColorPrimaryBrush}" Text="{Binding SelectedItem.Name}" />