diff --git a/src/Forge.Application.Demo/App.xaml b/src/Forge.Application.Demo/App.xaml
index 553ac7b..b4a660d 100644
--- a/src/Forge.Application.Demo/App.xaml
+++ b/src/Forge.Application.Demo/App.xaml
@@ -6,34 +6,41 @@
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
diff --git a/src/Forge.Application.Demo/Forge.Application.Demo.csproj b/src/Forge.Application.Demo/Forge.Application.Demo.csproj
index 91b3493..0cc4d0b 100644
--- a/src/Forge.Application.Demo/Forge.Application.Demo.csproj
+++ b/src/Forge.Application.Demo/Forge.Application.Demo.csproj
@@ -34,9 +34,15 @@
4
-
-
-
+
+
+
+
+ 0.1.7
+
+
+ 1.0.1
+
diff --git a/src/Forge.Application.Demo/Views/AboutView.xaml b/src/Forge.Application.Demo/Views/AboutView.xaml
index 4f129a7..d5bb103 100644
--- a/src/Forge.Application.Demo/Views/AboutView.xaml
+++ b/src/Forge.Application.Demo/Views/AboutView.xaml
@@ -11,7 +11,7 @@
VerticalAlignment="Stretch">
-
+
-
+
diff --git a/src/Forge.Application/Controls/MaterialRoutesWindow.xaml b/src/Forge.Application/Controls/MaterialRoutesWindow.xaml
index 90cd5ff..a6e960f 100644
--- a/src/Forge.Application/Controls/MaterialRoutesWindow.xaml
+++ b/src/Forge.Application/Controls/MaterialRoutesWindow.xaml
@@ -18,7 +18,6 @@
IsDesignTimeCreatable=False}"
internal:AttachedProperties.InputBindingsSource="{Binding Routes.Current.RouteConfig.KeyBindings}"
Background="{DynamicResource MaterialDesignPaper}"
- EnableDWMDropShadow="True"
FontFamily="pack://application:,,,/MaterialDesignThemes.Wpf;component/Resources/Roboto/#Roboto"
TextElement.FontSize="{Binding FontSize,
Mode=OneWay}"
diff --git a/src/Forge.Application/Forge.Application.csproj b/src/Forge.Application/Forge.Application.csproj
index b05a86d..5235f70 100644
--- a/src/Forge.Application/Forge.Application.csproj
+++ b/src/Forge.Application/Forge.Application.csproj
@@ -7,12 +7,12 @@
-
-
-
+
+
+
- 4.9.2
+ 5.10.0
all
runtime; build; native; contentfiles; analyzers
diff --git a/src/Forge.Application/Infrastructure/Internal/PaletteService.cs b/src/Forge.Application/Infrastructure/Internal/PaletteService.cs
index ecaef3a..4f322c7 100644
--- a/src/Forge.Application/Infrastructure/Internal/PaletteService.cs
+++ b/src/Forge.Application/Infrastructure/Internal/PaletteService.cs
@@ -1,5 +1,6 @@
namespace Forge.Application.Infrastructure.Internal
{
+ using System.Windows.Media;
using MaterialDesignThemes.Wpf;
internal class PaletteService : IPaletteService
@@ -16,36 +17,43 @@ internal class PaletteService : IPaletteService
public void RefreshTheme()
{
- new PaletteHelper().SetLightDark(this.DarkMode);
+ var paletteHelper = new PaletteHelper();
+ var theme = paletteHelper.GetTheme();
+ IBaseTheme baseTheme = DarkMode ? new MaterialDesignDarkTheme() : (IBaseTheme)new MaterialDesignLightTheme();
+ theme.SetBaseTheme(baseTheme);
+ paletteHelper.SetTheme(theme);
}
public void RefreshPalette()
{
var paletteHelper = new PaletteHelper();
+ var theme = paletteHelper.GetTheme();
if (this.DarkMode)
{
if (this.DarkModePrimary != null)
{
- paletteHelper.ReplacePrimaryColor(this.DarkModePrimary);
+ theme.SetPrimaryColor((Color)ColorConverter.ConvertFromString(this.DarkModePrimary));
}
if (this.DarkModeAccent != null)
{
- paletteHelper.ReplaceAccentColor(this.DarkModeAccent);
+ theme.SetSecondaryColor((Color)ColorConverter.ConvertFromString(this.DarkModeAccent));
}
}
else
{
if (this.LightModePrimary != null)
{
- paletteHelper.ReplacePrimaryColor(this.LightModePrimary);
+ theme.SetPrimaryColor((Color)ColorConverter.ConvertFromString(this.LightModePrimary));
}
if (this.LightModeAccent != null)
{
- paletteHelper.ReplaceAccentColor(this.LightModeAccent);
+ theme.SetSecondaryColor((Color)ColorConverter.ConvertFromString(this.LightModeAccent));
}
}
+
+ paletteHelper.SetTheme(theme);
}
}
}
diff --git a/tools/Forge.Application.Template/Forge.Application.Template.csproj b/tools/Forge.Application.Template/Forge.Application.Template.csproj
index f2922bf..f314913 100644
--- a/tools/Forge.Application.Template/Forge.Application.Template.csproj
+++ b/tools/Forge.Application.Template/Forge.Application.Template.csproj
@@ -37,9 +37,9 @@
1.0.1
-
-
-
+
+
+