You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(parentDictionary[entryName]asSolidColorBrush).BeginAnimation(SolidColorBrush.ColorProperty,animation);//Begin the animation
139
+
ColorAnimationanimation=newColorAnimation()
140
+
{
141
+
From=(Color)parentDictionary[entryName],//The old color
142
+
To=(Color)newValue,//The new color
143
+
Duration=newDuration(newTimeSpan(0,0,0,0,DURATION_MS))//Set the duration
144
+
};
145
+
parentDictionary[entryName]=parentDictionary[entryName]==null?newSolidColorBrush():parentDictionary[entryName];//Set the resource as a new SolidColorBrush if null.
146
+
(parentDictionary[entryName]asSolidColorBrush).BeginAnimation(SolidColorBrush.ColorProperty,animation);//Begin the animation
147
+
}
148
+
catch
149
+
{
150
+
System.Diagnostics.Debug.WriteLine(@"The argument :"+nameof(newValue)+" is not a brush. It is recommended to call the method like this ReplaceEntry(""SomeColor"",somethingnotabrush,null,false) to improve performance.Settingvalue without animation");
151
+
gotosetval;//Set the value normally if type is incorrect
152
+
}
145
153
}
146
154
else
147
-
parentDictionary[entryName]=newValue;
155
+
setval:parentDictionary[entryName]=newValue;//Set value normally
0 commit comments