| title |
|---|
Overview |
This repository exposes two packages with different responsibilities:
| Package | Use it when you need |
|---|---|
PanAndZoom |
An interactive viewport control with zoom, pan, history, bounds, resize, rotation, and state persistence support |
HeadlessTestingFramework |
Automated Avalonia UI tests with touch, wheel, keyboard, tree inspection, screenshots, recordings, and Appium-like interaction APIs |
- Start with Quickstart: ZoomBorder if you are building an interactive canvas, editor, or viewer.
- Start with Quickstart: Headless Testing if you already have Avalonia controls and need deterministic test coverage.
- Use both when you want to ship zoom-heavy interaction and verify it with headless gesture tests in CI.
Avalonia.Controls.PanAndZoom.ZoomBorder wraps a single child and manages a transform matrix over that content. Common capabilities include:
- mouse-wheel zoom and pointer-based pan
- pinch and scroll gestures
- bounds policies such as
KeepContentVisibleandFillViewport - view history, saved views, and import/export of serialized state
- keyboard navigation and
ICommandbindings for MVVM surfaces
The testing package provides several layers:
- low-level input simulators:
Avalonia.HeadlessTestingFramework.TouchInputSimulator,Avalonia.HeadlessTestingFramework.KeyboardInputSimulator,Avalonia.HeadlessTestingFramework.MouseInputSimulator - high-level gesture and helper APIs:
Avalonia.HeadlessTestingFramework.GestureSimulator,Avalonia.HeadlessTestingFramework.MultiTouchTestHelperFactory - inspection and assertion helpers:
Avalonia.HeadlessTestingFramework.ControlFinder,Avalonia.HeadlessTestingFramework.TreeXPath,Avalonia.HeadlessTestingFramework.TreeValidator - automation and recording layers:
Avalonia.HeadlessTestingFramework.Appium.AvaloniaDriver,Avalonia.HeadlessTestingFramework.Recording.HeadlessScreenRecorder