链接2个不同的故事板 [英] Linking 2 different Storyboards

查看:68
本文介绍了链接2个不同的故事板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!

在我的应用程序中,我有两个在画布中移动的对象(控件 - 矩形)。

当用户按下按钮时对象将以其动画开始。当第一个对象到达屏幕上的特殊位置时,第二个矩形应以动画开始。

我现在所做的是当第一个物体开始运动时我开始计时器,它永久地询问第一个物体的位置,以便当第一个物体进入时,我可以开始第二个物体的运动。正确的地方。但显然这不是一个漂亮的解决方案。当第一个对象移动得非常快时,这变得越来越明显,因为动画开始闪烁。

我真正想做的是触发第二个对象(Storyboard.Begin)的故事板第一个动画/故事板到达一个特殊的关键帧。

我怎样才能做到这一点?请帮忙。

Hi everybody!

In my app I have 2 objects (controls - rectangles) which are moving around in a canvas.

When the user presses a button the first object will begin with its animation. The second rectangle shall start with his animation when the first object reaches a special position on the screen.

What I did now is that I started a timer when the first object begins with its movement which permanently asks where the first object is so that I can start the movement of the second one when the first is in the right place. But obviously this is not a pretty solution. This is getting obvious when the first object is moving very fast, because then the animation starts flickering.

What I really would like to do is triggering the storyboard of the second object (Storyboard.Begin) when the first animation/Storyboard reaches a special keyframe.

How can I achieve this? Please help.

推荐答案

我想你必须在代码隐藏中创建整个故事板:)
I think u'll have to create the whole story board in the codebehind :)


这篇关于链接2个不同的故事板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆