Application framework
MVVMExpress
Modular MVVM for Avalonia — ViewModels, async state, Frame host, dialogs
Current NuGet 1.0.1
A modular MVVM framework for Avalonia on .NET 10: observable models, async commands, bindable AsyncState, lifecycle-aware cancellation, typed Frame navigation, dialogs, overlay toast, validation, pagination, forms, and a testing package. 1.0.0 is the first stable Avalonia family — independent of Plugin.Maui.MVVMExpress and Plugin.Wpf.MVVMExpress, with the same Core contract and no Shell host.
Install
dotnet add package Plugin.Avalonia.MVVMExpress.Core
dotnet add package Plugin.Avalonia.MVVMExpress
dotnet add package Plugin.Avalonia.MVVMExpress.Navigation
dotnet add package Plugin.Avalonia.MVVMExpress.DialogsPackage IDs: Plugin.Avalonia.MVVMExpress.CorePlugin.Avalonia.MVVMExpressPlugin.Avalonia.MVVMExpress.NavigationPlugin.Avalonia.MVVMExpress.Dialogs
Plugin.Avalonia.MVVMExpress.* restores from nuget.org. CI also publishes GitHub Packages — see Use nuvyntralabs GitHub Packages from a C# project.
Or scaffold an app
dotnet new install Plugin.Avalonia.MVVMExpress.Templates
dotnet new avalonia-mvvmexpress -n MyAppAdds a main window with Plugin.Avalonia.MVVMExpress.Controls.Frame named NavigationHost, login replace-root, a list, a form, and tests. Then dotnet new avalonia-mvvmexpress-page -n Catalog --namespace MyApp. Same commands from the VS Code and Visual Studio extensions.
Overview
Avalonia MVVMExpress is the application shell for production Avalonia apps on Windows, macOS, and Linux. CommunityToolkit.Mvvm covers properties and commands, and ReactiveUI covers observable pipelines. A desktop app often needs both plus bindable async state, lifecycle-aware cancellation, and typed Frame navigation — without taking overlapping frameworks. Core targets net10.0 and does not reference Avalonia or MAUI. Host / Navigation / Dialogs also target net10.0. Current NuGet is 1.0.1. Scaffold with Plugin.Avalonia.MVVMExpress.Templates (dotnet new avalonia-mvvmexpress / avalonia-mvvmexpress-page), or install the Avalonia MVVMExpress listings on the Visual Studio Code and Visual Studio Marketplaces. This is not Plugin.Maui.MVVMExpress or Plugin.Wpf.MVVMExpress: there is no PackageReference between the families. UseAvaloniaMvvmExpress registers AvaloniaDispatcherMainThread and AvaloniaWindowContext. UseFrameNavigation maps ViewModels onto Plugin.Avalonia.MVVMExpress.Controls.Frame named NavigationHost. UseAuth<TChallenge>() wraps GuardedNavigator. Toasts draw on an overlay — never Window.Content. Source generators, Reactive, Shell, UseDeepLinks, and UseSecureSessionAuth are out of 1.0.
Current release
- 1.0.1. Host / Navigation / Dialogs / Templates README files pack as real markdown so nuget.org renders them. IDE extensions pin the 1.0.1 template pack.
- 1.0.0. First stable Avalonia family. Frame host, modal Window dialogs, overlay toasts, validation, pagination, templates, and Visual Studio Code / Visual Studio wrappers.
- Independent of Plugin.Maui.MVVMExpress and Plugin.Wpf.MVVMExpress. Core contract aligns with MAUI 1.3; a ViewModel ports with a namespace swap. Breaking changes wait for 2.0.0.
Capabilities
- ObservableModel, ViewModel lifecycle, and ViewModelCancellationToken cancelled on dispose.
- Sync and async commands with UI-thread marshal, weak CanExecuteChanged, no-throw ICommand.Execute, timeout, retry, debounce, and throttle.
- UseAvaloniaMvvmExpress + AvaloniaDispatcherMainThread + AvaloniaWindowContext. Loaded / Unloaded lifecycle on navigated views.
- UseFrameNavigation + ResetAsync / ReplaceRootAsync on Plugin.Avalonia.MVVMExpress.Controls.Frame named NavigationHost. There is no Shell host.
- Navigators hop to IMainThread before constructing a view. Off-thread factories throw.
- Modal views open as owned Windows. One INavigator per Window — first-class multi-window.
- SectionHostView + SectionHostViewModel in-place tabs, SnapshotCollection load-once lists, MvvmSearch + SearchQuery.CommittedText.
- FormViewModel.Bind, AvaloniaFormViewModel (INotifyDataErrorInfo), dirty confirm, SubmitAsync, MustMatch, undo/redo.
- UseAuth<TChallenge>() / AddAuth<TChallenge>() wraps GuardedNavigator. Register IAuthState yourself.
- AvaloniaNotifier toast via overlay — never wraps Window.Content.
- IModule / AddModule<T>() for feature-team registration.
- CoalescingDispatcher for inbox / hub handlers. IMainThread is the only marshal API in ViewModels.
- Testing package: LeakProbe, ScaleProfile, FakeDialogs, FakeNavigator, ScopedNavigator.
- dotnet new avalonia-mvvmexpress and avalonia-mvvmexpress-page via Plugin.Avalonia.MVVMExpress.Templates.
- VS Code (Create New App / Add Page) and Visual Studio 2022+ (Tools → Avalonia MVVMExpress; File → New → Project) Marketplace wrappers.
Documentation
Documentation
ViewModels, commands, DI, messaging, Frame navigation, modules, chat host, forms, project template, IDE extensions, and the shipped 1.0.0 roadmap.
Getting started
dotnet new avalonia-mvvmexpress, VS Code or Visual Studio Marketplace extensions, install 1.0.1 into an existing app, first screen, UseFrameNavigation, Playground clone, FakeNavigator / LeakProbe, and forms.
Comparison
Surfaces, syntax map ([Notify] vs [ObservableProperty], INavigator vs INavigationService), trade-offs, and when to choose each.
IDE extensions
Install the Avalonia MVVMExpress listings on the Visual Studio Code and Visual Studio Marketplaces. Thin wrappers that install the template pack and run dotnet new.
Playground sample
Cloneable 15-minute path in the product repo — command, Frame navigation, dialog, form, auth, list, and a second window. Not a separate SampleApp repository.
Package family
| Package | Purpose | Status |
|---|---|---|
| Plugin.Avalonia.MVVMExpress.CoreGitHub Packagesnuget.org | Observable model, commands, ViewModel, SectionHost, IModule, navigator/cache/auth abstractions, state, outcome, messaging | Implemented + tests |
| Plugin.Avalonia.MVVMExpressGitHub Packagesnuget.org | UseAvaloniaMvvmExpress, AvaloniaDispatcherMainThread, AvaloniaWindowContext, Loaded/Unloaded lifecycle, SectionHostView, MvvmSearch, AvaloniaFormViewModel | Implemented |
| Plugin.Avalonia.MVVMExpress.NavigationGitHub Packagesnuget.org | AvaloniaFrameNavigator, UseFrameNavigation, replace-root, owned Window modal stack | Implemented + tests |
| Plugin.Avalonia.MVVMExpress.DialogsGitHub Packagesnuget.org | IDialogs + AvaloniaDialogs (owned Window) + AvaloniaNotifier (overlay toast) | Implemented + tests |
| Plugin.Avalonia.MVVMExpress.ValidationGitHub Packagesnuget.org | DataAnnotations + IValidator + MustMatch + ILLink trim roots | Implemented + tests |
| Plugin.Avalonia.MVVMExpress.PaginationGitHub Packagesnuget.org | PagedCollection<T>, SnapshotCollection<T>, SearchQuery.CommittedText | Implemented + tests |
| Plugin.Avalonia.MVVMExpress.TestingGitHub Packagesnuget.org | LeakProbe, ScaleProfile, FakeDialogs, FakeNavigator, FakeMainThread, FakeConnectivity, FakeMessageHub, ScopedNavigator | Implemented + tests |
| Plugin.Avalonia.MVVMExpress.TemplatesGitHub Packagesnuget.org | dotnet new avalonia-mvvmexpress (app) and avalonia-mvvmexpress-page (XAML + ViewModel + service) | Implemented |
Compose with
- Plugin.Maui.MVVMExpressThe MAUI family — same Core contract, different host. Do not add both PackageReferences to one project.
- Plugin.Wpf.MVVMExpressThe WPF family — same Core contract, different host. A ViewModel ports with a namespace swap.
- Plugin.Maui.HttpForgeSource-generated typed REST client. Core is net10.0 — a desktop ViewModel can consume the same client library.
- CommunityToolkit.MvvmUsual alternative when you only need properties and commands. Type names stay unique if both are referenced.
- Avalonia
- MVVM
- ViewModel
- C#
- Windows
- macOS
- Linux
- VS Code
- Visual Studio
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.
Related in Application framework
- Plugin.Maui.MVVMExpressModular MVVM for MAUI — ViewModels, async state, Shell or NavigationPage, dialogs
- Plugin.Wpf.MVVMExpressModular MVVM for WPF — ViewModels, async state, Frame navigation, dialogs
- Plugin.Uno.MVVMExpressModular MVVM for Uno Platform — ViewModels, async state, Frame navigation, dialogs