Table of Contents

Class ScaffoldToolbarItemButton

Namespace
Nalu
Assembly
Nalu.Maui.Scaffold.dll

One primary toolbar item in the nav bar: its icon (24dp, centered in a 44dp tap target) when IconImageSource is set, its Text otherwise — the native toolbar convention, with the text always serving as the accessibility description. A tap activates the item exactly as a native toolbar would (its Command and Clicked); a disabled item is dimmed and inert. Follows the item's text, icon and enabled state live.

public sealed class ScaffoldToolbarItemButton : Border, INotifyPropertyChanged, IVisualTreeElement, IEffectControlProvider, IToolTipElement, IContextFlyoutElement, IAnimatable, IViewController, IVisualElementController, IElementController, IGestureController, IGestureRecognizers, IPropertyMapperView, IHotReloadableView, IReplaceableView, IBorderView, IContentView, IView, IElement, ITransform, IPadding, ICrossPlatformLayout, IBorderStroke, IStroke
Inheritance
ScaffoldToolbarItemButton
Implements
Inherited Members
Extension Methods

Remarks

Colors: an explicitly set (or styled) TextColor wins, then the effective Foreground, then the built-in default. It colors the text — and a FontImageSource icon declared WITHOUT a color, which is tinted like a native template glyph; any other icon renders exactly as given. Style it with <Style TargetType="nalu:ScaffoldToolbarItemButton">.

Constructors

ScaffoldToolbarItemButton()

Initializes the button.

public ScaffoldToolbarItemButton()

Fields

FontAttributesProperty

Bindable property for FontAttributes.

public static readonly BindableProperty FontAttributesProperty

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

ItemProperty

Bindable property for Item.

public static readonly BindableProperty ItemProperty

Field Value

BindableProperty

PressedBrushProperty

Bindable property for PressedBrush.

public static readonly BindableProperty PressedBrushProperty

Field Value

BindableProperty

TextColorProperty

Bindable property for TextColor.

public static readonly BindableProperty TextColorProperty

Field Value

BindableProperty

Properties

FontAttributes

Gets or sets the text font attributes.

public FontAttributes FontAttributes { get; set; }

Property Value

FontAttributes

FontFamily

Gets or sets the text font family.

public string? FontFamily { get; set; }

Property Value

string

FontSize

Gets or sets the text font size.

public double FontSize { get; set; }

Property Value

double

Item

Gets or sets the toolbar item this button renders and activates.

public ToolbarItem? Item { get; set; }

Property Value

ToolbarItem

PressedBrush

Gets or sets the press-feedback brush (a pill-shaped pulse filling the tap target). When not set, a translucent tint of the effective text color is used.

public Brush? PressedBrush { get; set; }

Property Value

Brush

TextColor

Gets or sets the text (and untinted-font-icon) color. When not set (directly or via style), the effective Foreground applies.

public Color TextColor { get; set; }

Property Value

Color

Methods

OnBindingContextChanged()

Invoked whenever the binding context of the View changes.

protected override void OnBindingContextChanged()

Remarks

This method can be overridden to add class handling for this event. Overrides must call the base method.