views:

30

answers:

1

Hello,

I have a storyboard with e.g. 2 animations. Now I want the user give the possibility to skip a complete storyboard, yet the animated properties shall be set to the final value of the animations. When the storyboard is already running, SkipToFill does a perfect job for this. But I also need something like SkipToFill for a storyboard, that's not yet running. Whats the equivalent for this or the best way to realize that? Thank you very much!

+1  A: 

Well, I find out myself, it's actually quite simple:

        storyboard.Begin(canvas1, true);
        storyboard.SkipToFill(canvas1);

This means: No matter if the storyboard has already started, just start it (again) and than skip to the end. Effectively you won't notice that the animation is started again (I'm not sure if you can even notice it, meaning a second call to Storyboard.Begin resets it or just continues?). Dont forget true for the second parameter of the Begin method.

stefan.at.wpf