/// <summary>
        /// Select the appropriate animation via switch
        /// </summary>
        /// <param name="function">function to swich on</param>
        /// <param name="mode">easing mode to use</param>
        /// <param name="from">Starting Point</param>
        /// <param name="to">End point</param>
        /// <param name="durationMS">duration of animation</param>
        /// <returns></returns>
        private static AnimationTimeline GetPointEasingAnimation(PointEasingFunction function, PointEasingMode mode, Point from, Point to, int durationMS)
        {
            AnimationTimeline returnTimeline = null;

            switch (function)
            {
            case PointEasingFunction.Quad:
                returnTimeline = new QuadPointEasingAnimation(from, to, mode, new Duration(new TimeSpan(0, 0, 0, 0, durationMS)));
                break;

            case PointEasingFunction.Expo:
                returnTimeline = new ExpoPointEasingAnimation(from, to, mode, new Duration(new TimeSpan(0, 0, 0, 0, durationMS)));
                break;

            default:
                break;
            }

            return(returnTimeline);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Select the appropriate animation via switch
        /// </summary>
        /// <param name="function">function to swich on</param>
        /// <param name="mode">easing mode to use</param>
        /// <param name="from">Starting Point</param>
        /// <param name="to">End point</param>
        /// <param name="durationMS">duration of animation</param>
        /// <returns></returns>
        private static AnimationTimeline GetPointEasingAnimation(PointEasingFunction function, PointEasingMode mode, Point from, Point to, int durationMS)
        {
            AnimationTimeline returnTimeline = null;
            switch (function)
            {
                case PointEasingFunction.Quad:
                    returnTimeline = new QuadPointEasingAnimation(from, to, mode, new Duration(new TimeSpan(0, 0, 0, 0, durationMS)));
                    break;
                case PointEasingFunction.Expo:
                    returnTimeline = new ExpoPointEasingAnimation(from, to, mode, new Duration(new TimeSpan(0, 0, 0, 0, durationMS)));
                    break;
                default:
                    break;
            }

            return returnTimeline;
        }