/// <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(); double startY = this.Initialize(context.Target as FrameworkElement, this.StartY); double endY = this.Initialize(context.Target as FrameworkElement, this.EndY); context.MoveY(this.GetMoveArguments(startY, endY)); base.UpdateAnimationOverride(context); }
/// <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 fromX = this.StartScaleX.HasValue ? this.StartScaleX.Value : transform.ScaleX; double toX = this.EndScaleX.HasValue ? this.EndScaleX.Value : transform.ScaleX; double duration = this.Duration.TimeSpan.TotalSeconds; context.ScaleX(0, fromX, duration, toX); base.UpdateAnimationOverride(context); }
/// <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 startHeight = GetHeight(context.Target, this.StartHeight); double endHeight = GetHeight(context.Target, this.EndHeight); context.EnsureDefaultTransforms(); if (this.Width.HasValue) { (context.Target as FrameworkElement).Width = this.Width.Value; } context.Height(0, startHeight, duration, endHeight); base.UpdateAnimationOverride(context); }
/// <summary> /// Core update routine. /// </summary> /// <param name="context">The context that holds information about the animation.</param> protected override void UpdateAnimationOverride(AnimationContext context) { if (context == null) { return; } context.EnsureDefaultTransforms(); FrameworkElement target = context.Target as FrameworkElement; double startX = this.Initialize(target, this.StartX); double endX = this.Initialize(target, this.EndX); context.MoveX(this.GetMoveArguments(startX, endX)); base.UpdateAnimationOverride(context); }
/// <summary> /// Core update routine. /// </summary> /// <param name="context">The context that holds information about the animation.</param> protected override void UpdateAnimationOverride(AnimationContext context) { if (context == null) { return; } 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); }
/// <summary> /// Core update routine. /// </summary> /// <param name="context">The context that holds information about the animation.</param> protected override void UpdateAnimationOverride(AnimationContext context) { if (context == null) { return; } context.EnsureDefaultTransforms(); ScaleTransform transform = context.Target.GetScaleTransform(); double fromX = StartScaleX ?? transform.ScaleX; double toX = EndScaleX ?? transform.ScaleX; double duration = this.Duration.TimeSpan.TotalSeconds; context.ScaleX(0, fromX, duration, toX); base.UpdateAnimationOverride(context); }
/// <summary> /// Core update routine. /// </summary> /// <param name="context">The context that holds information about the animation.</param> protected override void UpdateAnimationOverride(AnimationContext context) { if (context == null) { return; } 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); }