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
isAbsoluteboolTells whether this is an absolute navigation.
behaviorNavigationBehavior?Specifies a custom navigation behavior.
Fields
IntentProperty
Defines the intent property.
public static readonly BindableProperty IntentProperty
Field Value
PageTypeProperty
Gets or sets the page model to be used for the current ShellContent.
public static readonly BindableProperty PageTypeProperty
Field Value
Properties
Behavior
Defines the navigation behavior.
public NavigationBehavior? Behavior { get; }
Property Value
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
IsAbsolute
Gets a value indicating whether the navigation is absolute.
public bool IsAbsolute { get; }
Property Value
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
indexintThe index.
Property Value
Path
Gets the path to navigate to.
public string Path { get; }
Property Value
Methods
Absolute(NavigationBehavior?)
Creates a fluent AbsoluteNavigation builder.
public static IAbsoluteNavigationInitialBuilder Absolute(NavigationBehavior? behavior = null)
Parameters
behaviorNavigationBehavior?Applies a specific behavior to this navigation instead of using the default one.
Returns
Add(INavigationSegment)
Adds an item to the ICollection<T>.
public void Add(INavigationSegment item)
Parameters
itemINavigationSegmentThe 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
itemINavigationSegmentThe object to locate in the ICollection<T>.
Returns
- bool
true if
itemis 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
arrayINavigationSegment[]The one-dimensional Array that is the destination of the elements copied from ICollection<T>. The Array must have zero-based indexing.
arrayIndexintThe zero-based index in
arrayat which copying begins.
Exceptions
- ArgumentNullException
arrayis null.- ArgumentOutOfRangeException
arrayIndexis less than 0.- ArgumentException
The number of elements in the source ICollection<T> is greater than the available space from
arrayIndexto the end of the destinationarray.
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
bindableBindableObjectThe ShellContent.
Returns
IndexOf(INavigationSegment)
Determines the index of a specific item in the IList<T>.
public int IndexOf(INavigationSegment item)
Parameters
itemINavigationSegmentThe object to locate in the IList<T>.
Returns
- int
The index of
itemif 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
indexintThe zero-based index at which
itemshould be inserted.itemINavigationSegmentThe object to insert into the IList<T>.
Exceptions
- ArgumentOutOfRangeException
indexis 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
behaviorNavigationBehavior?Applies a specific behavior to this navigation instead of using the default one.
Returns
Remove(INavigationSegment)
Removes the first occurrence of a specific object from the ICollection<T>.
public bool Remove(INavigationSegment item)
Parameters
itemINavigationSegmentThe object to remove from the ICollection<T>.
Returns
- bool
true if
itemwas successfully removed from the ICollection<T>; otherwise, false. This method also returns false ifitemis 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
indexintThe zero-based index of the item to remove.
Exceptions
- ArgumentOutOfRangeException
indexis 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
bindableBindableObjectThe ShellContent.
valueTypeType 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.