/// <inheritdoc/>
        internal override void UpdateAndApply(AnimationManager animationManager)
        {
            var property = Property;

            if (property != null)
            {
                animationManager.UpdateAndApplyAnimation(Property);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Stops all animations that affect the animation tree (such as animations that control the
        /// speed ratios or animation weights).
        /// </summary>
        /// <param name="animationManager">The <see cref="AnimationManager"/>.</param>
        internal void StopSecondaryAnimations(AnimationManager animationManager)
        {
            if (((IAnimatableProperty <float>)_speedProperty).IsAnimated)
            {
                animationManager.StopAnimation(_speedProperty);
                animationManager.UpdateAndApplyAnimation(_speedProperty);
            }

            if (((IAnimatableProperty <float>)_weightProperty).IsAnimated)
            {
                animationManager.StopAnimation(_weightProperty);
                animationManager.UpdateAndApplyAnimation(_weightProperty);
            }

            foreach (var child in Children)
            {
                child.StopSecondaryAnimations(animationManager);
            }
        }