【发布时间】:2012-06-07 09:02:16
【问题描述】:
我在网格中有多个(动态创建的)控件(标签、按钮)和一个情节提要! 我可以将故事板分配给一个控件,但我想在每个控件中应用故事板的动画...我该怎么做?
我的代码:
Storyboard myStoryboard1 = new Storyboard();
Label label1 = new Label();
Label label2 = new Label();
Label label3 = new Label();
...
Storyboard.SetTarget(myAnimation2, Label1);
Storyboard.SetTarget(myAnimation2, Label2);
Storyboard.SetTarget(myAnimation2, Label3);
此代码将动画设置为仅Label3...
谢谢!
【问题讨论】:
-
对不起,我错过了... myAnimation2 是一个 DoubleAnimationUsingKeyFrames,我将动画添加到情节提要...
标签: wpf animation storyboard