/// <summary> /// Core update routine. /// </summary> /// <param name="context">The context that holds information about the animation.</param> protected override void UpdateAnimationOverride(AnimationContext context) { double duration = this.Duration.TimeSpan.TotalSeconds; double startWidth = GetWidth(context.Target, this.StartWidth); double endWidth = GetWidth(context.Target, this.EndWidth); context.EnsureDefaultTransforms(); context.Width(0, startWidth, duration, endWidth); if (this.Height.HasValue) { (context.Target as FrameworkElement).Height = this.Height.Value; } base.UpdateAnimationOverride(context); }