Skip to content
Nuvyntra Labs

Documentation

Source generators

[Notify], [NotifyDependsOn], command attributes, register, routes, persist, auth, and MVVME001–013 analyzers. UseMvvmExpress applies generated routes via a ModuleInitializer.

Shipped

AttributeGenerates
[Notify] / [NotifyAlso]Property + changing/changed + dependents
[NotifyDependsOn]Computed property notifies when named sources change — no Reactive package
[ModelCommand] / [AsyncModelCommand]Command property + CanExecute hookup
[RegisterViewModel] / [RegisterView]IServiceCollection + generated page maps
[Route]Route table for Shell / navigator
[PersistState]Save/restore members via IStateStore
[RequiresAuth] / [RequiresRole]Guard metadata for INavigationAuthPolicy
<PackageReference Include="Plugin.Maui.MVVMExpress.SourceGenerators" Version="1.3.0" PrivateAssets="all" />

builder.UseMvvmExpress(o => o
    .UseNavigationPage()
    .UseDialogs()
    .UseAuth<LoginViewModel>());
// generated [Route] / [RegisterView] / [RequiresAuth] apply from UseMvvmExpress

services.AddGeneratedViewModels(); // optional explicit call

Convention scan of *Page / *ViewModel is not a supported 1.3 registration path (MVVME010 in DEBUG). Typed NavigateToAsync<TViewModel>() and generated registrations are the supported story. Handwritten Map remains an escape hatch.

Analyzers

The SourceGenerators pack ships diagnostics. Zero false positives on the in-repo samples and the template is a 1.3 gate.

IDSeverityRule
MVVME001ErrorShell.Current or Page.DisplayAlert inside a ViewModel / PageViewModel / ObservableModel
MVVME002Warningthis captured on a weak IMessageHub handler
MVVME003WarningFormField created without Bind
MVVME010Error (DEBUG)Convention *Page / *ViewModel reflection scan — generators + ModuleInitializer only
MVVME011WarningObservableRangeCollection.Add in a loop
MVVME012WarningSnapshotCollection + BindableLayout
MVVME013ErrorPagedCollection + sync fetch + RemainingItemsThreshold

Discussion

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