All projects

Composable interaction

XAML Behaviors

Add interaction in XAML without turning views into code-behind.

StatusActive
TierFlagship
DomainAvalonia
Repositorywieslawsoltes/Xaml.Behaviors

Reusable actions, triggers, and behaviors for Avalonia, including strongly typed source-generated options for AOT-friendly apps.

XAML Behaviors turns routed events and observable state into reusable actions. The library ranges from small interaction primitives to drag-and-drop, viewport, responsive, and strongly typed generated behaviors.

01

Actions and triggers

02

Drag and drop behaviors

03

ReactiveUI integrations

04

AOT-friendly source generators

Where it fits.

  • Avalonia MVVM applications
  • Control authors packaging reusable interaction
  • AOT-conscious teams avoiding reflection-heavy wiring
Avalonia

Supported

MVVM

First-class

ReactiveUI

Integration

NativeAOT

Generated options

Real output,
not a mockup.

XAML Behaviors project logo
A broad library of composable interaction primitives for Avalonia.

Clear layers.
Replaceable seams.

01

XAML / C#

Applications compose reusable behavior through normal Avalonia APIs.

02

Integration

Focused packages connect to Avalonia properties, input, and rendering.

03

Platform

The implementation remains portable across Avalonia targets where supported.

Actionsdeclarative operations
Triggersevent and state activation
Generatorstyped AOT surfaces
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 Xaml.Behaviors
02 · Use · xml
MainWindow.axaml
<Button Content="Save">
<Interaction.Behaviors>
<EventTriggerBehavior EventName="Click">
<InvokeCommandAction Command="{Binding SaveCommand}" />
</EventTriggerBehavior>
</Interaction.Behaviors>
</Button>

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.

Svg.Skia

Search everything.

Loading the index…

move open esc close

Preparing metadata and full-text search…