views:

25

answers:

1

I set up a nice ColorAnimation. When applying AutoReverse = true to it, it even goes from one color to another.

Now I want it to change the color it animates to randomly after every completed runthrough. How can I achieve this?

btw. I'm attaching my Animation to a storyboard:

storyboard.RepeatBehavior = RepeatBehavior.Forever;
storyboard.Children.Add(SpotLightAnimation);
storyboard.Begin(this);
+1  A: 

Do not use the forever and just when the animation finish run it again with other colors

Chen Kinnrot
Easy but true.I assigned a function to the Complete-Event of my SpotLightAnimation which changes the to-value and then starts the animation again.
Hedge
The animation is changed so its not the same any more, meaning forever does not good for this case cause it is not the same animation you are running.
Chen Kinnrot