开发者

Synchronizing storyboards in WPF/XAML

I have two storyboards in XAML (Blend), each with 10 identical keyframes. Based on a databinding, I want to be able to switch between the two storyboards. The Storyboards both target the same object -- a .png image. What i can't figure out is this:

How to sync the storyb开发者_如何学Gooards so that if Storyboard1 is on keyframe 5, and the data binding changes to 'switch' to Storyboard2, the current keyframe in Storyboard1 can be detected, and then Storyboard 2 can start on the next keyframe, in this case keyframe 6.

Can anyone tell me how to do this and display the XAML and/or C# code to achieve it?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜