Install
dotnet add package Zafiro.Avalonia.Templates --version 53.2.0
No framework information available.
README
Zafiro.Avalonia.Templates
dotnet new templates for building Avalonia apps with the Zafiro toolkit.
Install
dotnet new install Zafiro.Avalonia.Templates
Templates
| Short name | Description |
|---|---|
zafiro-shell |
Cross-platform Avalonia app (Desktop, Browser, Android, iOS) with the Zafiro Shell, section auto-discovery via [Section], MVVM via ReactiveUI. |
Usage
dotnet new zafiro-shell -n MyApp
cd MyApp
dotnet run --project MyApp.Desktop
Options
| Option | Description | Default |
|---|---|---|
-n, --name |
Application/solution name (also used as namespace). | ZafiroShellTemplate |
--application-id |
Android ApplicationId and iOS CFBundleIdentifier. |
com.example.<name-lowercase> |
What you get
- Multi-project solution (
.slnx):- Shared head (
MyApp/) —App.axaml,App.axaml.csbootstrap withAddZafiroShell+AddAllSectionsFromAttributes, plusSections/(Home / Settings / About) — each section is a ViewModel + View pair tagged with[Section]so it is auto-discovered and added to the shell. - MyApp.Desktop — Windows / Linux / macOS via
Avalonia.Desktop. - MyApp.Browser — WebAssembly via
Avalonia.Browser. - MyApp.Android —
Avalonia.Android. - MyApp.iOS —
Avalonia.iOS.
- Shared head (
- Central Package Management (
Directory.Packages.props) with pinned Avalonia 12 + Zafiro versions. - Compiled bindings on by default.
ReactiveUI.Avaloniaas the MVVM integration.Zafiro.Avalonia.Mcp.AppHostwired into Desktop in Debug builds (via.UseMcpDiagnostics()under#if DEBUG) so AI agents and other MCP clients can inspect/drive the running UI.
Adding a new section
Create a ViewModel + View pair anywhere under the shared head and decorate the ViewModel with [Section]:
[Section("Profile", "fa-solid fa-user", sortIndex: 3)]
public partial class ProfileViewModel : ReactiveObject { /* ... */ }
The Zafiro source generator will register it automatically — no DI plumbing required.
Uninstall
dotnet new uninstall Zafiro.Avalonia.Templates
Changes from Previous Version
No structural changes between v53.1.0 and v53.2.0.
Adoption Assessment
Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.
No target framework metadata is available. Confirm compatibility in a representative project before standardising on this package.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.