Table of Contents

Class NaluShell

Namespace
Nalu
Assembly
Nalu.Maui.Navigation.dll

Nalu shell, the shell navigation you wanted.

public abstract class NaluShell : Shell, INotifyPropertyChanged, IVisualTreeElement, IEffectControlProvider, IToolTipElement, IContextFlyoutElement, IAnimatable, ILayout, IElementConfiguration<Page>, ISafeAreaView, ITitledElement, IToolbarElement, IShellController, IPageController, IVisualElementController, IElementController, IPageContainer<Page>, IFlyoutView, IView, IElement, ITransform, IDisposable
Inheritance
NaluShell
Implements
Inherited Members
Extension Methods

Constructors

NaluShell(INavigationService, string, object?)

Initializes a new instance of the NaluShell class.

protected NaluShell(INavigationService navigationService, string rootPageRoute, object? rootPageIntent = null)

Parameters

navigationService INavigationService

The navigation service.

rootPageRoute string

The custom route used to identify the root shell content.

rootPageIntent object

The optional intent to be provided to the initial root page.

NaluShell(INavigationService, Type, object?)

Initializes a new instance of the NaluShell class.

protected NaluShell(INavigationService navigationService, Type rootPageType, object? rootPageIntent = null)

Parameters

navigationService INavigationService

The navigation service.

rootPageType Type

The initial root page to be used.

rootPageIntent object

The optional intent to be provided to the initial root page.

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Dispose(bool)

Disposes the resources used by the NaluShell.

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

True when disposing managed resources.

OnBackButtonPressed()

Determines the behavior when the back button of the page is pressed.

protected override bool OnBackButtonPressed()

Returns

bool

true when the back navigation was handled by the override, otherwise false.

Remarks

Application developers can override this method to provide behavior when the back button is pressed. When overridden to handle or cancel the navigation yourself, this method should return true.

This only works on Android and UWP for the hardware back button. On iOS, this method will never be called because there is no hardware back button.

OnNavigating(ShellNavigatingEventArgs)

protected override sealed void OnNavigating(ShellNavigatingEventArgs args)

Parameters

args ShellNavigatingEventArgs

OnNavigating(NaluShellNavigatingEventArgs)

Triggered when a navigation is about to happen.

protected virtual void OnNavigating(NaluShellNavigatingEventArgs args)

Parameters

args NaluShellNavigatingEventArgs

Remarks

Gives the ability to cancel the navigation.

OnParentSet()

Called when the page's Parent property has changed.

protected override void OnParentSet()

Exceptions

InvalidOperationException

Thrown when the page's Microsoft.Maui.Controls.Element.RealParent can't be casted to Page or BaseShellItem.

Events

NavigationEvent

Occurs when a navigation event is triggered.

public event EventHandler<NavigationLifecycleEventArgs>? NavigationEvent

Event Type

EventHandler<NavigationLifecycleEventArgs>