From 94f5eced01de57f7d009a5d6bd3c288bd641289c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Holger=20B=C3=B6rchers?= Date: Fri, 10 Jul 2020 22:42:06 +0200 Subject: [PATCH] Added Accent color settings --- App/AccentColor.cs | 10 + App/App.xaml.cs | 9 + App/MainWindow.xaml | 205 +++++++++--------- App/MainWindowViewModel.cs | 22 +- .../PropertyPresenter/PropertyPresenter.xaml | 2 +- 5 files changed, 147 insertions(+), 101 deletions(-) create mode 100644 App/AccentColor.cs diff --git a/App/AccentColor.cs b/App/AccentColor.cs new file mode 100644 index 0000000..a01bfa5 --- /dev/null +++ b/App/AccentColor.cs @@ -0,0 +1,10 @@ +namespace ModernWpfPlayground +{ + public enum AccentColor + { + Green, + Yellow, + Blue, + Purple + } +} \ No newline at end of file diff --git a/App/App.xaml.cs b/App/App.xaml.cs index 0ffe5e5..d45232b 100644 --- a/App/App.xaml.cs +++ b/App/App.xaml.cs @@ -1,4 +1,6 @@ using System.Windows; +using System.Windows.Media; +using ModernWpf; using Prism.Ioc; namespace ModernWpfPlayground @@ -8,6 +10,13 @@ namespace ModernWpfPlayground /// public partial class App { + /// + protected override void OnStartup(StartupEventArgs e) + { + ThemeManager.Current.AccentColor = Color.FromArgb(255, 0, 86, 76); + base.OnStartup(e); + } + protected override void RegisterTypes(IContainerRegistry containerRegistry) { containerRegistry.Register(); diff --git a/App/MainWindow.xaml b/App/MainWindow.xaml index 04b64d2..e458782 100644 --- a/App/MainWindow.xaml +++ b/App/MainWindow.xaml @@ -120,7 +120,7 @@ - - - + Margin="5" + Orientation="Vertical" + Spacing="5"> +