1
請告訴我如何在iOS 8中執行windows phone 8中的動畫。如何在Windows Phone 8中執行動畫
我的意思是
[UIView animateWithDuration:0.2 animtaion:{} completion:{}];
類似的功能,是否有可能不設定目標和其他屬性與故事板和DoubleAnimation
(或像這樣)來實現這一點?
現在我在做這樣的:
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();
我希望你明白我需要什麼:) 謝謝;
在XAML中它會更短...您只是尋找更短/更好的符號?你多久使用一次,以什麼方式使用? –