Skip to content

INavigationService interface

Defined in

Namespace: CrissCross.Avalonia.UI Assembly: CrissCross.Avalonia.UI.dll Full name: CrissCross.Avalonia.UI.INavigationService Modifiers: public abstract

Summary

        Defines a contract for navigation services that manage navigation between pages or views within an application.
        Provides methods to navigate to pages by type or tag, manage the navigation stack, and interact with the navigation
        control and page service.
        

Applies to

net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net471

Remarks

Implementations of this interface enable decoupled navigation logic, allowing view models or other components to initiate navigation without direct references to UI elements. The interface supports navigation with or without associated data contexts and provides methods for hierarchical navigation scenarios. It is typically used in conjunction with an IPageService to resolve page instances and an INavigationView control to present navigation UI.

Methods

NameSummary
NavigateLets you navigate to the selected page based on it's type. Should be used with [IPageService](#
NavigateWithHierarchySynchronously adds an element to the navigation stack and navigates current navigation Frame to the page represented by the element.
GetNavigationControlProvides direct access to the control responsible for navigation.
SetNavigationControlLets you attach the control that represents the [INavigationView](#
SetPageServiceLets you attach the service that delivers page instances to [INavigationView](#
GoBackNavigates the NavigationView to the previous journal entry.
GoForwardNavigates the NavigationView to the next journal entry.

Extension members