Sign in Get 3 free credits

Try a job or a niche: tiktok captions, study notes, excel formulas. Press Esc to close.

Avalonia .NET apps

Builds, debugs and upgrades Avalonia 11 and 12 apps, so bindings, threading and publishing work properly.

What we improved

Made SKILL.md work on its own. The composition root, the control theme for the custom control, the property type table, the dispatcher example and the publish command now live in SKILL.md instead of only in the reference files. Added sectio

Improved by YourAISkill from the original by managedcode, under its MIT licence. The download includes the author's licence and a CHANGES.md listing every change. Both Claude reviews read the improved version.

Claude's review

8/10 Accurate Avalonia 11 and 12 guide with compiled bindings, lifetimes, threading, storage pickers, headless tests, AOT and a clear 11 to 12 breaking-change list.

We asked Claude the question you would ask: would I be glad I installed this? Two separate reviews, the second blind to the first, must both rate a skill 7 or higher before we sell it.

In detail

Build and debug Avalonia 11/12 .NET applications with XAML, compiled bindings, MVVM, custom controls, desktop lifetimes, and platform publishing. USE FOR: Avalonia projects, bindings, commands, themes, UI dispatch, trimming, or Native AOT. DO NOT USE FOR: WPF, WinUI, MAUI, Uno, or Avalonia XPF compatibility work. INVOKES: inspect installed versions, implement, and validate on the actual target platforms.

How you use it

  1. Add it to your pack, then download your pack (1 credit).
  2. In Claude, open Customize > Skills and upload the zip. Code execution needs to be on under Settings > Capabilities.
  3. Ask Claude for the job in your own words. It uses the skill when your request matches what it does. Step by step guide

Safety check

Nothing risky found: no hidden instructions, no download and run, no reading of saved passwords or keys.

An automated scan lowers risk but cannot promise zero risk. How we check skills

Preview

The first lines of SKILL.md
---
name: avalonia
description: "Build, debug and upgrade Avalonia 11 and 12 .NET applications: project setup from the official templates, MVVM with CommunityToolkit.Mvvm, compiled bindings and x:DataType, styled and direct properties, templated controls and control themes, application lifetimes, UI thread dispatching, dialogs and file pickers, headless UI tests, trimming and Native AOT publishing, the 11 to 12 breaking changes, and WPF habits that do not carry over. Use for Avalonia projects (.axaml files, Avalonia NuGet packages), binding or command bugs, custom controls, themes, threading errors, platform publishing, or migrating from Avalonia 11 to 12. Not for WPF, WinUI, MAUI, Uno or Avalonia XPF compatibility work."
compatibility: "Requires a .NET SDK and Avalonia packages; desktop runtime validation requires the target OS and display environment."
---

<!-- Modified by YourAISkill (youraiskill.com) on 2 December 2026 from the original by managedcode. See CHANGES.md. -->

# Avalonia

## Workflow

1. **Inspect before editing:** SDK and target frameworks, Avalonia package versions (all `Avalonia*` packages must be on the same version), `.axaml` files, `Program.BuildAvaloniaApp`, `App.axaml.cs`, and the promised OS and RID list. Use the [Avalonia 12 docs](https://docs.avaloniaui.net/docs/welcome) for 12 and the [Avalonia 11 docs](https://v11.docs.avaloniaui.net/) for 11; do not copy 12-only APIs into 11.
2. **Keep layers apart:** `Program.BuildAvaloniaApp`, `App.axaml`, views, view models, and services. Desktop hosts use `StartWithClassicDesktopLifetime` and create `MainWindow` in `OnFrameworkInitializationCompleted`. Keep `BuildAvaloniaApp` callable by the designer; the previewer may run with no application lifetime.
3. **Bind with types:** compiled bindings with `x:DataType` on every view and template. `x:DataType` describes the binding type; it does not set the runtime `DataContext`.
4. **State and commands:** `CommunityToolkit.Mvvm` for observable properties and commands. Prefer cancellable async service calls, surface errors, and marshal background updates to the UI thread. Services never reference controls.
5. **Controls:** `UserControl` for app composition, `TemplatedControl` for reusable skinnable controls, custom rendering only when needed. `DataTemplate` displays data; `ControlTemplate` and `ControlTheme` change a control's visual structure.
6. **Validate on real targets:** dialogs, resources, shutdown, DPI, keyboard, accessibility and packaging on each promised OS. Read [references/platforms-and-publishing.md](references/platforms-and-publishing.md) before trimming or Native AOT.

## New project

Use the official templates rather than inventing scaffolding. The MVVM template already uses CommunityToolkit.Mvvm by default (`-m ReactiveUI` selects the alternative):

```bash
dotnet new install Avalonia.Templates
dotnet new avalonia.mvvm -o MyApp
dotnet run --project MyApp/MyApp.csproj
```

For an existing project, add packages at the version the project already uses:

```bash
dotnet add MyApp.csproj package Avalonia.Desktop --version <same-version-as-Avalonia>
dotnet add MyApp.csproj package Avalonia.Themes.Fluent --version <same-version-as-Avalonia>
```

## Typed bindings and commands

```csharp
using CommunityToolkit.Mvvm.ComponentModel;
...

From managedcode's repository, MIT licence.

Related skills

  • Checked

    TUnit tests for .NET

    Writes, runs and fixes TUnit tests in .NET, or moves xUnit and NUnit tests across, so your suite runs cleanly.

    by managedcode 527
    8/101 credit
  • Checked

    .NET trimming and Native AOT

    Fixes trimming and Native AOT warnings in your .NET code step by step, so your app publishes small and fast.

    by Aaronontheweb 1.3k
    9/101 credit
  • Checked

    MAUI safe area layout

    Handles safe areas and edge to edge layouts in .NET MAUI, so content clears notches and the keyboard.

    by dotnet 6.4k
    7/101 credit
  • Checked

    .NET MAUI sign in

    Adds Google, Apple and Microsoft sign in to your .NET MAUI app, so login works on Android, iOS and Windows.

    by davidortinau 181
    8/101 credit
  • Checked

    Xamarin.Forms to .NET MAUI

    Moves your Xamarin.Forms app to .NET MAUI and keeps its store identity and user data, so nothing breaks quietly.

    by davidortinau 181
    8/101 credit
  • Checked

    Godot C# scripting

    Writes, ports and debugs C# scripts for Godot 4, so your game builds and runs without the common C# traps.

    by jame581 1k
    8/101 credit

Secure checkout

Credits

AUD

  1. 1Choose
  2. 2Pay on Square
  3. 3Credits added