Example #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            TimeAnimator animator = new TimeAnimator();

            label1.BackColor = Color.Blue;
            var size     = new SizeHandler(new Size(10, 400), new Size(300, 250), x => label1.Size = x);
            var color    = new ColorHandler(Color.Brown, Color.Blue, x => label1.BackColor = x);
            var location = new PositionHandler(new Point(0, 200), new Point(1200, 200), x => label1.Location = x);

            animator.Animate(1000, 100, new AnimateHandlerGroup(new IAnimateHandler[] { color, location, size }), null, AnimateFunctionType.CubicEaseInOut);
        }