avalonia-app-development

Bootstrap Avalonia apps with App.axaml and startup code templates.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers bootstrap Avalonia applications with correct project layout, app lifetimes, and cross-platform configuration to reduce setup errors and misconfigurations.

Core Features & Use Cases

  • Establishes a working Avalonia app skeleton with Program.cs, App.axaml, and App.axaml.cs.
  • Documents cross-platform lifetimes (Classic Desktop vs Single View) and platform-detect startup configuration.
  • Demonstrates how to reference merged resource dictionaries and structure multi-project solutions.

Quick Start

Create a new Avalonia project and apply the provided App.axaml, App.axaml.cs, and Program.cs patterns to bootstrap a cross-platform desktop application.

Frequently Asked Questions about avalonia-app-development

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

FAQPage Schema
How do I bootstrap an Avalonia app with the correct cross-platform project structure?

To bootstrap an Avalonia app, you need a canonical project structure with properly configured Program.cs, App.axaml, and App.axaml.cs files. This setup ensures correct cross-platform desktop lifetimes and reduces misconfiguration errors across Windows, macOS, and Linux.

What is the difference between Classic Desktop and Single View lifetimes in Avalonia?

Avalonia app lifetimes differ by platform target: Classic Desktop is used for standard windowed desktop applications, while Single View is required for mobile and web lifecycles across iOS, Android, and WASM. Your startup code must detect the platform to apply the correct lifetime.

Does Avalonia support bootstrapping a single application for desktop, mobile, and WASM?

Yes, Avalonia supports cross-platform bootstrapping for a single application targeting Windows, macOS, Linux, iOS, Android, and WASM. You achieve this by using platform detection in your startup configuration to switch between Classic Desktop and Single View lifecycles.

How do I configure App.axaml to reference merged resource dictionaries in Avalonia?

Configuring App.axaml to reference merged resource dictionaries involves adding resource references within the application configuration file. This ensures cohesive project layout and consistent styling across multiple projects in your solution.

What's the best way to structure a multi-project Avalonia solution?

The best way to structure a multi-project Avalonia solution is to follow a canonical project layout that separates application startup logic from UI resources. This ensures consistent App.axaml wiring and cohesive organization across all projects.