/// <summary> /// Core update routine. /// </summary> /// <param name="context">The context that holds information about the animation.</param> protected override void UpdateAnimationOverride(AnimationContext context) { context.EnsureDefaultTransforms(); ScaleTransform transform = context.Target.GetScaleTransform(); double fromY = this.StartScaleY.HasValue ? this.StartScaleY.Value : transform.ScaleY; double toY = this.EndScaleY.HasValue ? this.EndScaleY.Value : transform.ScaleY; double duration = this.Duration.TimeSpan.TotalSeconds; context.ScaleY(0, fromY, duration, toY); base.UpdateAnimationOverride(context); }