Table of Contents

Class NavigationConfigurator

Namespace
Nalu
Assembly
Nalu.Maui.Navigation.dll

Provides a fluent API for configuring Nalu navigation.

public class NavigationConfigurator : INavigationConfiguration
Inheritance
NavigationConfigurator
Implements
Inherited Members

Properties

BackImage

Gets the image used to display a navigation back button on nested pages.

public ImageSource? BackImage { get; }

Property Value

ImageSource

LeakDetectorState

Gets the navigation leak detector state.

public NavigationLeakDetectorState LeakDetectorState { get; }

Property Value

NavigationLeakDetectorState

Mapping

Gets a dictionary which maps a page model type to corresponding page type.

public IReadOnlyDictionary<Type, Type> Mapping { get; }

Property Value

IReadOnlyDictionary<Type, Type>

MenuImage

Gets the image used to display a navigation menu button on root pages.

public ImageSource? MenuImage { get; }

Property Value

ImageSource

NavigationIntentBehavior

Gets the navigation intent behavior.

public NavigationIntentBehavior NavigationIntentBehavior { get; }

Property Value

NavigationIntentBehavior

Methods

AddPage(Type, Type)

Registers pageType as the view for pageModelType. Adds pageType and pageModelType as scoped services.

public NavigationConfigurator AddPage(Type pageModelType, Type pageType)

Parameters

pageModelType Type

Type of the page model.

pageType Type

Type of the page.

Returns

NavigationConfigurator

AddPage(Type, Type, Type)

Registers pageType as the view for pageModelType. Adds pageType and pageModelType as scoped services.

public NavigationConfigurator AddPage(Type pageModelType, Type pageModelImplementationType, Type pageType)

Parameters

pageModelType Type

Type of the page model interface.

pageModelImplementationType Type

Type of the page model implementation.

pageType Type

Type of the page.

Returns

NavigationConfigurator

AddPage<TPage>()

Registers TPage as a directly navigable page WITHOUT a page model (view-only mode): navigate to it with Navigation.Relative().Push<TPage>() (or use it as a root page type). The page itself is the navigation lifecycle target — implement IEnteringAware, ILeavingGuard, intent interfaces… directly on the page. Assigning a BindingContext explicitly hands the lifecycle over to it entirely (the standard MVVM contract); an inherited binding context does not. Adds TPage as a scoped service (a fresh instance per navigation, created in the page's own scope — constructor-inject services freely).

public NavigationConfigurator AddPage<TPage>() where TPage : Page

Returns

NavigationConfigurator

Type Parameters

TPage

Type of the page.

AddPage<TPageModel, TPage>()

Registers TPage as the view for TPageModel. Adds TPage and TPageModel as scoped services.

public NavigationConfigurator AddPage<TPageModel, TPage>() where TPageModel : class, INotifyPropertyChanged where TPage : ContentPage

Returns

NavigationConfigurator

Type Parameters

TPageModel

Type of the page model.

TPage

Type of the page.

AddPage<TPageModel, TPageModelImplementation, TPage>()

Registers TPage as the view for TPageModel. Adds TPage and TPageModel as scoped services.

public NavigationConfigurator AddPage<TPageModel, TPageModelImplementation, TPage>() where TPageModel : class, INotifyPropertyChanged where TPageModelImplementation : TPageModel where TPage : ContentPage

Returns

NavigationConfigurator

Type Parameters

TPageModel

Type of the page model.

TPageModelImplementation

Type of the page model implementation.

TPage

Type of the page.

WithBackImage(ImageSource)

Sets back navigation image.

public NavigationConfigurator WithBackImage(ImageSource imageSource)

Parameters

imageSource ImageSource

Image to use for back navigation button.

Returns

NavigationConfigurator

WithLeakDetectorState(NavigationLeakDetectorState)

Sets the navigation leak detector state.

public NavigationConfigurator WithLeakDetectorState(NavigationLeakDetectorState state)

Parameters

state NavigationLeakDetectorState

Whether the leak detector should be enabled or not.

Returns

NavigationConfigurator

WithMenuImage(ImageSource)

Sets back navigation image.

public NavigationConfigurator WithMenuImage(ImageSource imageSource)

Parameters

imageSource ImageSource

Image to use for the back navigation button.

Returns

NavigationConfigurator

WithNavigationIntentBehavior(NavigationIntentBehavior)

Defines how lifecycle events should be handled when intent is detected.

public NavigationConfigurator WithNavigationIntentBehavior(NavigationIntentBehavior behavior)

Parameters

behavior NavigationIntentBehavior

The behavior to use.

Returns

NavigationConfigurator