diff --git a/build/MigrateBrushes.ps1 b/build/MigrateBrushes.ps1
index 197aeeb3f1..662eb074f4 100644
--- a/build/MigrateBrushes.ps1
+++ b/build/MigrateBrushes.ps1
@@ -29,6 +29,8 @@ foreach ($file in $files) {
$fileContents = $fileContents -replace "\{StaticResource\ MaterialDesignCheckBoxDisabled}", "{StaticResource MaterialDesign.Brush.CheckBox.Disabled}"
$fileContents = $fileContents -replace "\{StaticResource\ MaterialDesignChipBackground}", "{StaticResource MaterialDesign.Brush.Chip.Background}"
$fileContents = $fileContents -replace "\{StaticResource\ MaterialDesignDataGridRowHoverBackground}", "{StaticResource MaterialDesign.Brush.DataGrid.RowHoverBackground}"
+ $fileContents = $fileContents -replace "\{StaticResource\ MaterialDesign\.Brush\.ValidationError}", "{StaticResource MaterialDesign.Brush.Error}"
+ $fileContents = $fileContents -replace "\{StaticResource\ MaterialDesignValidationErrorBrush}", "{StaticResource MaterialDesign.Brush.Error}"
$fileContents = $fileContents -replace "\{StaticResource\ MaterialDesignBody}", "{StaticResource MaterialDesign.Brush.Foreground}"
$fileContents = $fileContents -replace "\{StaticResource\ MaterialDesignBodyLight}", "{StaticResource MaterialDesign.Brush.ForegroundLight}"
$fileContents = $fileContents -replace "\{StaticResource\ MaterialDesignCheckBoxOff}", "{StaticResource MaterialDesign.Brush.ForegroundLight}"
@@ -46,7 +48,6 @@ foreach ($file in $files) {
$fileContents = $fileContents -replace "\{StaticResource\ MaterialDesignToolBackground}", "{StaticResource MaterialDesign.Brush.ToolBar.Item.Background}"
$fileContents = $fileContents -replace "\{StaticResource\ MaterialDesignToolForeground}", "{StaticResource MaterialDesign.Brush.ToolBar.Item.Foreground}"
$fileContents = $fileContents -replace "\{StaticResource\ MaterialDesignToolTipBackground}", "{StaticResource MaterialDesign.Brush.ToolTip.Background}"
- $fileContents = $fileContents -replace "\{StaticResource\ MaterialDesignValidationErrorBrush}", "{StaticResource MaterialDesign.Brush.ValidationError}"
if ($fileContents.Length -ne $fileLength) {
Set-Content -Path $file -Value $fileContents -Encoding utf8BOM -NoNewline
}
diff --git a/src/MainDemo.Wpf/Buttons.xaml b/src/MainDemo.Wpf/Buttons.xaml
index c5a8b6b33f..feec76eca1 100644
--- a/src/MainDemo.Wpf/Buttons.xaml
+++ b/src/MainDemo.Wpf/Buttons.xaml
@@ -2,10 +2,11 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:sharedDomain="clr-namespace:MaterialDesignDemo.Shared.Domain;assembly=MaterialDesignDemo.Shared"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:materialDesignConverters="clr-namespace:MaterialDesignThemes.Wpf.Converters;assembly=MaterialDesignThemes.Wpf"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:sharedDomain="clr-namespace:MaterialDesignDemo.Shared.Domain;assembly=MaterialDesignDemo.Shared"
+ xmlns:sharedButtons="clr-namespace:MaterialDesignDemo.Shared.Examples.Buttons;assembly=MaterialDesignDemo.Shared"
xmlns:smtx="clr-namespace:ShowMeTheXAML;assembly=ShowMeTheXAML"
xmlns:system="clr-namespace:System;assembly=mscorlib"
d:DataContext="{d:DesignInstance sharedDomain:ButtonsViewModel}"
@@ -498,6 +499,10 @@
+
+
+
+
@@ -969,7 +974,6 @@
diff --git a/src/MainDemo.Wpf/ColorTool.xaml b/src/MainDemo.Wpf/ColorTool.xaml
index 582b92f14c..489423a7fa 100644
--- a/src/MainDemo.Wpf/ColorTool.xaml
+++ b/src/MainDemo.Wpf/ColorTool.xaml
@@ -4,6 +4,7 @@
xmlns:converters="clr-namespace:MaterialDesignDemo.Shared.Converters;assembly=MaterialDesignDemo.Shared"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:sharedDomain="clr-namespace:MaterialDesignDemo.Shared.Domain;assembly=MaterialDesignDemo.Shared"
+ xmlns:sharedColorTools="clr-namespace:MaterialDesignDemo.Shared.Examples.ColorTools;assembly=MaterialDesignDemo.Shared"
xmlns:local="clr-namespace:MaterialDesignDemo"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:materialDesignColors="clr-namespace:MaterialDesignColors;assembly=MaterialDesignColors"
@@ -124,6 +125,11 @@
+
+
+
+
+
diff --git a/src/MaterialDesign3.Demo.Wpf/Buttons.xaml b/src/MaterialDesign3.Demo.Wpf/Buttons.xaml
index 265bb03e9b..33c84816ea 100644
--- a/src/MaterialDesign3.Demo.Wpf/Buttons.xaml
+++ b/src/MaterialDesign3.Demo.Wpf/Buttons.xaml
@@ -3,6 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:sharedDomain="clr-namespace:MaterialDesignDemo.Shared.Domain;assembly=MaterialDesignDemo.Shared"
+ xmlns:sharedButtons="clr-namespace:MaterialDesignDemo.Shared.Examples.Buttons;assembly=MaterialDesignDemo.Shared"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:materialDesignConverters="clr-namespace:MaterialDesignThemes.Wpf.Converters;assembly=MaterialDesignThemes.Wpf"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
@@ -511,6 +512,9 @@
+
+
+
diff --git a/src/MaterialDesign3.Demo.Wpf/ColorTool.xaml b/src/MaterialDesign3.Demo.Wpf/ColorTool.xaml
index 2042d4a322..7a03dff3c4 100644
--- a/src/MaterialDesign3.Demo.Wpf/ColorTool.xaml
+++ b/src/MaterialDesign3.Demo.Wpf/ColorTool.xaml
@@ -4,6 +4,7 @@
xmlns:converters="clr-namespace:MaterialDesignDemo.Shared.Converters;assembly=MaterialDesignDemo.Shared"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:sharedDomain="clr-namespace:MaterialDesignDemo.Shared.Domain;assembly=MaterialDesignDemo.Shared"
+ xmlns:sharedColorTools="clr-namespace:MaterialDesignDemo.Shared.Examples.ColorTools;assembly=MaterialDesignDemo.Shared"
xmlns:local="clr-namespace:MaterialDesign3Demo"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:materialDesignColors="clr-namespace:MaterialDesignColors;assembly=MaterialDesignColors"
@@ -121,6 +122,11 @@
+
+
+
+
+
diff --git a/src/MaterialDesignDemo.Shared/Examples/Buttons/SemanticColoredButtonsExample.xaml b/src/MaterialDesignDemo.Shared/Examples/Buttons/SemanticColoredButtonsExample.xaml
new file mode 100644
index 0000000000..a4b65a7184
--- /dev/null
+++ b/src/MaterialDesignDemo.Shared/Examples/Buttons/SemanticColoredButtonsExample.xaml
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/MaterialDesignDemo.Shared/Examples/Buttons/SemanticColoredButtonsExample.xaml.cs b/src/MaterialDesignDemo.Shared/Examples/Buttons/SemanticColoredButtonsExample.xaml.cs
new file mode 100644
index 0000000000..d7d2b65739
--- /dev/null
+++ b/src/MaterialDesignDemo.Shared/Examples/Buttons/SemanticColoredButtonsExample.xaml.cs
@@ -0,0 +1,9 @@
+namespace MaterialDesignDemo.Shared.Examples.Buttons;
+
+public partial class SemanticColoredButtonsExample : UserControl
+{
+ public SemanticColoredButtonsExample()
+ {
+ InitializeComponent();
+ }
+}
diff --git a/src/MaterialDesignDemo.Shared/Examples/ColorTools/SemanticColorsExamples.xaml b/src/MaterialDesignDemo.Shared/Examples/ColorTools/SemanticColorsExamples.xaml
new file mode 100644
index 0000000000..cb2fd6f42a
--- /dev/null
+++ b/src/MaterialDesignDemo.Shared/Examples/ColorTools/SemanticColorsExamples.xaml
@@ -0,0 +1,201 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/MaterialDesignDemo.Shared/Examples/ColorTools/SemanticColorsExamples.xaml.cs b/src/MaterialDesignDemo.Shared/Examples/ColorTools/SemanticColorsExamples.xaml.cs
new file mode 100644
index 0000000000..03c9799b17
--- /dev/null
+++ b/src/MaterialDesignDemo.Shared/Examples/ColorTools/SemanticColorsExamples.xaml.cs
@@ -0,0 +1,20 @@
+using CommunityToolkit.Mvvm.ComponentModel;
+using CommunityToolkit.Mvvm.Input;
+
+namespace MaterialDesignDemo.Shared.Examples.ColorTools;
+
+public partial class SemanticColorsExamples : UserControl
+{
+ public SemanticColorsExamples()
+ {
+ DataContext = new SemanticColorsViewModel();
+ InitializeComponent();
+ }
+}
+
+public partial class SemanticColorsViewModel : ObservableObject
+{
+ [RelayCommand]
+ private void CopyResource(string resourceKey)
+ => System.Windows.Clipboard.SetText(resourceKey);
+}
diff --git a/src/MaterialDesignDemo.Shared/Examples/Dialogs/DialogHostWaitForExample.xaml b/src/MaterialDesignDemo.Shared/Examples/Dialogs/DialogHostWaitForExample.xaml
index 5f7f5885f8..5db7adb64a 100644
--- a/src/MaterialDesignDemo.Shared/Examples/Dialogs/DialogHostWaitForExample.xaml
+++ b/src/MaterialDesignDemo.Shared/Examples/Dialogs/DialogHostWaitForExample.xaml
@@ -74,7 +74,7 @@
-
+
diff --git a/src/MaterialDesignThemes.Wpf/ResourceDictionaryExtensions.g.cs b/src/MaterialDesignThemes.Wpf/ResourceDictionaryExtensions.g.cs
index 4701fc10ad..f0e69b265f 100644
--- a/src/MaterialDesignThemes.Wpf/ResourceDictionaryExtensions.g.cs
+++ b/src/MaterialDesignThemes.Wpf/ResourceDictionaryExtensions.g.cs
@@ -11,9 +11,12 @@ static partial class ResourceDictionaryExtensions
private static partial void LoadThemeColors(ResourceDictionary resourceDictionary, Theme theme)
{
theme.Background = GetColor(resourceDictionary, "MaterialDesign.Brush.Background", "MaterialDesignPaper");
+ theme.Error = GetColor(resourceDictionary, "MaterialDesign.Brush.Error", "MaterialDesign.Brush.ValidationError", "MaterialDesignValidationErrorBrush");
theme.Foreground = GetColor(resourceDictionary, "MaterialDesign.Brush.Foreground", "MaterialDesignBody");
theme.ForegroundLight = GetColor(resourceDictionary, "MaterialDesign.Brush.ForegroundLight", "MaterialDesignBodyLight", "MaterialDesignCheckBoxOff", "MaterialDesignTextBoxBorder");
- theme.ValidationError = GetColor(resourceDictionary, "MaterialDesign.Brush.ValidationError", "MaterialDesignValidationErrorBrush");
+ theme.Info = GetColor(resourceDictionary, "MaterialDesign.Brush.Info");
+ theme.Success = GetColor(resourceDictionary, "MaterialDesign.Brush.Success");
+ theme.Warning = GetColor(resourceDictionary, "MaterialDesign.Brush.Warning");
theme.Badgeds.DarkBackground = GetColor(resourceDictionary, "MaterialDesign.Brush.Badged.DarkBackground");
theme.Badgeds.DarkForeground = GetColor(resourceDictionary, "MaterialDesign.Brush.Badged.DarkForeground");
theme.Badgeds.LightBackground = GetColor(resourceDictionary, "MaterialDesign.Brush.Badged.LightBackground");
@@ -105,14 +108,18 @@ private static partial void ApplyThemeColors(ResourceDictionary resourceDictiona
{
SetSolidColorBrush(resourceDictionary, "MaterialDesign.Brush.Background", theme.Background);
SetSolidColorBrush(resourceDictionary, "MaterialDesignPaper", theme.Background);
+ SetSolidColorBrush(resourceDictionary, "MaterialDesign.Brush.Error", theme.Error);
+ SetSolidColorBrush(resourceDictionary, "MaterialDesign.Brush.ValidationError", theme.Error);
+ SetSolidColorBrush(resourceDictionary, "MaterialDesignValidationErrorBrush", theme.Error);
SetSolidColorBrush(resourceDictionary, "MaterialDesign.Brush.Foreground", theme.Foreground);
SetSolidColorBrush(resourceDictionary, "MaterialDesignBody", theme.Foreground);
SetSolidColorBrush(resourceDictionary, "MaterialDesign.Brush.ForegroundLight", theme.ForegroundLight);
SetSolidColorBrush(resourceDictionary, "MaterialDesignBodyLight", theme.ForegroundLight);
SetSolidColorBrush(resourceDictionary, "MaterialDesignCheckBoxOff", theme.ForegroundLight);
SetSolidColorBrush(resourceDictionary, "MaterialDesignTextBoxBorder", theme.ForegroundLight);
- SetSolidColorBrush(resourceDictionary, "MaterialDesign.Brush.ValidationError", theme.ValidationError);
- SetSolidColorBrush(resourceDictionary, "MaterialDesignValidationErrorBrush", theme.ValidationError);
+ SetSolidColorBrush(resourceDictionary, "MaterialDesign.Brush.Info", theme.Info);
+ SetSolidColorBrush(resourceDictionary, "MaterialDesign.Brush.Success", theme.Success);
+ SetSolidColorBrush(resourceDictionary, "MaterialDesign.Brush.Warning", theme.Warning);
SetSolidColorBrush(resourceDictionary, "MaterialDesign.Brush.Badged.DarkBackground", theme.Badgeds.DarkBackground);
SetSolidColorBrush(resourceDictionary, "MaterialDesign.Brush.Badged.DarkForeground", theme.Badgeds.DarkForeground);
SetSolidColorBrush(resourceDictionary, "MaterialDesign.Brush.Badged.LightBackground", theme.Badgeds.LightBackground);
diff --git a/src/MaterialDesignThemes.Wpf/Theme.g.cs b/src/MaterialDesignThemes.Wpf/Theme.g.cs
index 9ea4eaa13c..d3e26b5a85 100644
--- a/src/MaterialDesignThemes.Wpf/Theme.g.cs
+++ b/src/MaterialDesignThemes.Wpf/Theme.g.cs
@@ -44,6 +44,13 @@ public ColorReference Background
set => _background = value;
}
+ private ColorReference _error;
+ public ColorReference Error
+ {
+ get => Resolve(_error);
+ set => _error = value;
+ }
+
private ColorReference _foreground;
public ColorReference Foreground
{
@@ -58,11 +65,25 @@ public ColorReference ForegroundLight
set => _foregroundLight = value;
}
- private ColorReference _validationError;
- public ColorReference ValidationError
+ private ColorReference _info;
+ public ColorReference Info
+ {
+ get => Resolve(_info);
+ set => _info = value;
+ }
+
+ private ColorReference _success;
+ public ColorReference Success
+ {
+ get => Resolve(_success);
+ set => _success = value;
+ }
+
+ private ColorReference _warning;
+ public ColorReference Warning
{
- get => Resolve(_validationError);
- set => _validationError = value;
+ get => Resolve(_warning);
+ set => _warning = value;
}
public Badged Badgeds { get; set; }
diff --git a/src/MaterialDesignThemes.Wpf/ThemeExtensions.g.cs b/src/MaterialDesignThemes.Wpf/ThemeExtensions.g.cs
index cb5e6391b1..5437f0de93 100644
--- a/src/MaterialDesignThemes.Wpf/ThemeExtensions.g.cs
+++ b/src/MaterialDesignThemes.Wpf/ThemeExtensions.g.cs
@@ -16,9 +16,12 @@ static partial class ThemeExtensions
public static partial void SetLightTheme(this Theme theme)
{
theme.Background = BaseThemeColors.Neutral900;
+ theme.Error = Color.FromArgb(0xFF, 0xF4, 0x43, 0x36);
theme.Foreground = BaseThemeColors.Black900;
theme.ForegroundLight = BaseThemeColors.Black500;
- theme.ValidationError = Color.FromArgb(0xFF, 0xB0, 0x00, 0x20);
+ theme.Info = Color.FromArgb(0xFF, 0x21, 0x96, 0xF3);
+ theme.Success = Color.FromArgb(0xFF, 0x00, 0xC8, 0x53);
+ theme.Warning = Color.FromArgb(0xFF, 0xFF, 0x98, 0x00);
theme.Badgeds.DarkBackground = BaseThemeColors.Neutral100;
theme.Badgeds.DarkForeground = BaseThemeColors.Neutral900;
theme.Badgeds.LightBackground = BaseThemeColors.Neutral900;
@@ -109,9 +112,12 @@ public static partial void SetLightTheme(this Theme theme)
public static partial void SetDarkTheme(this Theme theme)
{
theme.Background = BaseThemeColors.Neutral100;
+ theme.Error = Color.FromArgb(0xFF, 0xFF, 0x3F, 0x5F);
theme.Foreground = BaseThemeColors.White900;
theme.ForegroundLight = BaseThemeColors.White500;
- theme.ValidationError = Color.FromArgb(0xFF, 0xCF, 0x66, 0x79);
+ theme.Info = Color.FromArgb(0xFF, 0x4A, 0x86, 0xFF);
+ theme.Success = Color.FromArgb(0xFF, 0x3D, 0xCB, 0x6C);
+ theme.Warning = Color.FromArgb(0xFF, 0xFF, 0xB5, 0x45);
theme.Badgeds.DarkBackground = BaseThemeColors.Neutral100;
theme.Badgeds.DarkForeground = BaseThemeColors.Neutral900;
theme.Badgeds.LightBackground = BaseThemeColors.Neutral900;
diff --git a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.AutoSuggestBox.xaml b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.AutoSuggestBox.xaml
index 8183e8b482..2377f9116a 100644
--- a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.AutoSuggestBox.xaml
+++ b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.AutoSuggestBox.xaml
@@ -534,9 +534,9 @@
-
-
-
+
+
+
@@ -556,9 +556,9 @@
-
-
-
+
+
+
diff --git a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.CheckBox.xaml b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.CheckBox.xaml
index 2c5d2fbdc4..b75068710c 100644
--- a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.CheckBox.xaml
+++ b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.CheckBox.xaml
@@ -183,8 +183,8 @@
-
-
+
+
@@ -313,8 +313,8 @@
-
-
+
+
diff --git a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.ComboBox.xaml b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.ComboBox.xaml
index 72a49c8da4..e9502f05b5 100644
--- a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.ComboBox.xaml
+++ b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.ComboBox.xaml
@@ -755,16 +755,16 @@
-
-
-
+
+
+
-
+
diff --git a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.Dark.xaml b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.Dark.xaml
index c4d66b89a1..66f01ecfc2 100644
--- a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.Dark.xaml
+++ b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.Dark.xaml
@@ -41,6 +41,7 @@
+
@@ -58,6 +59,7 @@
+
@@ -76,6 +78,7 @@
+
@@ -94,6 +97,6 @@
-
+
diff --git a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.DataGrid.xaml b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.DataGrid.xaml
index 221d0a6282..87bd6a558d 100644
--- a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.DataGrid.xaml
+++ b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.DataGrid.xaml
@@ -71,7 +71,7 @@
-
+
@@ -88,7 +88,7 @@
@@ -172,7 +172,7 @@
@@ -201,7 +201,7 @@
-
+
diff --git a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.DatePicker.xaml b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.DatePicker.xaml
index b99dd3a267..3464247d8e 100644
--- a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.DatePicker.xaml
+++ b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.DatePicker.xaml
@@ -141,7 +141,7 @@
-
+
diff --git a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.Light.xaml b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.Light.xaml
index fed8cff81b..37b281fede 100644
--- a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.Light.xaml
+++ b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.Light.xaml
@@ -41,6 +41,7 @@
+
@@ -58,6 +59,7 @@
+
@@ -76,6 +78,7 @@
+
@@ -94,6 +97,6 @@
-
+
diff --git a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.NumericUpDown.xaml b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.NumericUpDown.xaml
index bbaf7730a6..b5e3fa6afa 100644
--- a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.NumericUpDown.xaml
+++ b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.NumericUpDown.xaml
@@ -139,7 +139,7 @@
-
+
diff --git a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.ObsoleteBrushes.xaml b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.ObsoleteBrushes.xaml
index 041cb23aa4..6ad06eb617 100644
--- a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.ObsoleteBrushes.xaml
+++ b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.ObsoleteBrushes.xaml
@@ -58,6 +58,8 @@
+
+
@@ -75,6 +77,5 @@
-
diff --git a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.PasswordBox.xaml b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.PasswordBox.xaml
index b56fee2651..14a68aee03 100644
--- a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.PasswordBox.xaml
+++ b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.PasswordBox.xaml
@@ -500,9 +500,9 @@
-
-
-
+
+
+
@@ -1136,9 +1136,9 @@
-
-
-
+
+
+
diff --git a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.RadioButton.xaml b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.RadioButton.xaml
index 9f7e8800ef..b0b04794c5 100644
--- a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.RadioButton.xaml
+++ b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.RadioButton.xaml
@@ -150,8 +150,8 @@
-
-
+
+
@@ -279,8 +279,8 @@
-
-
+
+
diff --git a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.TextBox.xaml b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.TextBox.xaml
index 09472bf46d..c3ceecce22 100644
--- a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.TextBox.xaml
+++ b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.TextBox.xaml
@@ -590,9 +590,9 @@
-
-
-
+
+
+
@@ -612,9 +612,9 @@
-
-
-
+
+
+
diff --git a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.TimePicker.xaml b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.TimePicker.xaml
index d33df3e72f..dcf1f56b45 100644
--- a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.TimePicker.xaml
+++ b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.TimePicker.xaml
@@ -152,7 +152,7 @@
-
+
diff --git a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.ValidationErrorTemplate.xaml b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.ValidationErrorTemplate.xaml
index 43ace0c281..566f268ab7 100644
--- a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.ValidationErrorTemplate.xaml
+++ b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.ValidationErrorTemplate.xaml
@@ -18,7 +18,7 @@
Margin="2"
HorizontalAlignment="{Binding ElementName=Placeholder, Path=AdornedElement.(wpf:ValidationAssist.HorizontalAlignment)}"
FontSize="{Binding ElementName=Placeholder, Path=AdornedElement.(wpf:ValidationAssist.FontSize)}"
- Foreground="{DynamicResource MaterialDesign.Brush.ValidationError}"
+ Foreground="{DynamicResource MaterialDesign.Brush.Error}"
Text="{Binding ErrorContent, Mode=OneTime}"
TextWrapping="Wrap"
UseLayoutRounding="false" />
@@ -34,7 +34,7 @@
Margin="0,2"
HorizontalAlignment="{Binding ElementName=Placeholder, Path=AdornedElement.(wpf:ValidationAssist.HorizontalAlignment)}"
FontSize="{Binding ElementName=Placeholder, Path=AdornedElement.(wpf:ValidationAssist.FontSize)}"
- Foreground="{DynamicResource MaterialDesign.Brush.ValidationError}"
+ Foreground="{DynamicResource MaterialDesign.Brush.Error}"
Text="{Binding /ErrorContent, Mode=OneTime}"
TextWrapping="Wrap"
UseLayoutRounding="false" />
@@ -48,7 +48,7 @@
diff --git a/src/MaterialDesignToolkit.ResourceGeneration/ThemeColors.json b/src/MaterialDesignToolkit.ResourceGeneration/ThemeColors.json
index 33e51770af..c2a52931ed 100644
--- a/src/MaterialDesignToolkit.ResourceGeneration/ThemeColors.json
+++ b/src/MaterialDesignToolkit.ResourceGeneration/ThemeColors.json
@@ -43,17 +43,6 @@
"MaterialDesignTextBoxBorder"
]
},
- {
- "name": "MaterialDesign.Brush.ValidationError",
- "themeValues": {
- "light": "#FFB00020",
- "dark": "#FFCF6679"
- },
- "alternateKeys": [],
- "obsoleteKeys": [
- "MaterialDesignValidationErrorBrush"
- ]
- },
{
"name": "MaterialDesign.Brush.Badged.DarkBackground",
"themeValues": {
@@ -715,5 +704,44 @@
"obsoleteKeys": [
"MaterialDesignSelection"
]
+ },
+ {
+ "name": "MaterialDesign.Brush.Error",
+ "themeValues": {
+ "light": "#F44336",
+ "dark": "#FF3F5F"
+ },
+ "alternateKeys": [],
+ "obsoleteKeys": [
+ "MaterialDesign.Brush.ValidationError",
+ "MaterialDesignValidationErrorBrush"
+ ]
+ },
+ {
+ "name": "MaterialDesign.Brush.Warning",
+ "themeValues": {
+ "light": "#FF9800",
+ "dark": "#FFB545"
+ },
+ "alternateKeys": [],
+ "obsoleteKeys": []
+ },
+ {
+ "name": "MaterialDesign.Brush.Success",
+ "themeValues": {
+ "light": "#00C853",
+ "dark": "#3DCB6C"
+ },
+ "alternateKeys": [],
+ "obsoleteKeys": []
+ },
+ {
+ "name": "MaterialDesign.Brush.Info",
+ "themeValues": {
+ "light": "#2196F3",
+ "dark": "#4A86FF"
+ },
+ "alternateKeys": [],
+ "obsoleteKeys": []
}
]
diff --git a/tests/MaterialDesignThemes.UITests/WPF/Theme/ThemeTests.g.cs b/tests/MaterialDesignThemes.UITests/WPF/Theme/ThemeTests.g.cs
index cc047b0b40..195ca3d3cc 100644
--- a/tests/MaterialDesignThemes.UITests/WPF/Theme/ThemeTests.g.cs
+++ b/tests/MaterialDesignThemes.UITests/WPF/Theme/ThemeTests.g.cs
@@ -22,9 +22,12 @@ private partial string GetXamlWrapPanel()
+
-
+
+
+
@@ -111,11 +114,12 @@ private partial string GetXamlWrapPanel()
+
+
-
@@ -193,6 +197,11 @@ private partial async Task AssertAllThemeBrushesSet(IVisualElement pa
Color? textBlockBackground = await textBlock.GetBackgroundColor();
await Assert.That(textBlockBackground).IsEqualTo(await GetResourceColor("MaterialDesign.Brush.Background"));
}
+ {
+ IVisualElement textBlock = await panel.GetElement("[Text=\"Error\"]");
+ Color? textBlockBackground = await textBlock.GetBackgroundColor();
+ await Assert.That(textBlockBackground).IsEqualTo(await GetResourceColor("MaterialDesign.Brush.Error"));
+ }
{
IVisualElement textBlock = await panel.GetElement("[Text=\"Foreground\"]");
Color? textBlockBackground = await textBlock.GetBackgroundColor();
@@ -204,9 +213,19 @@ private partial async Task AssertAllThemeBrushesSet(IVisualElement pa
await Assert.That(textBlockBackground).IsEqualTo(await GetResourceColor("MaterialDesign.Brush.ForegroundLight"));
}
{
- IVisualElement textBlock = await panel.GetElement("[Text=\"ValidationError\"]");
+ IVisualElement textBlock = await panel.GetElement("[Text=\"Info\"]");
Color? textBlockBackground = await textBlock.GetBackgroundColor();
- await Assert.That(textBlockBackground).IsEqualTo(await GetResourceColor("MaterialDesign.Brush.ValidationError"));
+ await Assert.That(textBlockBackground).IsEqualTo(await GetResourceColor("MaterialDesign.Brush.Info"));
+ }
+ {
+ IVisualElement textBlock = await panel.GetElement("[Text=\"Success\"]");
+ Color? textBlockBackground = await textBlock.GetBackgroundColor();
+ await Assert.That(textBlockBackground).IsEqualTo(await GetResourceColor("MaterialDesign.Brush.Success"));
+ }
+ {
+ IVisualElement textBlock = await panel.GetElement("[Text=\"Warning\"]");
+ Color? textBlockBackground = await textBlock.GetBackgroundColor();
+ await Assert.That(textBlockBackground).IsEqualTo(await GetResourceColor("MaterialDesign.Brush.Warning"));
}
{
IVisualElement textBlock = await panel.GetElement("[Text=\"Badged.DarkBackground\"]");
@@ -638,6 +657,16 @@ private partial async Task AssertAllThemeBrushesSet(IVisualElement pa
Color? textBlockBackground = await textBlock.GetBackgroundColor();
await Assert.That(textBlockBackground).IsEqualTo(await GetResourceColor("MaterialDesignPaper"));
}
+ {
+ IVisualElement textBlock = await panel.GetElement("[Text=\"MaterialDesign.Brush.ValidationError\"]");
+ Color? textBlockBackground = await textBlock.GetBackgroundColor();
+ await Assert.That(textBlockBackground).IsEqualTo(await GetResourceColor("MaterialDesign.Brush.ValidationError"));
+ }
+ {
+ IVisualElement textBlock = await panel.GetElement("[Text=\"MaterialDesignValidationErrorBrush\"]");
+ Color? textBlockBackground = await textBlock.GetBackgroundColor();
+ await Assert.That(textBlockBackground).IsEqualTo(await GetResourceColor("MaterialDesignValidationErrorBrush"));
+ }
{
IVisualElement textBlock = await panel.GetElement("[Text=\"MaterialDesignBody\"]");
Color? textBlockBackground = await textBlock.GetBackgroundColor();
@@ -658,11 +687,6 @@ private partial async Task AssertAllThemeBrushesSet(IVisualElement pa
Color? textBlockBackground = await textBlock.GetBackgroundColor();
await Assert.That(textBlockBackground).IsEqualTo(await GetResourceColor("MaterialDesignTextBoxBorder"));
}
- {
- IVisualElement textBlock = await panel.GetElement("[Text=\"MaterialDesignValidationErrorBrush\"]");
- Color? textBlockBackground = await textBlock.GetBackgroundColor();
- await Assert.That(textBlockBackground).IsEqualTo(await GetResourceColor("MaterialDesignValidationErrorBrush"));
- }
{
IVisualElement textBlock = await panel.GetElement("[Text=\"MaterialDesignFlatButtonClick\"]");
Color? textBlockBackground = await textBlock.GetBackgroundColor();
@@ -942,9 +966,12 @@ private partial async Task AssertAllThemeBrushesSet(IVisualElement pa
private static IEnumerable GetBrushResourceNames()
{
yield return "MaterialDesign.Brush.Background";
+ yield return "MaterialDesign.Brush.Error";
yield return "MaterialDesign.Brush.Foreground";
yield return "MaterialDesign.Brush.ForegroundLight";
- yield return "MaterialDesign.Brush.ValidationError";
+ yield return "MaterialDesign.Brush.Info";
+ yield return "MaterialDesign.Brush.Success";
+ yield return "MaterialDesign.Brush.Warning";
yield return "MaterialDesign.Brush.Badged.DarkBackground";
yield return "MaterialDesign.Brush.Badged.DarkForeground";
yield return "MaterialDesign.Brush.Badged.LightBackground";
@@ -1034,11 +1061,12 @@ private static IEnumerable GetBrushResourceNames()
private static IEnumerable GetObsoleteBrushResourceNames()
{
yield return "MaterialDesignPaper";
+ yield return "MaterialDesign.Brush.ValidationError";
+ yield return "MaterialDesignValidationErrorBrush";
yield return "MaterialDesignBody";
yield return "MaterialDesignBodyLight";
yield return "MaterialDesignCheckBoxOff";
yield return "MaterialDesignTextBoxBorder";
- yield return "MaterialDesignValidationErrorBrush";
yield return "MaterialDesignFlatButtonClick";
yield return "MaterialDesignFlatButtonRipple";
yield return "MaterialDesignSnackbarRipple";