Routeables.Uno 1.0.0

dotnet add package Routeables.Uno --version 1.0.0
                    
NuGet\Install-Package Routeables.Uno -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="Routeables.Uno" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Routeables.Uno" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Routeables.Uno" />
                    
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 Routeables.Uno --version 1.0.0
                    
#r "nuget: Routeables.Uno, 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 Routeables.Uno@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=Routeables.Uno&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Routeables.Uno&version=1.0.0
                    
Install as a Cake Tool

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" />.

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). See NoteView in Samples/XAnimals.Uno.
  • IMessageBoxService (DefaultMessageBoxService): pass your own to UseRouteablesServices(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 Frame or Uno.Extensions: do not mix them in one window.
  • Not trimmer-checked yet (IsAotCompatible is 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 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. 
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 41 10/25/2026