Table of Contents

Class Navigation

Namespace
Nalu
Assembly
Nalu.Maui.Navigation.dll

Represents a navigation request.

public abstract class Navigation : BindableObject, INotifyPropertyChanged, IList<INavigationSegment>, ICollection<INavigationSegment>, INavigationInfo, IReadOnlyList<INavigationSegment>, IReadOnlyCollection<INavigationSegment>, IEnumerable<INavigationSegment>, IEnumerable
Inheritance
Navigation
Implements
Derived
Inherited Members
Extension Methods

Constructors

Navigation(bool, NavigationBehavior?)

Initializes a new instance of the Navigation class.

protected Navigation(bool isAbsolute, NavigationBehavior? behavior)

Parameters

isAbsolute bool

Tells whether this is an absolute navigation.

behavior NavigationBehavior?

Specifies a custom navigation behavior.

Fields

IntentProperty

Defines the intent property.

public static readonly BindableProperty IntentProperty

Field Value

BindableProperty

PageTypeProperty

Gets or sets the page model to be used for the current ShellContent.

public static readonly BindableProperty PageTypeProperty

Field Value

BindableProperty

Properties

Behavior

Defines the navigation behavior.

public NavigationBehavior? Behavior { get; }

Property Value

NavigationBehavior?

Count

Gets the number of elements contained in the ICollection<T>.

public int Count { get; }

Property Value

int

The number of elements contained in the ICollection<T>.

Intent

Gets the navigation intent.

public object? Intent { get; set; }

Property Value

object

IsAbsolute

Gets a value indicating whether the navigation is absolute.

public bool IsAbsolute { get; }

Property Value

bool

IsReadOnly

Gets a value indicating whether the ICollection<T> is read-only.

public bool IsReadOnly { get; }

Property Value

bool

true if the ICollection<T> is read-only; otherwise, false.

this[int]

Gets or sets the navigation action at the specific index.

public INavigationSegment this[int index] { get; set; }

Parameters

index int

The index.

Property Value

INavigationSegment

Path

Gets the path to navigate to.

public string Path { get; }

Property Value

string

Methods

Absolute(NavigationBehavior?)

Creates a fluent AbsoluteNavigation builder.

public static IAbsoluteNavigationInitialBuilder Absolute(NavigationBehavior? behavior = null)

Parameters

behavior NavigationBehavior?

Applies a specific behavior to this navigation instead of using the default one.

Returns

IAbsoluteNavigationInitialBuilder

Add(INavigationSegment)

Adds an item to the ICollection<T>.

public void Add(INavigationSegment item)

Parameters

item INavigationSegment

The object to add to the ICollection<T>.

Exceptions

NotSupportedException

The ICollection<T> is read-only.

Clear()

Removes all items from the ICollection<T>.

public void Clear()

Exceptions

NotSupportedException

The ICollection<T> is read-only.

Contains(INavigationSegment)

Determines whether the ICollection<T> contains a specific value.

public bool Contains(INavigationSegment item)

Parameters

item INavigationSegment

The object to locate in the ICollection<T>.

Returns

bool

true if item is found in the ICollection<T>; otherwise, false.

CopyTo(INavigationSegment[], int)

Copies the elements of the ICollection<T> to an Array, starting at a particular Array index.

public void CopyTo(INavigationSegment[] array, int arrayIndex)

Parameters

array INavigationSegment[]

The one-dimensional Array that is the destination of the elements copied from ICollection<T>. The Array must have zero-based indexing.

arrayIndex int

The zero-based index in array at which copying begins.

Exceptions

ArgumentNullException

array is null.

ArgumentOutOfRangeException

arrayIndex is less than 0.

ArgumentException

The number of elements in the source ICollection<T> is greater than the available space from arrayIndex to the end of the destination array.

GetEnumerator()

Returns an enumerator that iterates through the collection.

public IEnumerator<INavigationSegment> GetEnumerator()

Returns

IEnumerator<INavigationSegment>

An enumerator that can be used to iterate through the collection.

GetPageType(BindableObject)

Gets the page model to be used for the current ShellContent.

[TypeConverter(typeof(TypeTypeConverter))]
public static Type? GetPageType(BindableObject bindable)

Parameters

bindable BindableObject

The ShellContent.

Returns

Type

IndexOf(INavigationSegment)

Determines the index of a specific item in the IList<T>.

public int IndexOf(INavigationSegment item)

Parameters

item INavigationSegment

The object to locate in the IList<T>.

Returns

int

The index of item if found in the list; otherwise, -1.

Insert(int, INavigationSegment)

Inserts an item to the IList<T> at the specified index.

public void Insert(int index, INavigationSegment item)

Parameters

index int

The zero-based index at which item should be inserted.

item INavigationSegment

The object to insert into the IList<T>.

Exceptions

ArgumentOutOfRangeException

index is not a valid index in the IList<T>.

NotSupportedException

The IList<T> is read-only.

Relative(NavigationBehavior?)

Creates a fluent RelativeNavigation builder.

public static IRelativeNavigationInitialBuilder Relative(NavigationBehavior? behavior = null)

Parameters

behavior NavigationBehavior?

Applies a specific behavior to this navigation instead of using the default one.

Returns

IRelativeNavigationInitialBuilder

Remove(INavigationSegment)

Removes the first occurrence of a specific object from the ICollection<T>.

public bool Remove(INavigationSegment item)

Parameters

item INavigationSegment

The object to remove from the ICollection<T>.

Returns

bool

true if item was successfully removed from the ICollection<T>; otherwise, false. This method also returns false if item is not found in the original ICollection<T>.

Exceptions

NotSupportedException

The ICollection<T> is read-only.

RemoveAt(int)

Removes the IList<T> item at the specified index.

public void RemoveAt(int index)

Parameters

index int

The zero-based index of the item to remove.

Exceptions

ArgumentOutOfRangeException

index is not a valid index in the IList<T>.

NotSupportedException

The IList<T> is read-only.

SetPageType(BindableObject, Type?)

Sets the page model to be used for the current ShellContent.

[TypeConverter(typeof(TypeTypeConverter))]
public static void SetPageType(BindableObject bindable, Type? value)

Parameters

bindable BindableObject

The ShellContent.

value Type

Type of the page model.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.