Skip to content

Commit eeeee7c

Browse files
committed
Fixed animation not showing
1 parent e9c5d4e commit eeeee7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

MaterialDesignThemes.Wpf/PaletteHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ private static bool ReplaceEntry(object entryName, object newValue, ResourceDict
140140
To = (Color)newValue, //The new color
141141
Duration = new Duration(new TimeSpan(0,0,0,0,DURATION_MS))
142142
};
143-
parentDictionary[entryName] = new SolidColorBrush();
143+
parentDictionary[entryName] = parentDictionary[entryName] == null ? new SolidColorBrush() : parentDictionary[entryName];
144144
(parentDictionary[entryName] as SolidColorBrush).BeginAnimation(SolidColorBrush.ColorProperty, animation); //Begin the animation
145145
}
146146
else

0 commit comments

Comments
 (0)