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, constraints, animations, and programmable viewport navigation.

PanAndZoom concentrates the geometry and input details of an infinite-canvas viewport into one control. Pointer-centered zoom, constraints, animation, and programmable navigation remain independent from the content inside.

01

Pointer-centered zoom

02

Pan and viewport constraints

03

Animated navigation

04

Double-click zoom modes

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
Constraintsbounded viewport
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…