AsyncNavigation 1.1.0
See the version list below for details.
dotnet add package AsyncNavigation --version 1.1.0
NuGet\Install-Package AsyncNavigation -Version 1.1.0
<PackageReference Include="AsyncNavigation" Version="1.1.0" />
<PackageVersion Include="AsyncNavigation" Version="1.1.0" />
<PackageReference Include="AsyncNavigation" />
paket add AsyncNavigation --version 1.1.0
#r "nuget: AsyncNavigation, 1.1.0"
#:package AsyncNavigation@1.1.0
#addin nuget:?package=AsyncNavigation&version=1.1.0
#tool nuget:?package=AsyncNavigation&version=1.1.0
π AsyncNavigation
A lightweight asynchronous navigation framework based on Microsoft.Extensions.DependencyInjection
Try it online : demo
β¨ Features
Fully Asynchronous Navigation
Natively supportsasync/await, making navigation and asynchronous operations seamless and intuitive.Built-in DialogService
Provides asynchronous implementation for dialog navigation.Supports Cancellation
Built-inCancellationTokensupport allows safe cancellation of navigation at any time.Customizable Navigation Indicators
Developers can define custom indicators to visualize navigation states such as loading, error, or completed.Multiple Built-in Region Types
In addition to standard single-page navigation based onContentControl, also supportsItemsControlandTabControl.Minimal Dependencies
Depends only onMicrosoft.Extensions.DependencyInjection.Abstractions (>= 8.0).Framework-Agnostic
Works with any MVVM framework, giving developers complete freedom of choice.Support Native Aot
Fully supports Avalonia's Native AOT compilation and trimming, without any additional configuration required.RegionAdapter Extension Mechanism
Extend and customize navigation behaviors by implementing your ownRegionAdapter.Fine-grained Control Options
Offers rich configuration options to make navigation behavior align precisely with application needs.Lifecycle Management
Automatically handles view creation, caching, and release β effectively preventing memory leaks.Highly Abstract Core Layer
Core logic is encapsulated within abstractions, minimizing platform-specific code and improving testability.
π¦ Installation
WPF
dotnet add package AsyncNavigation.Wpf
Avaloniaui
dotnet add package AsyncNavigation.Avaloniaui
β‘ Get started
Region
Set Namespace
xmlns:an="https://github.com/NeverMorewd/AsyncNavigation"
Set RegionName
<ContentControl an:RegionManager.RegionName="MainRegion" />
ViewModel
<details> <summary>Code Examples</summary>
public class SampleViewModel : INavigationAware
{
public event AsyncEventHandler<AsyncEventArgs>? AsyncRequestUnloadEvent;
public virtual Task InitializeAsync(NavigationContext context)
{
return Task.CompletedTask;
}
public virtual Task<bool> IsNavigationTargetAsync(NavigationContext context)
{
return Task.FromResult(true);
}
public virtual async Task OnNavigatedFromAsync(NavigationContext context)
{
await Task.Delay(100, context.CancellationToken);
}
public virtual async Task OnNavigatedToAsync(NavigationContext context)
{
await Task.Delay(100, context.CancellationToken);
}
public virtual Task OnUnloadAsync(CancellationToken cancellationToken)
{
return Task.CompletedTask;
}
protected Task RequestUnloadAsync()
{
if (AsyncRequestUnloadEvent == null)
{
return Task.CompletedTask;
}
return AsyncRequestUnloadEvent!.Invoke(this, AsyncEventArgs.Empty);
}
}
</details>
Config
var services = new ServiceCollection();
services.AddNavigationSupport()
.RegisterView<AView, AViewModel>("AView")
.RegisterView<BView, BViewModel>("BView");
.RegisterNavigation<CView, NavigationAware>("CNavigation");
.RegisterDialog<CView, DialogAware>("CDialog");
.RegisterDialogWindow<AWindow, AViewModel>("AWindow");
Execute
<details> <summary>Code Examples</summary>
private readonly IRegionManager _regionManager;
private readonly IDialogService _dialogService;
public MainWindowViewModel(IRegionManager regionManager, IDialogService dialogService)
{
_regionManager = regionManager;
_dialogService = dialogService;
}
[ReactiveCommand]
private async Task AsyncNavigate(string param)
{
var result = await _regionManager.RequestNavigateAsync("MainRegion", "AView");
}
[ReactiveCommand]
private void Show(string param)
{
_dialogService.ShowView("AView", callback: result =>
{
Debug.WriteLine(result.Result);
});
}
[ReactiveCommand]
private void ShowWindow(string param)
{
var result = _dialogService.ShowWindowDialog(param);
}
[ReactiveCommand]
private async Task AsyncShowDialog(string param)
{
var result = await _dialogService.ShowViewDialogAsync("AView");
}
[ReactiveCommand]
private async Task GoForward()
{
await _regionManager.GoForward("MainRegion");
}
[ReactiveCommand]
private async Task GoBack()
{
await _regionManager.GoBack("MainRegion");
}
</details>
| Product | Versions 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 was computed. 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 was computed. 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. |
-
net8.0
NuGet packages (2)
Showing the top 2 NuGet packages that depend on AsyncNavigation:
| Package | Downloads |
|---|---|
|
AsyncNavigation.Avalonia
A lightweight asynchronous navigation framework based on Microsoft.Extensions.DependencyInjection |
|
|
AsyncNavigation.Wpf
A lightweight asynchronous navigation framework based on Microsoft.Extensions.DependencyInjection |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.0-beta | 104 | 3/20/2026 |
| 1.1.0 | 741 | 12/11/2025 |
| 1.0.1 | 210 | 10/30/2025 |
| 1.0.0 | 191 | 10/21/2025 |
| 0.0.2-beta | 172 | 10/17/2025 |
| 0.0.1-beta | 195 | 10/14/2025 |