Class EdgeFadeAnimation
Animates an edge's opacity for fade in/out effects.
public class EdgeFadeAnimation : IAnimation
- Inheritance
-
EdgeFadeAnimation
- Implements
- Inherited Members
Constructors
EdgeFadeAnimation(Edge, double, double, double, Func<double, double>?, Action<Edge, double>?, Action?)
Creates a new edge fade animation.
public EdgeFadeAnimation(Edge edge, double startOpacity, double endOpacity, double duration = 0.3, Func<double, double>? easing = null, Action<Edge, double>? onUpdate = null, Action? onComplete = null)
Parameters
edgeEdgeThe edge to animate.
startOpacitydoubleStarting opacity (0-1).
endOpacitydoubleEnding opacity (0-1).
durationdoubleAnimation duration in seconds.
easingFunc<double, double>Easing function (defaults to EaseOutCubic).
onUpdateAction<Edge, double>Callback called each frame with the edge and current opacity.
onCompleteActionCallback when animation completes.
Properties
CurrentOpacity
Gets the current opacity value.
public double CurrentOpacity { get; }
Property Value
IsComplete
Gets whether the animation has completed.
public bool IsComplete { get; }
Property Value
Methods
Cancel()
Called when the animation completes or is cancelled.
public void Cancel()
FadeIn(Edge, double, Action<Edge, double>?, Action?)
Creates a fade-in animation for an edge.
public static EdgeFadeAnimation FadeIn(Edge edge, double duration = 0.3, Action<Edge, double>? onUpdate = null, Action? onComplete = null)
Parameters
Returns
FadeOut(Edge, double, Action<Edge, double>?, Action?)
Creates a fade-out animation for an edge.
public static EdgeFadeAnimation FadeOut(Edge edge, double duration = 0.3, Action<Edge, double>? onUpdate = null, Action? onComplete = null)
Parameters
Returns
Update(double)
Updates the animation with the elapsed time since the last frame.
public void Update(double deltaTime)
Parameters
deltaTimedoubleTime elapsed since last update in seconds.