请告诉我如何在 Windows Phone 8 中像在 iOS 中一样制作动画。
我的意思是类似的功能
[UIView animateWithDuration:0.2 animtaion:{} completion:{}];
DoubleAnimation
是否可以在不设置目标和其他属性的情况下使用 Storyboard 和(或类似的东西)来实现这一点?
现在我这样做:
DoubleAnimation myDoubleAnimation = new DoubleAnimation();
myDoubleAnimation.From = 10;
myDoubleAnimation.To = 50;
myDoubleAnimation.Duration = new Duration(TimeSpan.FromMilliseconds(200));
// Configure the animation to target the button's Width property.
Storyboard.SetTarget(myDoubleAnimation, selectedItem);
Storyboard.SetTargetProperty(myDoubleAnimation, new PropertyPath(ListBoxItem.HeightProperty));
// Create a storyboard to contain the animation.
Storyboard myHeightAnimatedButtonStoryboard = new Storyboard();
myHeightAnimatedButtonStoryboard.Children.Add(myDoubleAnimation);
myHeightAnimatedButtonStoryboard.Begin();
我希望你明白我需要什么 :) 谢谢;