开发者

How to seek a WPF Storyboard to a specific frame/time offset when not running

I wish to seek to a specific time or frame using the ClockController.SeekAlignedToLastTick - however this does not appear to do anything, unless the Storyboard is 开发者_开发技巧running. I dont want to have to 'start' the storyboard, because I only intend the Storyboard to set all dependencyproperty values, and have everything lay-out for that time position, so that I can take a snapshot and advance to the next frame (I could respond to clock events and capture the frame, but then I couldnt guarantee I would get my snapshots at the correct times that I want).

How can I simply advance a WPF storyboard to a specific position without 'running' it?

Thanks!


You'll have to at least begin the animation before you can seek into it. You can however begin then pause right away, and seek.

// sb is a Storyboard
sb.Begin();
sb.Pause();
sb.SeekAlignedToLastTick(sometimespan);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜