Skip to content

Commit 167ffb5

Browse files
committed
use SetField in the rest of the BundledThemes properties
1 parent cccb252 commit 167ffb5

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/MaterialDesignThemes.Wpf/BundledTheme.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ public PrimaryColor? PrimaryColor
2424
get => _primaryColor;
2525
set
2626
{
27-
if (_primaryColor != value)
27+
if (SetField(ref _primaryColor, value))
2828
{
29-
_primaryColor = value;
3029
SetTheme();
3130
}
3231
}
@@ -38,9 +37,8 @@ public SecondaryColor? SecondaryColor
3837
get => _secondaryColor;
3938
set
4039
{
41-
if (_secondaryColor != value)
40+
if (SetField(ref _secondaryColor, value))
4241
{
43-
_secondaryColor = value;
4442
SetTheme();
4543
}
4644
}
@@ -52,9 +50,8 @@ public ColorAdjustment? ColorAdjustment
5250
get => _colorAdjustment;
5351
set
5452
{
55-
if (_colorAdjustment != value)
53+
if (SetField(ref _colorAdjustment, value))
5654
{
57-
_colorAdjustment = value;
5855
SetTheme();
5956
}
6057
}

0 commit comments

Comments
 (0)