Class ScaffoldRoot
- Namespace
- Nalu
- Assembly
- Nalu.Maui.Scaffold.dll
A root destination hosting an independent navigation stack: the root page (created lazily from PageType through the Nalu navigation engine — own DI scope, page-model lifecycle, destroyable while not displayed) plus the pages pushed onto it, preserved while the root is not selected. Its identity in absolute navigation derives from the page type.
public class ScaffoldRoot : Element, INotifyPropertyChanged, IElementController, IVisualTreeElement, IEffectControlProvider, IToolTipElement, IContextFlyoutElement, IElement
- Inheritance
-
ScaffoldRoot
- Implements
- Inherited Members
- Extension Methods
Fields
CurrentIconProperty
Bindable property for CurrentIcon (read-only).
public static readonly BindableProperty CurrentIconProperty
Field Value
IconProperty
Bindable property for Icon.
public static readonly BindableProperty IconProperty
Field Value
IsSelectedProperty
Bindable property for IsSelected (read-only).
public static readonly BindableProperty IsSelectedProperty
Field Value
IsVisibleProperty
Bindable property for IsVisible.
public static readonly BindableProperty IsVisibleProperty
Field Value
SelectedIconProperty
Bindable property for SelectedIcon.
public static readonly BindableProperty SelectedIconProperty
Field Value
TitleProperty
Bindable property for Title.
public static readonly BindableProperty TitleProperty
Field Value
Properties
CurrentIcon
Gets the icon the chrome should currently display: SelectedIcon while selected (when set), Icon otherwise. Read-only, recomputed whenever IsSelected, Icon or SelectedIcon change — bind tab templates directly to it.
public ImageSource? CurrentIcon { get; }
Property Value
Icon
Gets or sets the icon used by the default tab bar template.
public ImageSource? Icon { get; set; }
Property Value
IsSelected
Gets whether this root is its owning area's CurrentRoot. Read-only, updated by the navigation engine; observable via binding — the styling hook for tab templates (highlight state, SelectedIcon swap).
public bool IsSelected { get; }
Property Value
IsVisible
Gets or sets whether this destination is shown by the chrome. Defaults to true. A non-visible root is omitted from the default tab bar / flyout templates, but its route stays fully navigable (programmatic and absolute navigation still work).
public bool IsVisible { get; set; }
Property Value
PageType
Gets or sets the root page type — the page, or its registered page-model type
(AddPage/AddPages). Required: scaffold initialization throws when unset.
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)]
public Type? PageType { get; set; }
Property Value
SelectCommand
Gets the parameterless command selecting this root through the navigation engine
(preserved-stack restore, active-root-pops-to-root, guards always run) — the selection
hook for custom tab bar and flyout templates alike: with the root as binding context,
Command="{Binding SelectCommand}" is all a template needs.
CanExecute is false while ANY selection on the owning scaffold is navigating
(all roots' commands disable together, so a second tap can't race the first) and the
command no-ops while the root is not part of a presented Scaffold.
public ICommand SelectCommand { get; }
Property Value
SelectedIcon
Gets or sets the icon used by the default tab bar template while this root is selected (e.g. the filled variant of Icon). Falls back to Icon when not set.
public ImageSource? SelectedIcon { get; set; }
Property Value
Title
Gets or sets the display title used by the default tab bar template.
public string? Title { get; set; }