Exemple #1
0
        public static ScaleAnimation ScaleTo(FrameworkElement cell, double targetX, double targetY, double duration, Action <FrameworkElement> completed = null)
        {
            ScaleAnimation animation = null;

            if (AnimationPool.Count == 0)
            {
                animation = new ScaleAnimation();
            }
            else
            {
                animation = AnimationPool.Pop();
            }

            animation.InstanceScaleTo(cell, targetX, targetY, duration, completed);
            return(animation);
        }
Exemple #2
0
        public static ScaleAnimation ScaleFromTo(FrameworkElement cell,
                                                 double from_x, double from_y,
                                                 double to_x, double to_y,
                                                 double duration, Action <FrameworkElement> completed = null)
        {
            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);
        }