Share via


NavigationManager Class

Definition

Provides an abstraction for querying and managing URI navigation.

public ref class NavigationManager abstract
public abstract class NavigationManager
type NavigationManager = class
Public MustInherit Class NavigationManager
Inheritance
NavigationManager

Constructors

NavigationManager()

Properties

BaseUri

Gets or sets the current base URI. The BaseUri is always represented as an absolute URI in string form with trailing slash. Typically this corresponds to the 'href' attribute on the document's <base> element.

HistoryEntryState

Gets or sets the state associated with the current navigation.

Uri

Gets or sets the current URI. The Uri is always represented as an absolute URI in string form.

Methods

EnsureInitialized()

Allows derived classes to lazily self-initialize. Implementations that support lazy-initialization should override this method and call Initialize(String, String).

HandleLocationChangingHandlerException(Exception, LocationChangingContext)

Handles exceptions thrown in location changing handlers.

Initialize(String, String)

Called to initialize BaseURI and current URI before these values are used for the first time. Override EnsureInitialized() and call this method to dynamically calculate these values.

NavigateTo(String, Boolean, Boolean)

Navigates to the specified URI.

NavigateTo(String, Boolean)

Navigates to the specified URI.

NavigateTo(String, NavigationOptions)

Navigates to the specified URI.

NavigateToCore(String, Boolean)

Navigates to the specified URI.

NavigateToCore(String, NavigationOptions)

Navigates to the specified URI.

NotifyLocationChanged(Boolean)

Triggers the LocationChanged event with the current URI value.

NotifyLocationChangingAsync(String, String, Boolean)

Notifies the registered handlers of the current location change.

Refresh(Boolean)

Refreshes the current page via request to the server.

RegisterLocationChangingHandler(Func<LocationChangingContext,ValueTask>)

Registers a handler to process incoming navigation events.

SetNavigationLockState(Boolean)

Sets whether navigation is currently locked. If it is, then implementations should not update Uri and call NotifyLocationChanged(Boolean) until they have first confirmed the navigation by calling NotifyLocationChangingAsync(String, String, Boolean).

ToAbsoluteUri(String)

Converts a relative URI into an absolute one (by resolving it relative to the current absolute URI).

ToBaseRelativePath(String)

Given a base URI (e.g., one previously returned by BaseUri), converts an absolute URI into one relative to the base URI prefix.

Events

LocationChanged

An event that fires when the navigation location has changed.

Extension Methods

GetUriWithQueryParameter(NavigationManager, String, Boolean)

Returns a URI that is constructed by updating Uri with a single parameter added or updated.

GetUriWithQueryParameter(NavigationManager, String, DateOnly)

Returns a URI that is constructed by updating Uri with a single parameter added or updated.

GetUriWithQueryParameter(NavigationManager, String, DateTime)

Returns a URI that is constructed by updating Uri with a single parameter added or updated.

GetUriWithQueryParameter(NavigationManager, String, Decimal)

Returns a URI that is constructed by updating Uri with a single parameter added or updated.

GetUriWithQueryParameter(NavigationManager, String, Double)

Returns a URI that is constructed by updating Uri with a single parameter added or updated.

GetUriWithQueryParameter(NavigationManager, String, Guid)

Returns a URI that is constructed by updating Uri with a single parameter added or updated.

GetUriWithQueryParameter(NavigationManager, String, Int32)

Returns a URI that is constructed by updating Uri with a single parameter added or updated.

GetUriWithQueryParameter(NavigationManager, String, Int64)

Returns a URI that is constructed by updating Uri with a single parameter added or updated.

GetUriWithQueryParameter(NavigationManager, String, Nullable<Boolean>)

Returns a URI that is constructed by updating Uri with a single parameter added, updated, or removed.

GetUriWithQueryParameter(NavigationManager, String, Nullable<DateOnly>)

Returns a URI that is constructed by updating Uri with a single parameter added, updated, or removed.

GetUriWithQueryParameter(NavigationManager, String, Nullable<DateTime>)

Returns a URI that is constructed by updating Uri with a single parameter added, updated, or removed.

GetUriWithQueryParameter(NavigationManager, String, Nullable<Decimal>)

Returns a URI that is constructed by updating Uri with a single parameter added, updated, or removed.

GetUriWithQueryParameter(NavigationManager, String, Nullable<Double>)

Returns a URI that is constructed by updating Uri with a single parameter added, updated, or removed.

GetUriWithQueryParameter(NavigationManager, String, Nullable<Guid>)

Returns a URI that is constructed by updating Uri with a single parameter added, updated, or removed.

GetUriWithQueryParameter(NavigationManager, String, Nullable<Int32>)

Returns a URI that is constructed by updating Uri with a single parameter added, updated, or removed.

GetUriWithQueryParameter(NavigationManager, String, Nullable<Int64>)

Returns a URI that is constructed by updating Uri with a single parameter added, updated, or removed.

GetUriWithQueryParameter(NavigationManager, String, Nullable<Single>)

Returns a URI that is constructed by updating Uri with a single parameter added, updated, or removed.

GetUriWithQueryParameter(NavigationManager, String, Nullable<TimeOnly>)

Returns a URI that is constructed by updating Uri with a single parameter added, updated, or removed.

GetUriWithQueryParameter(NavigationManager, String, Single)

Returns a URI that is constructed by updating Uri with a single parameter added or updated.

GetUriWithQueryParameter(NavigationManager, String, String)

Returns a URI that is constructed by updating Uri with a single parameter added, updated, or removed.

GetUriWithQueryParameter(NavigationManager, String, TimeOnly)

Returns a URI that is constructed by updating Uri with a single parameter added or updated.

GetUriWithQueryParameters(NavigationManager, IReadOnlyDictionary<String,Object>)

Returns a URI constructed from Uri with multiple parameters added, updated, or removed.

GetUriWithQueryParameters(NavigationManager, String, IReadOnlyDictionary<String,Object>)

Returns a URI constructed from uri except with multiple parameters added, updated, or removed.

NavigateToLogin(NavigationManager, String, InteractiveRequestOptions)

Initiates a login operation by navigating to the login endpoint.

NavigateToLogin(NavigationManager, String)

Initiates a login operation by navigating to the login endpoint.

NavigateToLogout(NavigationManager, String, String)

Initiates a logout operation by navigating to the log out endpoint.

NavigateToLogout(NavigationManager, String)

Initiates a logout operation by navigating to the log out endpoint.

Applies to