You have not set the From
property on your ColorAnimation
. So when you press the button in the middle of its animation, the Storyboard takes the current Foreground
color value as its From
, and this is the color that the animation reverses back to.
Now when you repeatedly press the button, the From
color moves closer and closer to red, giving the impression that the color is stuck on red.
Update:
This answer only points out the problem. Refer to Viv's answer for an elegant solution