Beispiel #1
0
        public IContinuation <bool> SizeTo(double width, double height, uint length = 250, Func <double, double> easing = null)
        {
            if (easing == null)
            {
                easing = Easing.Linear;
            }

            Continuation <bool> result = new Continuation <bool> ();

            var wInterp = AnimationExtensions.Interpolate(Width, width);
            var hInterp = AnimationExtensions.Interpolate(Height, height);

            new Animation()
            .Insert(0, 1, new Animation(f => SetSize(wInterp(f), hInterp(f)), 0, 1, easing))
            .Commit(this, "SizeTo", 16, length, finished: (f, a) => {
                result.Invoke(a);
            });

            return(result);
        }