Skip to content
Nuvyntra Labs

Documentation

Project template

Scaffold a Avalonia app with dotnet new avalonia-mvvmexpress, then add screens with avalonia-mvvmexpress-page.

Install the template pack

dotnet new install Plugin.Avalonia.MVVMExpress.Templates
dotnet new avalonia-mvvmexpress -n MyApp
cd MyApp
dotnet test MyApp.Tests

nuget.org: Plugin.Avalonia.MVVMExpress.Templates 1.0.1

GitHub Packages: Plugin.Avalonia.MVVMExpress.Templates 1.0.1

From the product repo, without installing the nupkg: dotnet new install templates/ and then dotnet new avalonia-mvvmexpress -n MyApp.

Same commands from the IDE: install the Visual Studio Code or Visual Studio Marketplace listing. The wrappers install the pack and run dotnet new — they do not copy the scaffold.

avalonia-mvvmexpress app

Short name: avalonia-mvvmexpress. Creates a Avalonia Frame host. There is no Shell.

IncludedWhat you get
Main windowFrame named NavigationHost. Do not replace Window.Content with a toast host.
LoginResetAsync to Home after sign-in
Home list + detailsSnapshotCollection and typed NavigateToAsync
FormAvaloniaFormViewModel screen
MyApp.Core + MyApp.Testsnet10.0 ViewModels and tests

Demo sign-in is demo@mvvmexpress.dev / secret. Production tokens stay on an IAuthState adapter — do not store them on the ViewModel.

avalonia-mvvmexpress-page item

cd MyApp
dotnet new avalonia-mvvmexpress-page -n Catalog --namespace MyApp

Creates a XAML page, ViewModel, service, AddCatalog(), and {Binding} / Command. Map the route in App startup:

builder.Services.UseAvaloniaMvvmExpress(o => o
    .UseFrameNavigation((nav, _) => nav
        .Map<LoginViewModel, LoginPage>("login")
        .Map<HomeViewModel, HomePage>("home")
        .Map<CatalogViewModel, CatalogPage>("catalog"))
    .UseDialogs()
    .UseAuth<LoginViewModel>());

builder.Services.AddCatalog();

After you scaffold

  • Do not reconstruct GuardedNavigator — UseAuth<TChallenge>() already wraps it.
  • Register an IAuthState adapter. The template uses an in-memory demo.
  • Add Validation, Pagination, or Testing only when the screen needs them — the template already references the host set.
  • Playground remains the cloneable 15-minute path if you want the in-repo sample instead of a new project.

Getting started walkthrough: Install and first screen

IDE wrappers: VS Code and Visual Studio extensions

Discussion

Comment on Plugin.Avalonia.MVVMExpress. The thread lives on this component's GitHub repository (nuvyntralabs/Plugin.Avalonia.MVVMExpress). Sign in with GitHub — Giscus uses Discussions, Utterances uses Issues.