var a = new Animation { DurationInFrames = Animation.FromTimeSpanToDurationInFrames(3), EasingFunction = ef => Easing.EaseInOut(ef, EasingType.Quadratic) };
a.AnimateOnControlThread( form, ObservableHelper.FixedValue((float)0.8), ObservableHelper.FixedValue((float)1), v => f.Opacity = v.CurrentValue );
a.Start();
1 2 3 4 5 6
var cts = LinearAnimation.AnimateControl( button, ObservableHelper.FixedValue(new Point(0, 150)), // animate until at this position ObservableHelper.FixedValue(5), // speed to move at true); // keep in same relative position when the control's parent resizes // returns a CancellationTokenSource that you can use to cancel the animation
近期评论