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

            animation.InstanceScaleTo(cell, targetX, targetY, duration, completed);
            return(animation);
        }
Example #2
0
        private ScaleAnimation createAnimation(float x0, float x1, float y0, float y1, long duration, long startOffset)
        {
            ScaleAnimation scaleAnimation = new ScaleAnimation(x0, x1, y0, y1);

            scaleAnimation.Duration    = duration;
            scaleAnimation.StartOffset = startOffset;
            scaleAnimation.FillAfter   = true;
            return(scaleAnimation);
        }
Example #3
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 = CreateNewAnimation(cell);

            animation.InstanceScaleFromTo(cell, from_x, from_y, to_x, to_y, duration, completed);
            return(animation);
        }