Application framework
MVVMExpress
Modular MVVM for MAUI — ViewModels, async state, Shell or NavigationPage, dialogs
A modular MVVM framework for .NET MAUI on Android, iOS, Mac Catalyst, and Windows (single-window): observable models, async commands, bindable AsyncState, lifecycle-aware cancellation, typed Shell or NavigationPage navigation, dialogs, toast, validation, pagination, forms, Reactive, and source generators. 1.0.0 SemVer lock — UseAuth, UseNavigationPage + replace-root, section host, snapshot lists.
Install
dotnet add package Plugin.Maui.MVVMExpress.Core
dotnet add package Plugin.Maui.MVVMExpressPackage IDs: Plugin.Maui.MVVMExpress.CorePlugin.Maui.MVVMExpress
Overview
MVVMExpress is the application shell for production MAUI apps on Android, iOS, Mac Catalyst, and Windows (single-window). CommunityToolkit.Mvvm covers properties and commands, Prism.Maui covers page navigation (not Shell), and ReactiveUI covers observable pipelines. A field or enterprise app often needs all three plus bindable async state, lifecycle-aware cancellation, and typed navigation — without taking three overlapping frameworks. Core targets net10.0 and does not reference MAUI. 1.0.0 is the SemVer lock: UseAuth<TChallenge>() wraps GuardedNavigator, pages are constructed on IMainThread, UseNavigationPage is the first-class login → replace-root → push host (Shell is optional), SectionHostViewModel switches tabs in place, and SnapshotCollection loads a list once. Capability work (captive portal, HTTP cache, offline sync, form XAML, flags, deep links) stays in focused MauiEssentials plugins on Android and iOS; MVVMExpress composes them through adapters.
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.
- Host / Navigation / Dialogs on Android, iOS, Mac Catalyst, and Windows (single-window). Sibling adapters stay Android + iOS.
- UseNavigationPage + ResetAsync / ReplaceRootAsync (replaces window.Page with a NavigationPage). UseShell is optional.
- Navigators hop to IMainThread before new Page() or Shell.GoToAsync. Off-thread factories throw.
- SectionHostViewModel in-place tabs, SnapshotCollection load-once lists, SearchQuery.CommittedText.
- FormViewModel.Bind, dirty confirm, SubmitAsync, MustMatch, undo/redo.
- UseAuth<TChallenge>() / AddAuth<TChallenge>() wraps GuardedNavigator. Register IAuthState (SecureSession in production).
- MauiNotifier toast via Window.AddOverlay — never wraps Page.Content.
- [Notify], command attributes, ModuleInitializer routes, [PersistState], and [RequiresAuth].
- CoalescingDispatcher for inbox / hub handlers. IMainThread is the only marshal API in ViewModels.
- Testing package: LeakProbe (including Button + pop page), ScaleProfile, FakeDialogs, FakeNavigator, ScopedNavigator.
- Adapters for NetworkMonitor, ApiCache, OfflineSync, SecureSession, FormValidation, FeatureFlags, and DeepLinks.
Documentation
Documentation
ViewModels, commands, DI, messaging, NavigationPage or Shell, chat host, forms, generators, operation pipeline, and the shipped roadmap.
Getting started
Install 1.0.0, first screen, UseNavigationPage vs UseShell, Playground clone, FakeNavigator / LeakProbe, forms, generators, and adapters.
Comparison
Surfaces, syntax map ([Notify] vs [ObservableProperty], INavigator vs INavigationService), trade-offs, and when to choose each.
Playground sample
Cloneable 15-minute path in the product repo — command, navigation, dialog, form, auth, and list. Not a separate SampleApp repository.
Package family
| Package | Purpose | Status |
|---|---|---|
| Plugin.Maui.MVVMExpress.Core | Observable model, commands, ViewModel, SectionHost, navigator/cache/auth abstractions, state, outcome, messaging | Implemented + tests |
| Plugin.Maui.MVVMExpress | UseMvvmExpress, UseAuth, MauiMainThread, auto lifecycle, BusyOverlayBehavior, AsyncStateView | Implemented |
| Plugin.Maui.MVVMExpress.Navigation | MauiShellNavigator + MauiPageNavigator, UseNavigationPage / UseShell, replace-root | Implemented + tests |
| Plugin.Maui.MVVMExpress.Dialogs | IDialogs + MauiDialogs + MauiNotifier (Window.AddOverlay toast) | Implemented + tests |
| Plugin.Maui.MVVMExpress.Validation | DataAnnotations + IValidator + MustMatch + ILLink trim roots | Implemented + tests |
| Plugin.Maui.MVVMExpress.Pagination | PagedCollection<T>, SnapshotCollection<T>, SearchQuery.CommittedText | Implemented + tests |
| Plugin.Maui.MVVMExpress.Testing | LeakProbe, ScaleProfile, FakeDialogs, FakeNavigator, FakeMainThread, FakeConnectivity, FakeMessageHub, ScopedNavigator | Implemented + tests |
| Plugin.Maui.MVVMExpress.Reactive | IPropertyObservable / CombineLatest — no System.Reactive required | Implemented + tests |
| Plugin.Maui.MVVMExpress.SourceGenerators | [Notify], commands, register, routes, persist, auth | Implemented + snapshot tests |
| Plugin.Maui.MVVMExpress.Compatibility.CommunityToolkit | CommunityToolkitMessageHub — IMessenger → IMessageHub | Implemented + tests |
Compose with
- Plugin.Maui.NetworkMonitorValidated internet versus captive portal for IConnectivityProbe.
- Plugin.Maui.HttpForgeSource-generated typed REST client from ViewModels — compose with ApiResilience / ApiCache.
- Plugin.Maui.ApiCacheHTTP GET CacheFirst / SWR behind ICache.
- Plugin.Maui.OfflineSyncLocal writes and queued sync — not a database inside MVVMExpress.
- Plugin.Maui.SecureSessionTokens and 401 refresh for IAuthState / GuardedNavigator.
- Plugin.Maui.FormValidationXAML Validation.For next to IValidator.
- Plugin.Maui.FeatureFlagsIFeatureSwitch adapter for rollouts.
- Plugin.Maui.DeepLinksApp Links / Universal Links into INavigator route + query.
- Plugin.Maui.PermissionFlowIPermissionGate adapter for permission UX.
- Plugin.Maui.DiagnosticsANR / crash breadcrumbs next to EnableDiagnostics in Debug.
- Plugin.Maui.LeakAnalyserRuntime visual-tree leak detection after pop — complementary to LeakProbe unit tests.
- Plugin.Maui.KeyboardManagerKeyboard pan / safe area / dismiss for chat composers.
- .NET MAUI
- MVVM
- ViewModel
- C#
- Mac Catalyst
- Windows