Skip to content

adaxer/MvvmNav

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ADaxer.MvvmNav

Downloads License

A lightweight, ViewModel-first navigation framework for .NET UI applications.

Run the same navigation concepts across: Windows · Linux · macOS · Android · iOS

Supports WPF, Avalonia and MAUI with a consistent mental model and minimal setup.


✨ Why MvvmNav?

  • ViewModel-first navigation
  • Clean separation of concerns
  • Minimal infrastructure (no heavy frameworks)
  • Cross-platform core
  • Fully DI and logging compatible
  • Works with existing applications

👉 Want to understand how it works internally?
See Architecture & Concepts


🚀 Quick Start

services
    .AddMvvmNav()
    .WithShell<ShellWindow, ShellViewModel>()
    .WithStartupNavigation<HomeViewModel>();

Inject INavigationService into your ViewModels and start navigating.

👉 More detailed setup and concepts:
Getting Started & Concepts


🧩 The Shell Concept (Core Idea)

MvvmNav uses a central Shell ViewModel that hosts:

  • CurrentModule
  • CurrentDialog

This is the composition root of your UI.


🖥️ WPF

WpfNavigationHostBuilder
    .Default()
    .WithShell<ShellWindow, ShellViewModel>()
    .WithStartupNavigation<HomeViewModel>()
    .Build();

await host.StartAsync();

🧩 Avalonia

services.AddMvvmNav()
    .WithShell<ShellWindow, ShellViewModel>()
    .WithStartupNavigation<HomeViewModel>();

📱 MAUI

builder.Services
    .AddMvvmNav()
    .WithShell<ShellPage, ShellViewModel>()
    .WithStartupNavigation<HomeViewModel>();

🔄 Navigation

await navigation.NavigateAsync<HomeViewModel>();

👉 Deep dive into navigation, parameters and back stack:
Navigation Guide


🛑 Navigation Guards

Prevent navigation when needed (e.g. unsaved changes).

👉 Full guard flows and advanced scenarios:
Navigation Guards & Flow


📸 Sample Application

Cross-platform sample included in the repository.

  • Navigation & back stack
  • Dialogs
  • Guards
  • Markdown help pages

👉 Walkthrough of the sample app and architecture decisions:
Sample App Guide


📚 Documentation


🛠️ Status

Actively developed – API stabilizing toward v1.


🎯 Roadmap

Current

  • ViewModel-first navigation
  • Cross-platform core
  • Navigation parameters
  • Dialog integration

Planned

  • Authorization / redirects
  • State persistence
  • Typed parameters

❤️ Support

https://github.com/sponsors/adaxer


📄 License

Apache License 2.0

About

A Navigation Framework for all .net based MVVM Application types

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages