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
LeakDetectorState
Gets the navigation leak detector state.
public NavigationLeakDetectorState LeakDetectorState { get; }
Property Value
Mapping
Gets a dictionary which maps a page model type to corresponding page type.
public IReadOnlyDictionary<Type, Type> Mapping { get; }
Property Value
MenuImage
Gets the image used to display a navigation menu button on root pages.
public ImageSource? MenuImage { get; }
Property Value
NavigationIntentBehavior
Gets the navigation intent behavior.
public NavigationIntentBehavior NavigationIntentBehavior { get; }
Property Value
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
Returns
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
pageModelTypeTypeType of the page model interface.
pageModelImplementationTypeTypeType of the page model implementation.
pageTypeTypeType of the page.
Returns
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
Type Parameters
TPageType 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
Type Parameters
TPageModelType of the page model.
TPageType 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
Type Parameters
TPageModelType of the page model.
TPageModelImplementationType of the page model implementation.
TPageType of the page.
WithBackImage(ImageSource)
Sets back navigation image.
public NavigationConfigurator WithBackImage(ImageSource imageSource)
Parameters
imageSourceImageSourceImage to use for back navigation button.
Returns
WithLeakDetectorState(NavigationLeakDetectorState)
Sets the navigation leak detector state.
public NavigationConfigurator WithLeakDetectorState(NavigationLeakDetectorState state)
Parameters
stateNavigationLeakDetectorStateWhether the leak detector should be enabled or not.
Returns
WithMenuImage(ImageSource)
Sets back navigation image.
public NavigationConfigurator WithMenuImage(ImageSource imageSource)
Parameters
imageSourceImageSourceImage to use for the back navigation button.
Returns
WithNavigationIntentBehavior(NavigationIntentBehavior)
Defines how lifecycle events should be handled when intent is detected.
public NavigationConfigurator WithNavigationIntentBehavior(NavigationIntentBehavior behavior)
Parameters
behaviorNavigationIntentBehaviorThe behavior to use.