Table of Contents

Interface INavigationService

Namespace
Icy.Navigation
Assembly
IcyUI.dll

Navigates a Frame between Pages, keeping a back/forward history.

public interface INavigationService
Extension Methods

Properties

CurrentPage

Gets the page currently hosted by this service's Frame, or null if none has been navigated to yet.

Page? CurrentPage { get; }

Property Value

Page

Methods

Clear()

Clears the back/forward history and the frame's current content.

void Clear()

Navigate(string)

Loads the page at path through the asset pipeline and navigates to it.

Page? Navigate(string path)

Parameters

path string

A path resolved against the owning Frame's configuration's default asset context.

Returns

Page

The page navigated to, or null if path doesn't exist.

NavigateTo(Page)

Navigates to an already-constructed page instance.

Page NavigateTo(Page page)

Parameters

page Page

The page to navigate to.

Returns

Page

page, or the frame's unchanged CurrentPage if a Navigating handler canceled the navigation.

TryNavigateBack()

Navigates to the previous page in the back history, if any.

Page? TryNavigateBack()

Returns

Page

The page navigated to, or null if there is no back history, or a handler canceled it.

TryNavigateNext()

Navigates to the next page in the forward history, if any.

Page? TryNavigateNext()

Returns

Page

The page navigated to, or null if there is no forward history, or a handler canceled it.

Events

Navigating

Occurs before a navigation takes effect. Setting Cancel leaves the frame showing whatever it already was.

event EventHandler<NavigationEventArgs>? Navigating

Event Type

EventHandler<NavigationEventArgs>