/// <summary>
        /// Animates a point light and it's distance.
        /// </summary>
        /// <param name="associatedObject">The associated object.</param>
        /// <param name="distance">The value.</param>
        /// <param name="duration">The duration.</param>
        /// <param name="delay">The delay.</param>
        /// <returns>An animation set.</returns>
        public static AnimationSet Light(
            this FrameworkElement associatedObject,
            double distance = 0d,
            double duration = 500d,
            double delay    = 0d)
        {
            if (associatedObject == null)
            {
                return(null);
            }

            var animationSet = new AnimationSet(associatedObject);

            return(animationSet.Light(distance, duration, delay));
        }
Esempio n. 2
0
        /// <summary>
        /// Animates a point light and it's distance.
        /// </summary>
        /// <param name="associatedObject">The associated object.</param>
        /// <param name="distance">The value.</param>
        /// <param name="duration">The duration.</param>
        /// <param name="delay">The delay.</param>
        /// <param name="color">The color of the spotlight.</param>
        /// <param name="easingType">The easing function</param>
        /// <returns>An animation set.</returns>
        public static AnimationSet Light(
            this FrameworkElement associatedObject,
            double distance       = 0d,
            double duration       = 500d,
            double delay          = 0d,
            Color?color           = null,
            EasingType easingType = EasingType.Default)
        {
            if (associatedObject == null)
            {
                return(null);
            }

            var animationSet = new AnimationSet(associatedObject);

            return(animationSet.Light(distance, duration, delay, color, easingType));
        }