We have a color animation that blends from red to white. Currently, this is a linear fade. We know we can play with the Storyboard class’s BeginTime and such, but that simply delays the start of the entire animation. We’ve also looked at the ease-in/ease-out side of things, but they don’t seem to work either.
Specifically, we’d like to hold a value of red for one second, then fade from red to white over the next. Can that be done in pure XAML? If not, can it be done in code-behind manually setting up a storyboard? …or do we have to use two separate storyboards and play them in sequence?
Several ways to do this.
with key frames:
with two animations in sequence:
with a custom easing function:
In this case a function that shows the transition in the first half of duration and holds the value in the second half. Because the default EasingMode is EaseOut this function will then ‘play’ backwards.