internal void RemovePreviousAnimation(RadElement element, AnimatedPropertySetting setting) { // Evtim: Added code to throw OnAnimationFinished when animation is changed with another one ElementValuesAnimator prevAnimator = setting != null?setting.GetExistingAnimator(element) : null; if (prevAnimator != null && prevAnimator.IsRunning) { setting.PropertySettingRemoving(element); setting.OnAnimationFinished(new AnimationStatusEventArgs(element, true, false)); } }
private void RemovePreviousAnimation(RadObject element) { AnimatedPropertySetting currentAnimation = element.GetCurrentAnimation(this.Property); if (currentAnimation == null) { return; } ElementValuesAnimator valuesAnimator = element.ValuesAnimators[(object)currentAnimation.GetHashCode()] as ElementValuesAnimator; if (valuesAnimator == null || !valuesAnimator.IsRunning) { return; } valuesAnimator.Stop(); currentAnimation.OnAnimationFinished(new AnimationStatusEventArgs(element, true, false)); }