No description
Find a file
Marcel van der Heide 47a29db4ce
All checks were successful
Build Avalon.Views.Navigation / build (push) Successful in 2m17s
Merge pull request 'chore(deps): update all non-major dependencies' (#9) from renovate/all-minor-patch into main
Reviewed-on: #9
2026-06-21 08:58:29 +02:00
.forgejo/workflows chore(deps): update git.dutches.de/dutch/workflow-dotnet:9.0-10.0 docker digest to a06338b 2026-06-02 06:03:35 +00:00
Avalon.Views.Navigation chore(deps): update all non-major dependencies 2026-06-19 20:17:52 +00:00
Avalon.Views.Navigation.Avalonia chore(deps): update avalonia monorepo to v12 2026-06-06 00:03:33 +00:00
.gitignore Initial commit 2026-02-13 21:00:33 +01:00
Avalon.Views.Navigation.sln Initial commit 2026-02-13 21:00:33 +01:00
LICENSE Initial commit 2026-02-13 21:00:33 +01:00
nuget.config Initial commit 2026-02-13 21:00:33 +01:00
README.md Initial commit 2026-02-13 21:00:33 +01:00
renovate.json feat: add renovate 2026-02-13 21:19:51 +01:00

Avalon

Avalon provides reusable features and components to kickstart crossplatform applications with AvaloniaUI and MAUI (later on).

Library Decription AvaloniaUI MAUI
Avalon.Core Core library with basic cross-framework implementations and abstractions.
Avalon.Views.Core Core library containing basic view related implementations and abstractions.
Avalon.Views.Navigation Simple navigation service.
Avalon.Views.PopUp (planned) Simple popup service.
Avalon.Views.Controls (planned) Reusable pages and controls.

Note: MAUI support is planned, but currenly not scheduled.

Note: Always use the .Avalonia or .MAUI packages.

Avalon.Views.Navigation

This library provides implementations for view locating and animated navigation.

Features

ViewLocator

// Create the ViewLocator - a service locator may be passed optionally
var locator = new AvaloniaViewLocator();

// Resolve view
var view = locator.ResolveView<MainView, MainViewModel>()

Navigation

// Usage within another ViewModel:

// Push the resolved view 
Navigation.PushAsync(view)
    
// Resolve a view and push simultaniuisly
Navigation.PushAsync<MyView, MyViewModel>()

Available methods

  • PushAsync
  • PopAsync
  • PopToRootAsync
  • SetRootAsync

Passing data on navigation

To pass data to another object when navigating, pass an instance of NavigationData (or custom implementation of INavigationData) to one of the available navigation methods. The target object must either implement the INavigable or the IElementWithVm interface.

Initialization

Ensure that .UseViewHelper() is invoked as part of your AppBuilder initialization to activate the librarys functionality.

public static AppBuilder BuildAvaloniaApp()
    => AppBuilder.Configure<App>()
        .UsePlatformDetect()
        .UseViewHelper() // <- Add this line
        .WithInterFont()
        .LogToTrace();

License

MIT