Class ScaffoldTabBar
- Namespace
- Nalu
- Assembly
- Nalu.Maui.Scaffold.dll
A ScaffoldArea rendering a Nalu-drawn tab bar that switches between its roots.
public class ScaffoldTabBar : ScaffoldArea, INotifyPropertyChanged, IElementController, IVisualTreeElement, IEffectControlProvider, IToolTipElement, IContextFlyoutElement, IElement
- Inheritance
-
ScaffoldTabBar
- Implements
- Inherited Members
- Extension Methods
Remarks
The bar itself is just a view: TabBarView defaults to a ScaffoldTabBarView (the Telegram-style pill template carrying the whole styling surface) and can be replaced with any custom view — this class carries only structure and behavior, none of the default template's styling.
Tab selection always routes through the Nalu navigation engine (guards apply); switching to another root restores its preserved navigation stack; tapping the active tab pops that root's stack back to the root page. Custom bars call SelectRootAsync(ScaffoldRoot).
Fields
TabBarViewProperty
Bindable property for TabBarView. Defaults to a fresh ScaffoldTabBarView per tab bar (created lazily via the default value factory).
public static readonly BindableProperty TabBarViewProperty
Field Value
Properties
TabBarView
Gets or sets the view presented as the tab bar. Defaults to the Nalu ScaffoldTabBarView; replace it with any custom view — the view's binding context is this ScaffoldTabBar (exposing the roots and their selection state); call SelectRootAsync(ScaffoldRoot) to trigger tab selection.
public View? TabBarView { get; set; }
Property Value
Methods
SelectRootAsync(ScaffoldRoot)
Selects the given root through the Nalu navigation engine: switching to another root
restores its preserved navigation stack; selecting the current root pops its stack back
to the root page. Guards and lifecycle events always run — a guarded page can cancel the
switch. Calls while ANY selection on the owning scaffold is in flight are ignored (the
same scaffold-wide gate SelectCommand reports via
CanExecute).
public Task<bool> SelectRootAsync(ScaffoldRoot root)
Parameters
rootScaffoldRootThe root to select; must belong to this tab bar's Roots.
Returns
- Task<bool>
True when the selection navigation completed; false when a guard canceled it, another selection is already in flight, or the tab bar is not hosted in a Scaffold.
ShowPanelAsync(View, Brush?, bool)
Presents a panel anchored above the bottom chrome with the tab bar kept interactive — the same primitive the default template's "More" overflow uses, for custom tab bars (e.g. a special button opening its own panel). See ShowTabBarPanelAsync(View, Brush?, bool) for the full contract.
public Task ShowPanelAsync(View content, Brush? scrim = null, bool closeIfOpened = true)
Parameters
contentViewThe panel view (reusable; horizontal margin insets it).
scrimBrushThe scrim brush; a theme-aware translucent black when omitted.
closeIfOpenedboolToggle (true, default) vs replace-in-place (false) when a panel is already presented.