Routeables.Maui
1.0.0
dotnet add package Routeables.Maui --version 1.0.0
NuGet\Install-Package Routeables.Maui -Version 1.0.0
<PackageReference Include="Routeables.Maui" Version="1.0.0" />
<PackageVersion Include="Routeables.Maui" Version="1.0.0" />
<PackageReference Include="Routeables.Maui" />
paket add Routeables.Maui --version 1.0.0
#r "nuget: Routeables.Maui, 1.0.0"
#:package Routeables.Maui@1.0.0
#addin nuget:?package=Routeables.Maui&version=1.0.0
#tool nuget:?package=Routeables.Maui&version=1.0.0
Routeables.Maui
The .NET MAUI host of Routeables: the setup call, a routed ContentView base, a Shell driven by the main view model, and the region control. Targets net10.0 and the Android, iOS, Mac Catalyst and Windows frameworks (the MAUI workload is required).
dotnet add package Routeables.Maui
The package brings Routeables (routing, abstractions and the source generator): there is nothing else to add.
Set up
var builder = MauiApp.CreateBuilder();
builder.UseMauiApp<App>().UseRouteables<MainViewModel>(r => r.AddGeneratedRoutes());
A view
<routeables:RouteableFor x:Class="XAnimals.Maui.Views.DogDetailView"
xmlns:routeables="clr-namespace:Routeables.Maui;assembly=Routeables.Maui" ...>
<views:AnimalDetail />
</routeables:RouteableFor>
RouteableFor maps the context to BindingContext. A zone that shows a region is <routeables:RouteableRegion Region="shell-content" />.
The shell
RouteablesShell is a Shell whose tabs or flyout entries come from the main view model, and it follows entries added later (modules). Shell owns the top level and Routeables the route changes inside each item: do not also use Shell.GoToAsync on those pages.
A Shell written in XAML
Keep your own Shell (flyout, tabs, routes in XAML) and let Routeables build each page from its route:
xamlShell.AttachRouteables(provider); // "cats" opens the route "/cats"
ShellItems.AttachRouteables(Shell, IServiceProvider) returns an IDisposable. Each ShellContent with a Route gets the view of that route, and the router stays in step with what the user selects.
Dialogs and notifications
In the Routeables.Maui.Services namespace. UseRouteables already registers them; UseRouteablesServices takes optional factories, to call only to replace a service. For CommunityToolkit.Maui popups and snackbars call UseCommunityToolkit() from Reshapes after UseRouteables: it replaces them.
- Dialogs, content dialogs, task dialogs and notifications. Toasts are native on Windows, Android, iOS and Mac Catalyst, and an overlay on the plain
net10.0target. RouteableModalFor<TViewModel, TResult>: the base of a modal view that returns a typed result.
Dialogs and modals need an active page to appear on. Contracts: Routeables.Services.
Good to know
- Property injection understands
[RouteableParameter]and MAUI's[QueryProperty]. RouteableMauiEntryshows a validation error from anINotifyDataErrorInfocontext.- CommunityToolkit popups and snackbars: call
UseCommunityToolkit()fromReshapesafterUseRouteables, next to the usualUseMauiCommunityToolkit(). - On CI,
-p:CiBuild=truebuilds only the plainnet10.0target.
Next
Hosts guide, samples Samples/XAnimals.Maui and XAnimals.MauiHybrid.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-android36.0 is compatible. net10.0-browser was computed. net10.0-ios was computed. net10.0-ios26.0 is compatible. net10.0-maccatalyst was computed. net10.0-maccatalyst26.0 is compatible. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. net10.0-windows10.0.19041 is compatible. |
-
net10.0
- Microsoft.Maui.Controls (>= 10.0.110)
- Routeables (>= 1.0.0)
-
net10.0-android36.0
- Microsoft.Maui.Controls (>= 10.0.110)
- Routeables (>= 1.0.0)
-
net10.0-ios26.0
- Microsoft.Maui.Controls (>= 10.0.110)
- Routeables (>= 1.0.0)
-
net10.0-maccatalyst26.0
- Microsoft.Maui.Controls (>= 10.0.110)
- Routeables (>= 1.0.0)
-
net10.0-windows10.0.19041
- Microsoft.Maui.Controls (>= 10.0.110)
- Routeables (>= 1.0.0)
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 | 80 | 10/25/2026 |