Class WindowAnimations
- Namespace
- SharpConsoleUI.Animation
- Assembly
- SharpConsoleUI.dll
Pre-built window animation helpers for common transitions.
public static class WindowAnimations
- Inheritance
-
WindowAnimations
- Inherited Members
Methods
FadeIn(Window, TimeSpan?, Color?, EasingFunction?, Action?)
Fades a window in by reducing a solid color overlay from full intensity to zero. The overlay is registered via PostBufferPaint BEFORE the first frame renders, so the window appears fully covered initially and gradually reveals.
public static IAnimation FadeIn(Window window, TimeSpan? duration = null, Color? fadeColor = null, EasingFunction? easing = null, Action? onComplete = null)
Parameters
windowWindowThe window to fade in.
durationTimeSpan?Fade duration. Defaults to AnimationDefaults.DefaultFadeDurationMs.
fadeColorColor?The overlay color. Defaults to Color.Black.
easingEasingFunctionEasing function. Defaults to EaseInOut.
onCompleteActionOptional callback invoked when the fade completes.
Returns
- IAnimation
The animation driving the fade.
FadeOut(Window, TimeSpan?, Color?, EasingFunction?, Action?)
Fades a window out by increasing a solid color overlay from zero to full intensity. Useful for graceful window dismissal - pair with an onComplete that closes the window.
public static IAnimation FadeOut(Window window, TimeSpan? duration = null, Color? fadeColor = null, EasingFunction? easing = null, Action? onComplete = null)
Parameters
windowWindowThe window to fade out.
durationTimeSpan?Fade duration. Defaults to AnimationDefaults.DefaultFadeDurationMs.
fadeColorColor?The overlay color. Defaults to Color.Black.
easingEasingFunctionEasing function. Defaults to EaseInOut.
onCompleteActionOptional callback invoked when the fade completes (e.g., close the window).
Returns
- IAnimation
The animation driving the fade.
SlideIn(Window, SlideDirection, TimeSpan?, EasingFunction?, Action?)
Slides a window in from offscreen to its current position.
public static IAnimation SlideIn(Window window, SlideDirection direction, TimeSpan? duration = null, EasingFunction? easing = null, Action? onComplete = null)
Parameters
windowWindowdirectionSlideDirectiondurationTimeSpan?easingEasingFunctiononCompleteAction
Returns
SlideOut(Window, SlideDirection, TimeSpan?, EasingFunction?, Action?)
Slides a window out of view in the specified direction.
public static IAnimation SlideOut(Window window, SlideDirection direction, TimeSpan? duration = null, EasingFunction? easing = null, Action? onComplete = null)
Parameters
windowWindowdirectionSlideDirectiondurationTimeSpan?easingEasingFunctiononCompleteAction