Table of Contents

Class ScaffoldTabBarView

Namespace
Nalu
Assembly
Nalu.Maui.Scaffold.dll

The default Nalu tab bar component: a floating pill bar rendering one ScaffoldTabBarItemView per visible ScaffoldRoot (built from its title, icons, visibility and badge), with fixed ItemWidth slots and a trailing "More" item collecting the roots that don't fit (shown in a ScaffoldTabBarOverflowView above the bar). Created automatically as the default value of TabBarViewProperty — style it or replace it entirely with any custom view.

public sealed class ScaffoldTabBarView : Grid, INotifyPropertyChanged, IEffectControlProvider, IToolTipElement, IContextFlyoutElement, IAnimatable, IViewController, IVisualElementController, IElementController, IGestureController, IGestureRecognizers, IPropertyMapperView, IHotReloadableView, IReplaceableView, IBindableLayout, IVisualTreeElement, IGridLayout, ILayout, IView, IElement, ITransform, IContainer, IList<IView>, ICollection<IView>, IEnumerable<IView>, IEnumerable, ISafeAreaView, IPadding, ICrossPlatformLayout
Inheritance
ScaffoldTabBarView
Implements
Inherited Members
Extension Methods

Remarks

The template splits into one component per styling concern, each carrying real default values overridden by plain implicit styles: this class owns the BAR itself (pill container + layout input + "More" content), ScaffoldTabBarItemView owns item and badge appearance (bar items and overflow rows alike), ScaffoldTabBarOverflowView owns the overflow panel surface. Theming is ordinary MAUI:

<Style TargetType="nalu:ScaffoldTabBarView">
    <Setter Property="BarBackground" Value="{AppThemeBinding Light=..., Dark=...}" />
</Style>
<Style TargetType="nalu:ScaffoldTabBarItemView">
    <Setter Property="SelectedTextColor" Value="{StaticResource Accent}" />
</Style>

Icons render untinted (avatars work; monochrome tinting is expressed on the root's own ImageSource). The component resolves its ScaffoldTabBar from its logical parent when the scaffold presents it.

Constructors

ScaffoldTabBarView()

Initializes the default tab bar component. Item content builds once the view is parented to a ScaffoldTabBar.

public ScaffoldTabBarView()

Fields

BadgeTextProperty

Attached property holding the badge text displayed on a ScaffoldRoot's tab item (and its overflow row). Null or empty hides the badge.

public static readonly BindableProperty BadgeTextProperty

Field Value

BindableProperty

BarBackgroundProperty

Bindable property for BarBackground.

public static readonly BindableProperty BarBackgroundProperty

Field Value

BindableProperty

BarCornerRadiusProperty

Bindable property for BarCornerRadius.

public static readonly BindableProperty BarCornerRadiusProperty

Field Value

BindableProperty

BarMarginProperty

Bindable property for BarMargin.

public static readonly BindableProperty BarMarginProperty

Field Value

BindableProperty

BarPaddingProperty

Bindable property for BarPadding.

public static readonly BindableProperty BarPaddingProperty

Field Value

BindableProperty

BarShadowProperty

Bindable property for BarShadow.

public static readonly BindableProperty BarShadowProperty

Field Value

BindableProperty

ItemWidthProperty

Bindable property for ItemWidth.

public static readonly BindableProperty ItemWidthProperty

Field Value

BindableProperty

OverflowIconProperty

Bindable property for OverflowIcon.

public static readonly BindableProperty OverflowIconProperty

Field Value

BindableProperty

OverflowTitleProperty

Bindable property for OverflowTitle.

public static readonly BindableProperty OverflowTitleProperty

Field Value

BindableProperty

Properties

BarBackground

Gets or sets the background brush of the floating bar pill.

public Brush? BarBackground { get; set; }

Property Value

Brush

BarCornerRadius

Gets or sets the corner radius of the floating bar pill.

public double BarCornerRadius { get; set; }

Property Value

double

BarMargin

Gets or sets the margin around the floating bar pill, relative to the safe area (the bottom margin is measured from the top of the system inset). Part of the bar's safe-area footprint contribution to the hosted page. Drives the internal inset-consuming host's padding — style THIS, not Padding.

public Thickness BarMargin { get; set; }

Property Value

Thickness

BarPadding

Gets or sets the padding inside the floating bar pill (mirrored by the overflow panel).

public Thickness BarPadding { get; set; }

Property Value

Thickness

BarShadow

Gets or sets the shadow of the floating bar pill.

public Shadow BarShadow { get; set; }

Property Value

Shadow

ItemWidth

Gets or sets the fixed width of one tab item. This is the single layout input: as many items as fit the container width are shown in the bar, the rest move to the overflow panel behind a trailing "More" item. The bar hugs its content (width = shown items × ItemWidth + padding), centered.

public double ItemWidth { get; set; }

Property Value

double

OverflowIcon

Gets or sets the icon of the trailing "More" item. A built-in ••• glyph is drawn when not set.

public ImageSource? OverflowIcon { get; set; }

Property Value

ImageSource

OverflowTitle

Gets or sets the label of the trailing "More" item.

public string? OverflowTitle { get; set; }

Property Value

string

Methods

GetBadgeText(BindableObject)

Gets the badge text attached to a root.

public static string? GetBadgeText(BindableObject bindable)

Parameters

bindable BindableObject

Returns

string

OnParentSet()

Raises the (internal) ParentSet event.

protected override void OnParentSet()

Remarks

Will set the NavigationProxy's inner navigation object to closest topmost element capable of handling navigation calls.

See Also

SetBadgeText(BindableObject, string?)

Sets the badge text attached to a root.

public static void SetBadgeText(BindableObject bindable, string? value)

Parameters

bindable BindableObject
value string