Table of Contents

Class ScaffoldTabBarItemView

Namespace
Nalu
Assembly
Nalu.Maui.Scaffold.dll

One item of the default tab bar template: untinted icon (or the built-in ••• glyph for the "More" item), optional badge, truncating label, and the rounded selection highlight. Selection visuals react to the root's IsSelected; the badge to the BadgeTextProperty attached value. The overflow panel reuses this same component, so bar items and overflow rows share one look.

public sealed class ScaffoldTabBarItemView : 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
ScaffoldTabBarItemView
Implements
Inherited Members
Extension Methods

Remarks

Instances are created by the template (one per visible root, plus "More") — the type is public purely as a styling surface:

<Style TargetType="nalu:ScaffoldTabBarItemView">
    <Setter Property="SelectedTextColor" Value="{StaticResource Accent}" />
</Style>

A Grid (not a Border): a Border clips its content to the stroke shape, cutting the badge's icon overlap — the selection pill is an inner background Border instead. Icon host, label and badge carry explicit dp heights so the bar measures IDENTICALLY on iOS and Android (platform text metrics differ otherwise).

Fields

BadgeBackgroundProperty

Bindable property for BadgeBackground.

public static readonly BindableProperty BadgeBackgroundProperty

Field Value

BindableProperty

BadgeFontSizeProperty

Bindable property for BadgeFontSize.

public static readonly BindableProperty BadgeFontSizeProperty

Field Value

BindableProperty

BadgeTextColorProperty

Bindable property for BadgeTextColor.

public static readonly BindableProperty BadgeTextColorProperty

Field Value

BindableProperty

FontFamilyProperty

Bindable property for FontFamily.

public static readonly BindableProperty FontFamilyProperty

Field Value

BindableProperty

FontSizeProperty

Bindable property for FontSize.

public static readonly BindableProperty FontSizeProperty

Field Value

BindableProperty

IconSizeProperty

Bindable property for IconSize.

public static readonly BindableProperty IconSizeProperty

Field Value

BindableProperty

SelectedTextColorProperty

Bindable property for SelectedTextColor.

public static readonly BindableProperty SelectedTextColorProperty

Field Value

BindableProperty

SelectionPillBackgroundProperty

Bindable property for SelectionPillBackground.

public static readonly BindableProperty SelectionPillBackgroundProperty

Field Value

BindableProperty

SelectionPillCornerRadiusProperty

Bindable property for SelectionPillCornerRadius.

public static readonly BindableProperty SelectionPillCornerRadiusProperty

Field Value

BindableProperty

TextColorProperty

Bindable property for TextColor.

public static readonly BindableProperty TextColorProperty

Field Value

BindableProperty

Properties

BadgeBackground

Gets or sets the badge background.

public Brush? BadgeBackground { get; set; }

Property Value

Brush

BadgeFontSize

Gets or sets the badge font size.

public double BadgeFontSize { get; set; }

Property Value

double

BadgeTextColor

Gets or sets the badge text color.

public Color BadgeTextColor { get; set; }

Property Value

Color

FontFamily

Gets or sets the font family of the label (and the badge).

public string? FontFamily { get; set; }

Property Value

string

FontSize

Gets or sets the label font size.

public double FontSize { get; set; }

Property Value

double

IconSize

Gets or sets the icon size (both dimensions). Icons render untinted.

public double IconSize { get; set; }

Property Value

double

SelectedTextColor

Gets or sets the label (and drawn ••• glyph) color while the item is selected.

public Color SelectedTextColor { get; set; }

Property Value

Color

SelectionPillBackground

Gets or sets the background of the rounded highlight painted while the item is selected.

public Brush? SelectionPillBackground { get; set; }

Property Value

Brush

SelectionPillCornerRadius

Gets or sets the corner radius of the selection highlight.

public double SelectionPillCornerRadius { get; set; }

Property Value

double

TextColor

Gets or sets the label (and drawn ••• glyph) color while the item is not selected.

public Color TextColor { get; set; }

Property Value

Color