OutWit.Common.MVVM.Navigation.Modules 1.0.0

dotnet add package OutWit.Common.MVVM.Navigation.Modules --version 1.0.0
                    
NuGet\Install-Package OutWit.Common.MVVM.Navigation.Modules -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OutWit.Common.MVVM.Navigation.Modules" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OutWit.Common.MVVM.Navigation.Modules" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="OutWit.Common.MVVM.Navigation.Modules" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OutWit.Common.MVVM.Navigation.Modules --version 1.0.0
                    
#r "nuget: OutWit.Common.MVVM.Navigation.Modules, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OutWit.Common.MVVM.Navigation.Modules@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OutWit.Common.MVVM.Navigation.Modules&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=OutWit.Common.MVVM.Navigation.Modules&version=1.0.0
                    
Install as a Cake Tool

OutWit.Common.MVVM.Navigation.Modules

UI modules for OutWit.Common.MVVM.Navigation: plugins that register services, routes, views and contributions. Built on OutWit.Common.Plugins, with the same two-phase shape as every other OutWit plugin axis — services before the container is built, everything else after.

The navigation sample runs two modules, one of each kind: ReportsModule compiled into the application, and AuditModule shipped as a DLL the application does not reference, staged into @Modules/audit.module/ and found there by the loader. Both add a route, a view and a navigation bar entry without the shell knowing they exist.

A module

[WitPluginManifest("Summary")]
public class SummaryModule : UiModuleBase
{
    public override void Initialize(IServiceCollection services)
    {
        services.AddSingleton<ISummaryService, SummaryService>();      // phase one
    }

    protected override void OnInitialized(UiModuleContext context)     // phase two
    {
        context.Routes.Register<SummaryViewModel>(SummaryRoutes.GENERAL, metadata: new FeatureGate("Holter.Summary"));
        context.Views.Register<SummaryViewModel, SummaryView>();       // or rely on the naming convention

        context.Contributions.Add(new ContributionItem
        {
            Zone = Zones.NAVIGATION_BAR,
            Key = "Summary",
            Order = 200,
            Header = Resources.Summary,
            Icon = "ChartBox",
            RouteKey = SummaryRoutes.GENERAL
        });
    }
}

View models are not registered: navigation creates them with ActivatorUtilities, their dependencies come from DI. Styles and resources go through the platform's IApplicationResources (context.Services.GetRequiredService<IApplicationResources>()).

The host

services.AddNavigation(nav => ...);
services.AddAvaloniaNavigation();
services.AddUiModules();                                           // @Modules next to the app
// services.AddUiModules(o => o.Folder = "Plugins/UI");
// services.AddUiModules(o => { o.ScanFolder = false; o.AddModule<SummaryModule>(); });   // compiled in

var provider = services.BuildServiceProvider();
await provider.GetRequiredService<UiModules>().InitializeAsync(provider);
provider.ValidateNavigation();

Folder modules follow the plugin conventions: one sub-folder per module (@Modules/summary.module/) with the module DLL, its deps.json and its dependencies. UI modules are loaded without isolated load contexts — they share the UI framework and the navigation contracts with the host — so they cannot be unloaded at run time.

A module that throws in either phase is recorded in UiModules.Failures and logged; the other modules carry on. A folder that cannot be scanned at all (a bad manifest, a missing or circular dependency) throws an AggregateException from AddUiModules — that is a deployment error and fails fast.

License

Apache-2.0. Part of the OutWit ecosystem.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 109 8/23/2026