0
我的目標是在for循環中爲動態創建的圖像提供反彈效果。如何在winRT中動態創建圖像添加反彈效果?
我的目標是在for循環中爲動態創建的圖像提供反彈效果。如何在winRT中動態創建圖像添加反彈效果?
var sb = new Storyboard();
Storyboard.SetTarget(sb, imageTranslateTransform);
sb.RepeatBehavior = RepeatBehavior.Forever;
sb.AutoReverse = true;
var da = new DoubleAnimation();
Storyboard.SetTargetProperty(da, "Y");
da.From = 0;
da.To = 100;
da.Duration = TimeSpan.FromSeconds(1d);
da.EasingFunction = new QuadraticEase {EasingMode = EasingMode.EaseOut};
sb.Children.Add(da);
sb.Begin();