Composable interaction
XAML Behaviors
Add interaction in XAML without turning views into code-behind.
Overview
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.
Actions and triggers
Drag and drop behaviors
ReactiveUI integrations
AOT-friendly source generators
Built for
Where it fits.
- Avalonia MVVM applications
- Control authors packaging reusable interaction
- AOT-conscious teams avoiding reflection-heavy wiring
Compatibility & status
Supported
First-class
Integration
Generated options
In the work
Real output,
not a mockup.

Architecture
Clear layers.
Replaceable seams.
XAML / C#
Applications compose reusable behavior through normal Avalonia APIs.
Integration
Focused packages connect to Avalonia properties, input, and rendering.
Platform
The implementation remains portable across Avalonia targets where supported.
Quick start
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.
dotnet add package Xaml.Behaviors<PackageReference Include="Xaml.Behaviors" Version="VERSION" /><PackageVersion Include="Xaml.Behaviors" Version="VERSION" /><Button Content="Save"> <Interaction.Behaviors> <EventTriggerBehavior EventName="Click"> <InvokeCommandAction Command="{Binding SaveCommand}" /> </EventTriggerBehavior> </Interaction.Behaviors></Button>Package surface
Start focused.
Compose as needed.
Source, docs, samples, and releases
The repository is the source of truth.
Use the current documentation and samples, inspect changes, report issues, or support continued open-source maintenance.