Example #1
0
        /// <summary>
        /// Creates a new composite animation.
        /// </summary>
        /// <param name="animation">The previous animation.</param>
        /// <param name="callback">The callback in which the animations can be attached.</param>
        /// <returns>The composite animation.</returns>
        public static IAnimation Composite(this IAnimation animation, Action <IAnimation> callback)
        {
            var composite = new Animations.Composite();

            callback(composite);
            composite.Lock();

            return(Attach(animation, composite));
        }
Example #2
0
        /// <summary>
        /// Creates a new composite animation.
        /// </summary>
        /// <param name="animation">The previous animation.</param>
        /// <param name="callback">The callback in which the animations can be attached.</param>
        /// <returns>The composite animation.</returns>
        public static IAnimation Composite(this IAnimation animation, Action<IAnimation> callback)
        {
            var composite = new Animations.Composite();

            callback(composite);
            composite.Lock();

            return Attach(animation, composite);
        }