4
至脚本我在后台代码中定义的下面的动画:添加RotateTransform动画代码隐藏
DoubleAnimation dbAscending = new DoubleAnimation(0, 15, new Duration(TimeSpan.FromMilliseconds(300)));
(myImage.RenderTransform as RotateTransform).BeginAnimation(RotateTransform.AngleProperty, dbAscending);
这工作得很好,当它开始旋转myImage
15度。现在我只需要创建新的Storyboard
并添加动画,因为我需要使用它的Completed
事件。我有一个小问题,我注意到我可以将动画添加到Storyboard.Children
,但我没有设法定义我想要应用此动画的对象和属性...
在此先感谢您帮助,到现在为止我只在XAML创建故事板...