Avalonia.Markup.Declarative 12.1.1

Prefix Reserved
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Avalonia.Markup.Declarative --version 12.1.1
                    
NuGet\Install-Package Avalonia.Markup.Declarative -Version 12.1.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Avalonia.Markup.Declarative" Version="12.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Avalonia.Markup.Declarative" Version="12.1.1" />
                    
Directory.Packages.props
<PackageReference Include="Avalonia.Markup.Declarative" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Avalonia.Markup.Declarative --version 12.1.1
                    
#r "nuget: Avalonia.Markup.Declarative, 12.1.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Avalonia.Markup.Declarative@12.1.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Avalonia.Markup.Declarative&version=12.1.1
                    
Install as a Cake Addin
#tool nuget:?package=Avalonia.Markup.Declarative&version=12.1.1
                    
Install as a Cake Tool

Avalonia.Markup.Declarative

Write Avalonia UI with pure C#

repo: https://github.com/AvaloniaCommunity/Avalonia.Markup.Declarative

to use with external libraries, install AvaloniaExtensionGenerator tool here:

https://www.nuget.org/packages/AvaloniaExtensionGenerator/

Quick Start sample:

https://github.com/AvaloniaCommunity/Avalonia.Markup.Declarative/tree/master/src/Samples/DeclarativeComponentTemplate

Compiled-binding setters support automatic conversion for common primitive and nullable mismatches, so prefer plain member access like x => x.Property and skip numeric casts; for example, int -> double and bool -> bool? bindings work without a manual converter or a cast. A value-converting cast such as x => (double)x.Counter is rejected by Avalonia's expression parser, but type casts that reach a member of a derived type — e.g. x => ((DerivedType)x).Property — are supported. Lossy numeric TwoWay convert-back truncates toward zero.

AI agent tooling: the dev-only Declarative.Avalonia.AgentTools package runs an in-process MCP server (loopback, debug builds) that gives an agent screenshots (with before/after diffing), the visual tree with bounds, per-control layout reports, an automated layout audit, property/property-source/view-model inspection, pixel↔control hit-testing, a highlight overlay that frames where a control actually landed, and build/binding/runtime errors of the running app — plus an opt-in tier to drive it (click, type, resize, theme, and set view-model state / run commands directly). The app can also show a live "agent connected" status. See docs/agent-tools.md.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on Avalonia.Markup.Declarative:

Package Downloads
Mattias1.AvaloniaExtensions

Some extensions to quickly build Avalonia UI desktop applications without needing XAML.

Declarative.Avalonia.AgentTools

In-process MCP (Model Context Protocol) inspector for AI agents building UI with Avalonia.Markup.Declarative. In a debug build it exposes the running app to an agent over loopback: visual-tree dumps with bounds, window/control screenshots, the active component list, and build/binding errors. Debug/dev only — do not ship in Release.

SolidAvalonia

Package Description

Tarui.Shell

Package Description

GitHub repositories (2)

Showing the top 2 popular GitHub repositories that depend on Avalonia.Markup.Declarative:

Repository Stars
SubtitleEdit/subtitleedit
the subtitle editor :)
niksedk/subtitleedit-avalonia
Version Downloads Last Updated
12.1.2-fix-agent.1 111 8/3/2026
12.1.1 3,538 8/2/2026
12.1.0 1,878 7/18/2026
12.0.6-preview2 149 7/8/2026
12.0.6-preview1 129 7/7/2026
12.0.5 2,402 7/3/2026
12.0.5-preview1 139 6/20/2026
12.0.4 1,492 6/19/2026
12.0.1 4,219 4/17/2026
12.0.1-preview7 114 4/16/2026
12.0.1-preview6 116 4/16/2026
12.0.1-preview5 112 4/16/2026
12.0.1-preview4 111 4/15/2026
12.0.1-preview3 111 4/14/2026
12.0.1-preview2 112 4/14/2026
12.0.1-preview1 298 4/11/2026
12.0.0 169 4/11/2026
11.3.7-beta05 1,106 10/29/2025
11.3.7-beta04 237 10/26/2025
11.3.7-beta03 239 10/24/2025
Loading failed