Example #1
0
        public static ScaleAnimation ScaleFromTo(FrameworkElement cell,
                double from_x, double from_y,
                double to_x, double to_y,
                TimeSpan duration, Action<FrameworkElement> completed)
        {
            ScaleAnimation animation = null;
            if (AnimationPool.Count == 0)
            {
                animation = new ScaleAnimation();
            }
            else
            {
                animation = AnimationPool.Pop();
            }

            animation.InstanceScaleFromTo(cell, from_x, from_y, to_x, to_y, duration, completed);
            return animation;
        }
Example #2
0
        public static ScaleAnimation ScaleTo(FrameworkElement cell, double targetX, double targetY, TimeSpan duration, Action<FrameworkElement> completed)
        {
            ScaleAnimation animation = null;
            if (AnimationPool.Count == 0)
            {
                animation = new ScaleAnimation();
            }
            else
            {
                animation = AnimationPool.Pop();
            }

            animation.InstanceScaleTo(cell, targetX, targetY, duration, completed);
            return animation;
        }