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.

Fields

TabBarScrimViewProperty

Gets or sets a scrim view which will be laid out on top of the navigation area, sharing the same safe area insets.

public static readonly BindableProperty TabBarScrimViewProperty

Field Value

BindableProperty

TabBarViewProperty

Gets or sets the custom tab bar view to be used for the current Microsoft.Maui.Controls.ShellItem (TabBar or FlyoutItem).

public static readonly BindableProperty TabBarViewProperty

Field Value

BindableProperty

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.

GetTabBarScrimView(BindableObject)

Gets the custom scrim view to be used for the current Microsoft.Maui.Controls.ShellItem.

public static View? GetTabBarScrimView(BindableObject bindable)

Parameters

bindable BindableObject

The Microsoft.Maui.Controls.ShellItem (TabBar or FlyoutItem).

Returns

View

GetTabBarView(BindableObject)

Gets the custom tab bar view to be used for the current Microsoft.Maui.Controls.ShellItem.

public static View? GetTabBarView(BindableObject bindable)

Parameters

bindable BindableObject

The Microsoft.Maui.Controls.ShellItem (TabBar or FlyoutItem).

Returns

View

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.

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.

SetTabBarScrimView(BindableObject, View?)

Sets the custom scrim view to be used for the current Microsoft.Maui.Controls.ShellItem.

public static void SetTabBarScrimView(BindableObject bindable, View? value)

Parameters

bindable BindableObject

The Microsoft.Maui.Controls.ShellItem (TabBar or FlyoutItem).

value View

The custom tab bar view.

SetTabBarView(BindableObject, View?)

Sets the custom tab bar view to be used for the current Microsoft.Maui.Controls.ShellItem.

public static void SetTabBarView(BindableObject bindable, View? value)

Parameters

bindable BindableObject

The Microsoft.Maui.Controls.ShellItem (TabBar or FlyoutItem).

value View

The custom tab bar view.

Events

NavigationEvent

Occurs when a navigation event is triggered.

public event EventHandler<NavigationLifecycleEventArgs>? NavigationEvent

Event Type

EventHandler<NavigationLifecycleEventArgs>