NavigationSelectionOptions record

Namespace Runic.Navigation in Runic.Navigation 0.23.0

public sealed record NavigationSelectionOptions : IEquatable<NavigationSelectionOptions>

Inherits or implements IEquatable.

Configures a selection created by RunicNavigator.CreateSelection.

Constructors

NavigationSelectionOptions

public NavigationSelectionOptions()

No documentation.

Properties

Admission

public NavigationAdmission Admission { get; init; }

Gets how the selection admits a request while an earlier one runs, as NavigationRegionOptions.Admission does for a region. The default, NavigationAdmission.Supersede, lets a later request supersede earlier ones that have not committed.

RestoreRegion

public Func<NavigationSelection, NavigationRegion>? RestoreRegion { get; init; }

Gets the function that creates an empty region for a restored tab, or null (the default). RunicNavigator.RestoreAsync calls it, on the thread that restores, for each region of a NavigationSelectionPath beyond the selection's current NavigationSelection.Regions, restores the region's entries into it, and then adds it with NavigationSelection.Add in a model turn. It must return a new, empty region that the selection's owner owns, such as _ => navigator.CreateRegion<IDocumentPage>(this). Without it such regions are left out (NavigationRestoreIssueKind.MissingSelectionRegion).

SelectedIndex

public int SelectedIndex { get; init; }

Gets the index of the initially selected region; 0 by default. It is ignored when there are no regions.