Beispiel #1
0
        /// <summary>
        /// Saturates the FrameworkElement.
        /// </summary>
        /// <param name="associatedObject">The associated object.</param>
        /// <param name="value">The value, between 0 and 1. 0 is desaturated, 1 is saturated.</param>
        /// <param name="duration">The duration in milliseconds.</param>
        /// <param name="delay">The delay in milliseconds.</param>
        /// <returns>An animation set with saturation effects incorporated.</returns>
        public static AnimationSet Saturation(
            this FrameworkElement associatedObject,
            double value    = 0d,
            double duration = 500d,
            double delay    = 0d)
        {
            if (associatedObject == null)
            {
                return(null);
            }

            var animationSet = new AnimationSet(associatedObject);

            return(animationSet.Saturation(value, duration, delay));
        }
Beispiel #2
0
        /// <summary>
        /// Saturates the FrameworkElement.
        /// </summary>
        /// <param name="associatedObject">The associated object.</param>
        /// <param name="value">The value, between 0 and 1. 0 is desaturated, 1 is saturated.</param>
        /// <param name="duration">The duration in milliseconds.</param>
        /// <param name="delay">The delay in milliseconds.</param>
        /// <param name="easingType">The <see cref="EasingType"/></param>
        /// <param name="easingMode">The <see cref="EasingMode"/></param>
        /// <returns>An animation set with saturation effects incorporated.</returns>
        public static AnimationSet Saturation(
            this FrameworkElement associatedObject,
            double value          = 0d,
            double duration       = 500d,
            double delay          = 0d,
            EasingType easingType = EasingType.Default,
            EasingMode easingMode = EasingMode.EaseOut)
        {
            if (associatedObject == null)
            {
                return(null);
            }

            var animationSet = new AnimationSet(associatedObject);

            return(animationSet.Saturation(value, duration, delay, easingType, easingMode));
        }