All projects

Spatial navigation control

PanAndZoom

A precise, reusable viewport for diagrams, maps, editors, and infinite canvases.

StatusActive
TierMaintained
DomainControls
Repositorywieslawsoltes/PanAndZoom

A focused Avalonia control for smooth zoom-to-point, panning, built-in or custom content bounds, resize policies, keyboard and multi-touch navigation, history, rotation, state, and animation.

PanAndZoom concentrates the geometry and input details of an infinite-canvas viewport into one control. Pointer-centered zoom, five content-bounds policies, custom validation hooks, resize behavior, history, keyboard and touch input, rotation, snapping, state serialization, and animation remain independent from the content inside.

01

Pointer-centered zoom

02

Built-in and overridable content bounds

03

Resize policies, animation, history, and saved views

04

Keyboard, wheel, multi-touch, rotation, grid, and accessibility

Where it fits.

  • Diagram and node editor authors
  • Map, image, and document viewers
  • Any Avalonia app with a large spatial surface
Avalonia

Supported

Pointer / wheel

Supported

Animated zoom

Supported

Touch gestures

Platform dependent

Real output,
not a mockup.

PanAndZoom sample application
The sample exposes zoom, pan, constraints, and viewport behavior.

Clear layers.
Replaceable seams.

01

Model

Application state stays in portable domain objects and view models.

02

Control

Avalonia controls expose focused properties, commands, and events.

03

Theme

Templates and styles make the surface adaptable to each application.

Zoom-to-pointcursor-stable navigation
5 modescontent bounds policies
Animationsprogrammable transitions
LiveGitHub metadata

From package
to first frame.

Choose the package workflow used by your repository, then start from the smallest working example. Replace VERSION with the current stable or prerelease version shown on NuGet.

01 · Install
Terminal
dotnet add package PanAndZoom --prerelease
02 · Use · xml
MainWindow.axaml
<paz:ZoomBorder ZoomSpeed="1.2"
MinZoom="0.1" MaxZoom="10">
<Canvas Width="2400" Height="1600" />
</paz:ZoomBorder>

Start focused.
Compose as needed.

The repository is the source of truth.

Use the current documentation and samples, inspect changes, report issues, or support continued open-source maintenance.

NodeEditor

Search everything.

Loading the index…

move open esc close

Preparing metadata and full-text search…