Reputation: 74330
Is there any simple way to run a WPF storyboard based animation normally and then to run it in reverse to return all things to their original state?
Preferably, I would like to do this programatically:
Storyboard sb=new Storyboard();
...
sb.Begin();
// Now how to do I run sb in reverse, to move things to where they were
// before the sb started?
For example, you might have an animation where an ellipse moves from left to right and you would like for it at the end to move back to the left, where it began:
Upvotes: 1
Views: 986
Reputation: 12864
Storyboard sb=new Storyboard();
sb.AutoReverse=true;
...
sb.Begin();
// Now how to do I run sb in reverse, to move things to where they were
// before the sb started?
Upvotes: 0