コード例 #1
0
        /// <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);
        }