avalonia-xaml

Author and review Avalonia XAML markup with compiled bindings and code-behind patterns.

27|2|Updated Apr 23, 2026
One-click install
npx skills add https://github.com/linuxdevel/Avalonia-skills --skill avalonia-xaml
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: avalonia-xaml
Source: https://github.com/linuxdevel/Avalonia-skills/tree/main/skills/avalonia/avalonia-xaml
Command: npx skills add https://github.com/linuxdevel/Avalonia-skills --skill avalonia-xaml

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Avalonia XAML development is rich but can be tricky: developers need clear guidance on using axaml files, XML namespaces, compiled bindings, and integrating code-behind or code-only UI patterns.

Core Features & Use Cases

  • Compiled bindings in Avalonia 12 are enabled by default and require x:DataType on the root element or DataTemplate.
  • Correct usage of XML namespaces (default, x:, using:, clr-namespace:) ensures controls and view models resolve correctly.
  • Guidance covers both markup-based UI with axaml and code-only UI patterns, including resource dictionaries and common mistakes.

Quick Start

Create a simple AXAML file with the Avalonia root namespace, set x:Class, add x:DataType for compiled bindings, and create a matching axaml.cs code-behind with InitializeComponent.

Frequently Asked Questions about avalonia-xaml

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enable compiled bindings in Avalonia 12 AXAML files?

Compiled bindings in Avalonia 12 are enabled by default and require setting x:DataType on the root element or DataTemplate to ensure view models resolve correctly at compile time.

What XML namespaces do I need for Avalonia XAML to resolve controls correctly?

Avalonia XAML requires correctly configuring the default namespace, x:, using:, and clr-namespace: declarations to ensure controls and view models resolve properly within axaml files.

How do I structure an AXAML file with code-behind in Avalonia?

Create an AXAML file with the Avalonia root namespace, set x:Class, add x:DataType for compiled bindings, and create a matching axaml.cs code-behind file containing InitializeComponent.

Can I build Avalonia UI using code-only patterns without AXAML files?

Yes, Avalonia supports code-only UI patterns alongside traditional axaml markup, allowing you to construct interfaces entirely in C# while still utilizing resource dictionaries and compiled bindings.

What are common mistakes when writing Avalonia XAML markup?

Common Avalonia XAML mistakes include missing x:DataType for compiled bindings, incorrect XML namespace declarations, and improper root element requirements or markup extension usage in axaml files.