Minimal custom frame loop

AnimationControl

Build a custom Avalonia animation without rebuilding its lifecycle loop.

Explore source
Parent systemLottie
StatusMaintained
Modules1
RepositoryLottie/AnimationControl

A lightweight base control owns attachment, frame scheduling, delta time, invalidation, and rendering so custom animation logic only overrides the meaningful hooks.

  1. 01

    Automatic frame loop

  2. 02

    Delta-time update hook

  3. 03

    Automatic visual invalidation

  4. 04

    Small subclassing surface

From intent
to working system.

01

Attach

The base observes visual-tree lifetime.

02

Tick

Frame callbacks receive current and previous time.

03

Update

The subclass advances only its domain state.

04

Draw

Normal Avalonia rendering presents each invalidated frame.

Adopt this
capability.

Start with the primary module, then add the related packages only when the application needs those layers. Replace VERSION with the current NuGet version.

01 · Install
Terminal
dotnet add package AnimationControl
02 · Use · csharp
QuickStart.cs
public sealed class PulseControl : AnimationControl
{
protected override void OnAnimationFrame(TimeSpan now, TimeSpan last)
=> Progress = (Progress + (now - last).TotalSeconds) % 1;
public override void Render(DrawingContext context)
=> DrawPulse(context, Progress);
}

Use one layer.
Compose the rest.

Read the module beside the complete system.

The implementation, samples, issues, and release notes stay in the parent repository so module details remain connected to the product architecture.

Lottie

Search everything.

Loading the index…

move open esc close

Preparing metadata and full-text search…