A headless screen recorder for capturing frames from Avalonia applications during testing. Supports recording scrolling, input handling, animations, and other UI interactions.
public class HeadlessScreenRecorder : IDisposable
This recorder requires Avalonia.Headless to be configured with UseHeadlessDrawing = false and a real rendering backend (e.g., Skia) to capture actual rendered frames.
kind:method, kind:property, kind:ctor. Press Esc to clear.HeadlessScreenRecorder()Creates a new headless screen recorder.CaptureAttemptsDebug counter for capture attempts.CurrentSessionGets the current recording session.IsPausedGets whether the recorder is paused.IsRecordingGets whether a recording is currently in progress.LastCaptureFailureReasonDebug last capture failure reason.SuccessfulCapturesDebug counter for successful captures.UseRenderHookGets or sets whether to use render hook for automatic frame capture. When true, frames are captured automatically when the compositor renders. When false, frames are captured on timer intervals or manually.AddMarker(String, Object?)Adds a custom marker event to the recording.CaptureFrame()Captures a single frame manually.Dispose()Disposes the recorder.PauseRecording()Pauses the current recording.RecordActionAsync(Func<Task>, Int32)Captures frames during an action.RecordAnimationEvent(String, Object?)Records an animation event.RecordDurationAsync(TimeSpan, Int32)Records frames for a specific duration.RecordEvent(RecordingEventType, String, Object?)Records a generic event during the recording.RecordGestureEvent(String, Object?)Records a gesture event.RecordInputEvent(String, Object?)Records an input event.RecordScrollEvent(String, Vector)Records a scroll event.ResumeRecording()Resumes a paused recording.StartRecording(TopLevel, RecordingOptions?, String?)Starts recording the specified target.StopRecording()Stops the current recording and finalizes output.FrameCapturedEvent raised when a frame is captured.RecordingErrorEvent raised when an error occurs during recording.RecordingStartedEvent raised when recording starts.RecordingStoppedEvent raised when recording stops.