Routeables.Uno
1.0.0
dotnet add package Routeables.Uno --version 1.0.0
NuGet\Install-Package Routeables.Uno -Version 1.0.0
<PackageReference Include="Routeables.Uno" Version="1.0.0" />
<PackageVersion Include="Routeables.Uno" Version="1.0.0" />
<PackageReference Include="Routeables.Uno" />
paket add Routeables.Uno --version 1.0.0
#r "nuget: Routeables.Uno, 1.0.0"
#:package Routeables.Uno@1.0.0
#addin nuget:?package=Routeables.Uno&version=1.0.0
#tool nuget:?package=Routeables.Uno&version=1.0.0
Routeables.Uno
The Uno Platform host of Routeables (Windows, Linux, macOS, WebAssembly, Android, iOS): the setup call, a routed view base, the region control and a list view for the menu. Targets .NET 10. It contains no XAML of its own.
dotnet add package Routeables.Uno
The package brings Routeables (routing, abstractions and the source generator): there is nothing else to add.
Set up
public App()
{
InitializeComponent();
Services = this.UseRouteables<MainViewModel>(r => r.AddGeneratedRoutes());
}
protected override void OnLaunched(LaunchActivatedEventArgs args) =>
_window = this.OpenMainWindow(new MainPage());
The window can be opened by the same call: Services = this.UseRouteables<MainViewModel>(r => r.AddGeneratedRoutes(), () => new MainPage(), window => window.Title = "My app"); in the constructor of App builds the container and creates the window as the application runs, with no OnLaunched to write.
OpenMainWindow creates the window, gives the page the menu as DataContext, selects the first entry and disposes the container when the window closes. For another window, call window.AttachRouteables().
A view
<routeables:RouteableFor x:Class="XAnimals.Uno.Views.DogDetailView"
xmlns:routeables="using:Routeables.Uno" ...>
<local:AnimalDetail />
</routeables:RouteableFor>
public sealed partial class DogDetailView : RouteableFor { public DogDetailView() => InitializeComponent(); }
A XAML root cannot be generic in WinUI, so XAML views use RouteableFor; views written in code can use RouteableFor<TViewModel>.
The menu is a MainViewModelBase and <routeables:RouteableListView />; the current view is <ContentControl Content="{Binding CurrentView}" />. A region is <routeables:RouteableRegion Region="detail" />.
Navigation
A NavigationView written in XAML: each item names its route, and the router builds the page.
<NavigationView x:Name="Nav">
<NavigationViewItem Content="Cats" routeables:RouteableItem.Route="cats" />
<NavigationViewItem Content="Dogs" routeables:RouteableItem.Route="dogs" />
</NavigationView>
Nav.AttachRouteables(provider, region: "tabs"); // returns an IDisposable
Without region, the items follow the main history.
Dialogs and notifications
In the Routeables.Uno.Services namespace. UseRouteables already registers them; call UseRouteablesServices(messageBoxService) yourself only to draw them another way.
- Dialogs, content dialogs and task dialogs, drawn as
ContentDialogs in the window the user last worked in. A window shows one at a time; a second waits for the first. - Notifications:
InfoBars stacked at the top of the active window, closed after five seconds or by the user. DialogView<TViewModel, TResult>: the base of a modal view backed by a closeable view model, written in code (a WinUI XAML root cannot be generic). SeeNoteViewinSamples/XAnimals.Uno.IMessageBoxService(DefaultMessageBoxService): pass your own toUseRouteablesServices(messageBoxService)to draw them another way.
Calling a service before a window has content throws an InvalidOperationException that says so. Contracts: Routeables.Services.
Good to know
- Routeables does not use
Frameor Uno.Extensions: do not mix them in one window. - Not trimmer-checked yet (
IsAotCompatibleis not declared). - Images in the sample are fetched by Uno itself; Wikimedia may refuse them without a User-Agent.
Next
Hosts guide, sample Samples/XAnimals.Uno.
| 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-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Routeables (>= 1.0.0)
- Uno.WinUI (>= 6.7.135)
-
net10.0-android36.0
- Routeables (>= 1.0.0)
- Uno.WinUI (>= 6.7.135)
-
net10.0-ios26.0
- Routeables (>= 1.0.0)
- Uno.WinUI (>= 6.7.135)
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 | 41 | 10/25/2026 |