private Action OnAnimationCompleted(IterationParameters parameters, bool isLastLoop, DependencyObject target, PropertyPath propertyPath) { return(() => { if (isLastLoop) { AnimationHelpers.ApplyInstantAnimation(target, propertyPath, To.Value, parameters.IsVisualStateChange); } OnIterationCompleted(parameters); }); }
private void ApplyLastKeyFrame(object sender, EventArgs e) { DoubleKeyFrame lastKeyFrame = _keyFrames[_resolvedKeyFrames.GetNextKeyFrameIndex(_keyFrames.Count - 1)]; AnimationHelpers.ApplyInstantAnimation(_target, _targetProperty, lastKeyFrame.Value, _parameters.IsVisualStateChange); }