Class Scaffold
- Namespace
- Nalu
- Assembly
- Nalu.Maui.Scaffold.dll
Mobile-only (iOS/Android) application root replacing MAUI Shell, driven by Nalu.Maui.Navigation.
[ContentProperty("Areas")]
public class Scaffold : Page, INotifyPropertyChanged, IVisualTreeElement, IEffectControlProvider, IToolTipElement, IContextFlyoutElement, IAnimatable, ILayout, IPageController, IVisualElementController, IElementController, IElementConfiguration<Page>, IView, ITransform, ITitledElement, IElement, IToolbarElement, ISafeAreaView, IPageContainer<Page>, IDisposable
- Inheritance
-
Scaffold
- Implements
- Inherited Members
- Extension Methods
Remarks
The scaffold owns the whole chrome (navigation bar, tab bar, flyouts) as Nalu-drawn virtual
views, hosts one navigation stack per ScaffoldRoot, and implements the
navigation host contracts so the standard Nalu fluent navigation API
(Navigation.Relative() / Navigation.Absolute()) drives it unchanged.
Structure: Scaffold → ScaffoldArea (or its ScaffoldTabBar specialization) → ScaffoldRoot, each root hosting an independent navigation stack. There are no developer-facing routes: absolute navigation is type-based and resolves its destination from the registered root page types.
<nalu:Scaffold>
<nalu:ScaffoldTabBar>
<nalu:ScaffoldRoot Title="Home" Icon="home.png" PageType="pages:FeedPage" />
<nalu:ScaffoldRoot Title="Search" Icon="search.png" PageType="pages:SearchPage" />
</nalu:ScaffoldTabBar>
<!-- Terse form: implicitly wrapped into a single-root ScaffoldArea at parse time. -->
<nalu:ScaffoldRoot PageType="pages:SettingsPage" />
</nalu:Scaffold>
Constructors
Scaffold()
Initializes a new Scaffold.
public Scaffold()
Fields
CurrentAreaProperty
Bindable property for CurrentArea (read-only).
public static readonly BindableProperty CurrentAreaProperty
Field Value
CurrentPageProperty
Bindable property for CurrentPage.
public static readonly BindableProperty CurrentPageProperty
Field Value
FlyoutEndButtonVisibilityProperty
Attached property controlling the nav bar's end-drawer button. Same semantics as FlyoutStartButtonVisibilityProperty.
public static readonly BindableProperty FlyoutEndButtonVisibilityProperty
Field Value
FlyoutEndModeProperty
Attached property controlling the end-edge drawer's behavior. Same semantics as FlyoutStartModeProperty.
public static readonly BindableProperty FlyoutEndModeProperty
Field Value
FlyoutEndOptionsProperty
Bindable property for FlyoutEndOptions.
public static readonly BindableProperty FlyoutEndOptionsProperty
Field Value
FlyoutEndProperty
Attached property holding the end-edge (trailing) flyout content. Same resolution rules as FlyoutStartProperty.
public static readonly BindableProperty FlyoutEndProperty
Field Value
FlyoutStartButtonVisibilityProperty
Attached property controlling the nav bar's start-drawer button (Auto default: shown at stack roots only). Resolution, most specific set value wins: current Page → current ScaffoldArea → the Scaffold.
public static readonly BindableProperty FlyoutStartButtonVisibilityProperty
Field Value
FlyoutStartModeProperty
Attached property controlling the start-edge drawer's behavior (ScaffoldFlyoutMode). Resolution, most specific SET value wins: the topmost pushed page that SET it, older pushed pages, the root page, the current ScaffoldArea, then the Scaffold. Defaults to Disabled — a drawer requires content AND an explicitly enabling mode.
public static readonly BindableProperty FlyoutStartModeProperty
Field Value
FlyoutStartOptionsProperty
Bindable property for FlyoutStartOptions.
public static readonly BindableProperty FlyoutStartOptionsProperty
Field Value
FlyoutStartProperty
Attached property holding the start-edge (leading) flyout content.
Resolution walks the current stack as an override chain, most specific first: the
topmost pushed page that SET the value, older pushed pages, the root page, the current
ScaffoldArea, then the Scaffold itself — so a page's drawer
survives pushes that don't override it. Content alone does not enable a drawer: the
matching ScaffoldFlyoutMode must also be non-Disabled.
The content is a plain MAUI view, logically parented to the element it is attached to
(a per-page flyout inherits that page's BindingContext).
public static readonly BindableProperty FlyoutStartProperty
Field Value
IsFlyoutEndOpenProperty
Bindable property for IsFlyoutEndOpen (read-only).
public static readonly BindableProperty IsFlyoutEndOpenProperty
Field Value
IsFlyoutStartOpenProperty
Bindable property for IsFlyoutStartOpen (read-only).
public static readonly BindableProperty IsFlyoutStartOpenProperty
Field Value
IsNavBarVisibleProperty
Attached property controlling navigation bar visibility for a Page. Defaults to true. Visibility changes animate and reach the page as a safe-area inset change, not a page relayout.
public static readonly BindableProperty IsNavBarVisibleProperty
Field Value
KeyboardModeProperty
Attached property declaring how a surface reacts to the soft keyboard (ScaffoldKeyboardMode). On a Page it is the page's policy — unset pages inherit the value declared on the Scaffold itself, and the scaffold's default is Resize (the keyboard is a bottom inset for every page out of the box; declare None to opt a page out, or globally on the scaffold). On the content of a bottom sheet or a popup it is that overlay's policy (call-site options win over it), Resize when unset.
public static readonly BindableProperty KeyboardModeProperty
Field Value
NavBarBackgroundProperty
Attached property painting the nav bar SURFACE — the strip behind the bar, never the bar view's own background. Resolution, most specific SET value wins: Page → current ScaffoldArea → the Scaffold → the built-in default.
public static readonly BindableProperty NavBarBackgroundProperty
Field Value
Remarks
The nav bar appearance is expressed as attached properties on real elements rather than as a settable object. The bar used to be ONE view shared by every page, so per-page styling could not live on it and needed a side-channel object; now that each page realizes its own bar from NavBarTemplateProperty that reason is gone. Set on a page — an element already in the visual tree — these bind, resolve dynamic resources and animate from scroll with no machinery of their own, and a Style setter gives every page its own VALUE instead of sharing one mutable object.
NavBarForegroundProperty
Attached property giving every bar primitive (glyphs, and the title unless NavBarTitleForegroundProperty overrides it) its color fallback — a color set directly or by style ON a primitive still wins. Null (the default) leaves primitives on their built-in color. Same resolution as NavBarBackgroundProperty.
public static readonly BindableProperty NavBarForegroundProperty
Field Value
NavBarOffsetYProperty
Attached property translating the nav bar surface vertically (0 by default): the channel for scroll-driven collapses. Same resolution as NavBarBackgroundProperty.
public static readonly BindableProperty NavBarOffsetYProperty
Field Value
NavBarOpacityProperty
Attached property setting the nav bar surface opacity (1 by default). Same resolution as NavBarBackgroundProperty. Pair a transparent surface with NavBarOverlapsContentProperty for a bar that materializes on scroll.
public static readonly BindableProperty NavBarOpacityProperty
Field Value
NavBarOverlapsContentProperty
Attached property (per Page, default false) laying the page out UNDER the
nav bar: the bar's footprint is not applied as a top inset — content starts at the very
top edge (the page's own SafeAreaEdges decides how it treats the raw system
insets) and the bar draws over it. Pair with a page-level
NavBarBackgroundProperty (e.g. a transparent brush) for full-bleed
headers whose bar materializes on scroll.
public static readonly BindableProperty NavBarOverlapsContentProperty
Field Value
NavBarTemplateProperty
Attached property holding the navigation bar TEMPLATE. Resolution, most specific wins: current Page → current ScaffoldArea → the Scaffold itself, whose value defaults to a template of ScaffoldNavBarView (the built-in bar carrying the whole styling surface). Set it to null on the Scaffold to suppress the bar entirely. The mounted view's binding context is its own page's ScaffoldNavBarContext.
public static readonly BindableProperty NavBarTemplateProperty
Field Value
Remarks
A TEMPLATE rather than a view, because the bar belongs to the page: every page realizes its own instance. A shared view instance cannot work — during any transition two bars are on screen at once, and MAUI would re-parent the single view to whichever page mounted it last, blanking the other.
NavBarTitleForegroundProperty
Attached property giving the nav bar TITLE its color. Resolved level by level: the first of Page → current ScaffoldArea → Scaffold that sets either this or NavBarForegroundProperty wins, its title color first.
public static readonly BindableProperty NavBarTitleForegroundProperty
Field Value
PageModeProperty
Attached property declaring a page's presentation mode: Default, Modal or DismissableModal. Modal pages enter from the bottom, cover the tab bar and show a title-only nav bar. Plain Modal blocks system back entirely (dismissal is programmatic); DismissableModal adds the close button and lets the Android system back pop through the engine.
public static readonly BindableProperty PageModeProperty
Field Value
PageTransitionProperty
Attached property declaring the push/pop transition of a Page. Set on a page it overrides the scaffold-level value; set on the Scaffold itself it is the default for every page. Resolution: page-attached value → SlideFromBottom for modal pages → scaffold-level value → Default. The spec belongs to the PUSHED page: it enters with it and leaves with it reversed (pop and the iOS interactive edge swipe replay it backwards).
public static readonly BindableProperty PageTransitionProperty
Field Value
ScrollRampEndProperty
Attached property providing the default RampEnd of every
ScrollValueExtension/ThemeScrollValueExtension usage on the
page (resolution: page → current area → scaffold → 100).
public static readonly BindableProperty ScrollRampEndProperty
Field Value
ScrollRampStartProperty
Attached property providing the default RampStart of every
ScrollValueExtension/ThemeScrollValueExtension usage on the
page (resolution: page → current area → scaffold → 0): declare the interpolation ramp
ONCE, use it everywhere on the page.
public static readonly BindableProperty ScrollRampStartProperty
Field Value
ScrollTrackerProperty
Attached property (per Page) pointing at the page's primary scrollable view: its NATIVE scroll position feeds ScrollOffset and IsScrolledUnder per frame — the channel behind scroll-driven chrome (large-title collapses, bar fade-ins). The referenced view need not BE the scrollable: its platform subtree is searched a few levels deep for the actual scrollable platform view (component roots often wrap it — e.g. VirtualScroll).
public static readonly BindableProperty ScrollTrackerProperty
Field Value
SystemBarStyleProperty
Attached property declaring the system status bar (and Android navigation bar) ICON style over a page's content (default Auto). Resolution, most specific set value wins: current Page → current ScaffoldArea → the Scaffold — but an OPAQUE chrome surface covering the status-bar region (a materialized nav bar, an open flyout) always wins by its own brightness: the declaration describes the page's content, not the chrome above it. Declare it on full-bleed pages whose top content brightness the scaffold cannot know (photos, custom drawings).
public static readonly BindableProperty SystemBarStyleProperty
Field Value
TabBarVisibilityProperty
Attached property controlling tab bar visibility for a Page: Visible (default), Hidden, or Auto (hidden while the current stack has pushed pages). Visibility changes animate and reach the page as a safe-area inset change.
public static readonly BindableProperty TabBarVisibilityProperty
Field Value
TitleViewProperty
Attached property replacing the navigation bar title view for a Page. The page's Title is used when no title view is set.
public static readonly BindableProperty TitleViewProperty
Field Value
TransitionNameProperty
Attached property marking a view as a SHARED ELEMENT (the android:transitionName
analogue): when the outgoing and incoming pages of a push/pop both contain a view with
the same name, the element animates between its two geometries during the transition
(images morph their aspect crop natively; other views transform-match with a cross-fade).
public static readonly BindableProperty TransitionNameProperty
Field Value
Properties
Areas
Gets the destination areas composing the application structure.
public IList<ScaffoldArea> Areas { get; }
Property Value
CurrentArea
Gets the selected area (defaults to the first one). Read-only: selection changes only through the Nalu navigation engine (absolute navigation or flyout interaction), so lifecycle events and leaving guards can never be bypassed. Observable via binding.
public ScaffoldArea? CurrentArea { get; }
Property Value
CurrentPage
Gets the page currently presented by the scaffold: the top of the current root's navigation stack. Read-only and observable via binding; null only before the scaffold has initialized. Also exposed through IPageContainer<T>.
public Page? CurrentPage { get; }
Property Value
FlyoutEnd
Gets or sets the global end-edge flyout content (see FlyoutEndProperty).
public View? FlyoutEnd { get; set; }
Property Value
FlyoutEndOptions
Gets or sets the end-edge drawer styling; null uses the built-in defaults.
public ScaffoldFlyoutOptions? FlyoutEndOptions { get; set; }
Property Value
FlyoutStart
Gets or sets the global start-edge flyout content (see FlyoutStartProperty).
public View? FlyoutStart { get; set; }
Property Value
FlyoutStartOptions
Gets or sets the start-edge drawer styling; null uses the built-in defaults.
public ScaffoldFlyoutOptions? FlyoutStartOptions { get; set; }
Property Value
HasTabBarPanel
Gets whether a tab bar panel is currently presented.
public bool HasTabBarPanel { get; }
Property Value
InitialIntent
Gets or sets the intent delivered to the startup root page (see
InitialRootPageType): its model receives it through the standard
IEnteringAware<TIntent> / IAppearingAware<TIntent> pipeline,
exactly as if the root had been navigated to with that intent. Optional.
public object? InitialIntent { get; set; }
Property Value
InitialRootPageType
Gets or sets the page type of the root to open at startup. Optional: when not set, the first root of the first area is opened. Accepts the page type or its registered page-model type; must match the PageType of one of the scaffold's roots, or startup throws InvalidOperationException.
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)]
public Type? InitialRootPageType { get; set; }
Property Value
IsFlyoutEndOpen
Gets whether the end-edge drawer is currently presented.
public bool IsFlyoutEndOpen { get; }
Property Value
IsFlyoutStartOpen
Gets whether the start-edge drawer is currently presented.
public bool IsFlyoutStartOpen { get; }
Property Value
KeyboardState
Gets the observable soft-keyboard state (IsVisible, Height) fed by the platform keyboard geometry — bind through KeyboardBindingExtension / KeyboardBindings.
public ScaffoldKeyboardState KeyboardState { get; }
Property Value
NavBarContext
Gets the observable state of the CURRENT page's nav bar (title, back/drawer button availability, commands) — "what the bar shows now".
public ScaffoldNavBarContext NavBarContext { get; }
Property Value
Remarks
Each page owns its own context (the bar travels with its page, and during a transition
two are alive); this forwards to the current page's, and raises
PropertyChanged("NavBarContext") when the current page changes so bindings
through it re-evaluate. A bar's BindingContext — and every
{nalu:NavBarBinding} inside a page or its bar — is that PAGE's own context, not
this one; use this only when "whatever is on screen now" is genuinely what you mean.
Methods
CloseFlyoutAsync()
Closes the open flyout, if any (other overlays are unaffected).
public Task CloseFlyoutAsync()
Returns
CloseTabBarPanelAsync()
Closes the presented tab bar panel, if any.
public Task CloseTabBarPanelAsync()
Returns
ComputeConstraintForView(View)
Views hosted by the scaffold as logical children (popup and sheet content, scrims, drawers,
panels, bar views) are placed by the presenters, not by the page: none of them may be
Fixed ("fills the page" — the verdict a TemplatedPage
gives its Fill/Fill children) because a Fixed root stops MAUI's platform
measure-invalidation walk at itself and re-lays out in its CURRENT bounds, so a popup whose
content grows after presentation would never reach the presenter. The nav bar host lives in
a strip that fixes its WIDTH only (its height follows the bar): HorizontallyFixed.
protected override LayoutConstraint ComputeConstraintForView(View view)
Parameters
viewView
Returns
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Dispose(bool)
Disposes the scaffold's live pages, DI scopes and page models.
protected virtual void Dispose(bool disposing)
Parameters
disposingboolTrue when disposing managed resources.
FindNavBarContext(Element?)
Resolves the ScaffoldNavBarContext of the page the given element belongs to (walks the logical parents) — the code-behind counterpart of NavBarBindingExtension, e.g. to observe ScrollOffset for scroll-driven chrome. Bar content (a hosted title view included) resolves through the bar it is mounted in, page content through its page; an element in a scaffold but in no page falls back to the current page's context. Null while the element is not attached to a scaffold's tree yet.
public static ScaffoldNavBarContext? FindNavBarContext(Element? element)
Parameters
elementElement
Returns
GetFlyoutEnd(BindableObject)
Gets the end-edge flyout content attached to an element.
public static View? GetFlyoutEnd(BindableObject bindable)
Parameters
bindableBindableObject
Returns
GetFlyoutEndButtonVisibility(BindableObject)
Gets the end-drawer button policy attached to an element.
public static ScaffoldFlyoutButtonVisibility GetFlyoutEndButtonVisibility(BindableObject bindable)
Parameters
bindableBindableObject
Returns
GetFlyoutEndMode(BindableObject)
Gets the end-edge drawer mode attached to an element.
public static ScaffoldFlyoutMode GetFlyoutEndMode(BindableObject bindable)
Parameters
bindableBindableObject
Returns
GetFlyoutStart(BindableObject)
Gets the start-edge flyout content attached to an element.
public static View? GetFlyoutStart(BindableObject bindable)
Parameters
bindableBindableObject
Returns
GetFlyoutStartButtonVisibility(BindableObject)
Gets the start-drawer button policy attached to an element.
public static ScaffoldFlyoutButtonVisibility GetFlyoutStartButtonVisibility(BindableObject bindable)
Parameters
bindableBindableObject
Returns
GetFlyoutStartMode(BindableObject)
Gets the start-edge drawer mode attached to an element.
public static ScaffoldFlyoutMode GetFlyoutStartMode(BindableObject bindable)
Parameters
bindableBindableObject
Returns
GetIsNavBarVisible(BindableObject)
Gets whether the navigation bar is visible for a page.
public static bool GetIsNavBarVisible(BindableObject bindable)
Parameters
bindableBindableObject
Returns
GetKeyboardMode(BindableObject)
Gets the declared soft-keyboard mode of a surface (null = unset, resolves to Resize).
public static ScaffoldKeyboardMode? GetKeyboardMode(BindableObject bindable)
Parameters
bindableBindableObject
Returns
GetNavBarBackground(BindableObject)
Gets the nav bar surface brush attached to an element.
public static Brush? GetNavBarBackground(BindableObject bindable)
Parameters
bindableBindableObject
Returns
GetNavBarForeground(BindableObject)
Gets the nav bar foreground color attached to an element.
public static Color? GetNavBarForeground(BindableObject bindable)
Parameters
bindableBindableObject
Returns
GetNavBarOffsetY(BindableObject)
Gets the nav bar surface vertical offset attached to an element.
public static double GetNavBarOffsetY(BindableObject bindable)
Parameters
bindableBindableObject
Returns
GetNavBarOpacity(BindableObject)
Gets the nav bar surface opacity attached to an element.
public static double GetNavBarOpacity(BindableObject bindable)
Parameters
bindableBindableObject
Returns
GetNavBarOverlapsContent(BindableObject)
Gets whether the nav bar draws over the page instead of insetting it.
public static bool GetNavBarOverlapsContent(BindableObject bindable)
Parameters
bindableBindableObject
Returns
GetNavBarTemplate(BindableObject)
Gets the navigation bar template attached to an element.
public static DataTemplate? GetNavBarTemplate(BindableObject bindable)
Parameters
bindableBindableObject
Returns
GetNavBarTitleForeground(BindableObject)
Gets the nav bar title color attached to an element.
public static Color? GetNavBarTitleForeground(BindableObject bindable)
Parameters
bindableBindableObject
Returns
GetPageMode(BindableObject)
Gets the presentation mode attached to bindable.
public static ScaffoldPageMode GetPageMode(BindableObject bindable)
Parameters
bindableBindableObject
Returns
GetPageTransition(BindableObject)
Gets the page transition attached to bindable.
public static ScaffoldPageTransition? GetPageTransition(BindableObject bindable)
Parameters
bindableBindableObject
Returns
GetScrollRampEnd(BindableObject)
Gets the default interpolation ramp end attached to an element.
public static double GetScrollRampEnd(BindableObject bindable)
Parameters
bindableBindableObject
Returns
GetScrollRampStart(BindableObject)
Gets the default interpolation ramp start attached to an element.
public static double GetScrollRampStart(BindableObject bindable)
Parameters
bindableBindableObject
Returns
GetScrollTracker(BindableObject)
Gets the tracked scrollable attached to a page.
public static View? GetScrollTracker(BindableObject bindable)
Parameters
bindableBindableObject
Returns
GetSystemBarStyle(BindableObject)
Gets the declared system bar icon style of an element.
public static ScaffoldSystemBarStyle GetSystemBarStyle(BindableObject bindable)
Parameters
bindableBindableObject
Returns
GetTabBarVisibility(BindableObject)
Gets the tab bar visibility policy attached to a page.
public static ScaffoldTabBarVisibility GetTabBarVisibility(BindableObject bindable)
Parameters
bindableBindableObject
Returns
GetTitleView(BindableObject)
Gets the navigation bar title view attached to a page.
public static View? GetTitleView(BindableObject bindable)
Parameters
bindableBindableObject
Returns
GetTransitionName(BindableObject)
Gets the shared-element transition name attached to a view.
public static string? GetTransitionName(BindableObject bindable)
Parameters
bindableBindableObject
Returns
OnBackButtonPressed()
Routes back requests arriving through MAUI's legacy/synthetic channel (e.g. automation drivers, platforms without dispatcher-based back) into the navigation engine, matching the behavior of the Android dispatcher callback. Guards and lifecycle always run.
protected override bool OnBackButtonPressed()
Returns
- bool
True when a pop was dispatched.
OpenFlyoutAsync(ScaffoldFlyoutSide)
Opens the flyout for the given side, resolving its content through the stack override chain (see FlyoutStartProperty). No-op when the drawer does not exist — no content configured at any level, its mode resolves to Disabled (or Auto while pages are pushed) — or the scaffold is not presented yet, or a flyout is already open.
public Task OpenFlyoutAsync(ScaffoldFlyoutSide side)
Parameters
sideScaffoldFlyoutSideThe edge the flyout slides in from.
Returns
SetFlyoutEnd(BindableObject, View?)
Sets the end-edge flyout content attached to an element.
public static void SetFlyoutEnd(BindableObject bindable, View? value)
Parameters
bindableBindableObjectvalueView
SetFlyoutEndButtonVisibility(BindableObject, ScaffoldFlyoutButtonVisibility)
Sets the end-drawer button policy attached to an element.
public static void SetFlyoutEndButtonVisibility(BindableObject bindable, ScaffoldFlyoutButtonVisibility value)
Parameters
bindableBindableObjectvalueScaffoldFlyoutButtonVisibility
SetFlyoutEndMode(BindableObject, ScaffoldFlyoutMode)
Sets the end-edge drawer mode attached to an element.
public static void SetFlyoutEndMode(BindableObject bindable, ScaffoldFlyoutMode value)
Parameters
bindableBindableObjectvalueScaffoldFlyoutMode
SetFlyoutStart(BindableObject, View?)
Sets the start-edge flyout content attached to an element.
public static void SetFlyoutStart(BindableObject bindable, View? value)
Parameters
bindableBindableObjectvalueView
SetFlyoutStartButtonVisibility(BindableObject, ScaffoldFlyoutButtonVisibility)
Sets the start-drawer button policy attached to an element.
public static void SetFlyoutStartButtonVisibility(BindableObject bindable, ScaffoldFlyoutButtonVisibility value)
Parameters
bindableBindableObjectvalueScaffoldFlyoutButtonVisibility
SetFlyoutStartMode(BindableObject, ScaffoldFlyoutMode)
Sets the start-edge drawer mode attached to an element.
public static void SetFlyoutStartMode(BindableObject bindable, ScaffoldFlyoutMode value)
Parameters
bindableBindableObjectvalueScaffoldFlyoutMode
SetIsNavBarVisible(BindableObject, bool)
Sets whether the navigation bar is visible for a page.
public static void SetIsNavBarVisible(BindableObject bindable, bool value)
Parameters
bindableBindableObjectvaluebool
SetKeyboardMode(BindableObject, ScaffoldKeyboardMode?)
Sets the declared soft-keyboard mode of a surface.
public static void SetKeyboardMode(BindableObject bindable, ScaffoldKeyboardMode? value)
Parameters
bindableBindableObjectvalueScaffoldKeyboardMode?
SetNavBarBackground(BindableObject, Brush?)
Sets the nav bar surface brush attached to an element.
public static void SetNavBarBackground(BindableObject bindable, Brush? value)
Parameters
bindableBindableObjectvalueBrush
SetNavBarForeground(BindableObject, Color?)
Sets the nav bar foreground color attached to an element.
public static void SetNavBarForeground(BindableObject bindable, Color? value)
Parameters
bindableBindableObjectvalueColor
SetNavBarOffsetY(BindableObject, double)
Sets the nav bar surface vertical offset attached to an element.
public static void SetNavBarOffsetY(BindableObject bindable, double value)
Parameters
bindableBindableObjectvaluedouble
SetNavBarOpacity(BindableObject, double)
Sets the nav bar surface opacity attached to an element.
public static void SetNavBarOpacity(BindableObject bindable, double value)
Parameters
bindableBindableObjectvaluedouble
SetNavBarOverlapsContent(BindableObject, bool)
Sets whether the nav bar draws over the page instead of insetting it.
public static void SetNavBarOverlapsContent(BindableObject bindable, bool value)
Parameters
bindableBindableObjectvaluebool
SetNavBarTemplate(BindableObject, DataTemplate?)
Sets the navigation bar template attached to an element.
public static void SetNavBarTemplate(BindableObject bindable, DataTemplate? value)
Parameters
bindableBindableObjectvalueDataTemplate
SetNavBarTitleForeground(BindableObject, Color?)
Sets the nav bar title color attached to an element.
public static void SetNavBarTitleForeground(BindableObject bindable, Color? value)
Parameters
bindableBindableObjectvalueColor
SetPageMode(BindableObject, ScaffoldPageMode)
Sets the presentation mode attached to bindable.
public static void SetPageMode(BindableObject bindable, ScaffoldPageMode value)
Parameters
bindableBindableObjectvalueScaffoldPageMode
SetPageTransition(BindableObject, ScaffoldPageTransition?)
Sets the page transition attached to bindable.
public static void SetPageTransition(BindableObject bindable, ScaffoldPageTransition? value)
Parameters
bindableBindableObjectvalueScaffoldPageTransition
SetScrollRampEnd(BindableObject, double)
Sets the default interpolation ramp end attached to an element.
public static void SetScrollRampEnd(BindableObject bindable, double value)
Parameters
bindableBindableObjectvaluedouble
SetScrollRampStart(BindableObject, double)
Sets the default interpolation ramp start attached to an element.
public static void SetScrollRampStart(BindableObject bindable, double value)
Parameters
bindableBindableObjectvaluedouble
SetScrollTracker(BindableObject, View?)
Sets the tracked scrollable attached to a page.
public static void SetScrollTracker(BindableObject bindable, View? value)
Parameters
bindableBindableObjectvalueView
SetSystemBarStyle(BindableObject, ScaffoldSystemBarStyle)
Sets the declared system bar icon style of an element.
public static void SetSystemBarStyle(BindableObject bindable, ScaffoldSystemBarStyle value)
Parameters
bindableBindableObjectvalueScaffoldSystemBarStyle
SetTabBarVisibility(BindableObject, ScaffoldTabBarVisibility)
Sets the tab bar visibility policy attached to a page.
public static void SetTabBarVisibility(BindableObject bindable, ScaffoldTabBarVisibility value)
Parameters
bindableBindableObjectvalueScaffoldTabBarVisibility
SetTitleView(BindableObject, View?)
Sets the navigation bar title view attached to a page.
public static void SetTitleView(BindableObject bindable, View? value)
Parameters
bindableBindableObjectvalueView
SetTransitionName(BindableObject, string?)
Sets the shared-element transition name attached to a view.
public static void SetTransitionName(BindableObject bindable, string? value)
Parameters
bindableBindableObjectvaluestring
ShowBottomSheetAsync(View, ScaffoldBottomSheetOptions?)
Presents a bottom sheet in the top overlay layer: it slides from the bottom edge over any chrome (only system insets shape the presentation area — the bottom inset pads the content clear of the home indicator). The content is wrapped in a ScaffoldBottomSheetView handling drag between detents and pull-down-to-close entirely at the virtual view layer.
public Task<IScaffoldPopup> ShowBottomSheetAsync(View content, ScaffoldBottomSheetOptions? options = null)
Parameters
contentViewThe sheet content. Attached to this scaffold's element tree while presented (styles and BindingContext flow); treated as single-use — handlers are disconnected on close.
optionsScaffoldBottomSheetOptionsThe presentation options; a content-hugging, pull-down-closable sheet when omitted.
Returns
- Task<IScaffoldPopup>
The lifetime handle: close it, await Closed, or scope it with
await using. When the scaffold is not presented yet, the returned handle is already closed (IsOpen is false).
ShowPopupAsync(View, ScaffoldPopupOptions?)
Presents a popup in the top overlay layer — above all chrome and previously presented
overlays (popups stack in open order, each above its own scrim). Placement, scrim and
dismissal policy come from options; the tab bar's safe-area footprint
never affects the presentation area (only system insets do).
public Task<IScaffoldPopup> ShowPopupAsync(View content, ScaffoldPopupOptions? options = null)
Parameters
contentViewThe popup view, measured within the safe presentation area. Attached to this scaffold's element tree while presented (styles and BindingContext flow); treated as single-use — its handlers are disconnected when the popup closes.
optionsScaffoldPopupOptionsThe presentation options; sensible popup defaults when omitted.
Returns
- Task<IScaffoldPopup>
The lifetime handle: close it, await Closed, or scope it with
await using. When the scaffold is not presented yet, the returned handle is already closed (IsOpen is false).
ShowTabBarPanelAsync(View, Brush?, bool)
Presents a panel anchored above the bottom chrome — the primitive behind the default tab bar template's "More" overflow, available to custom tab bars too. A fullscreen scrim renders BELOW the tab bar in z-order: the bar stays undimmed and interactive (a bar tap dismisses the panel and performs its own action). Scrim tap, system back and any navigation dismiss the panel.
public Task ShowTabBarPanelAsync(View content, Brush? scrim = null, bool closeIfOpened = true)
Parameters
contentViewThe panel view; its horizontal Margin insets it from the container edges. The view is attached to this scaffold's element tree while presented (unless it already has a parent) and is reusable across presentations — handlers are not disconnected on close.
scrimBrushThe scrim brush; a theme-aware translucent black when omitted.
closeIfOpenedboolWhen true (the default) and a panel is already presented, the call dismisses it (toggle). When false, the presented panel's content is REPLACED in place — content crossfades, the scrim brush updates, no scrim re-animation.
Returns
Events
FlyoutEndClosed
Occurs when the end-edge drawer finished closing.
public event EventHandler? FlyoutEndClosed
Event Type
FlyoutEndOpened
Occurs when the end-edge drawer finished opening.
public event EventHandler? FlyoutEndOpened
Event Type
FlyoutStartClosed
Occurs when the start-edge drawer finished closing.
public event EventHandler? FlyoutStartClosed
Event Type
FlyoutStartOpened
Occurs when the start-edge drawer finished opening.
public event EventHandler? FlyoutStartOpened
Event Type
NavigationEvent
Occurs when a navigation lifecycle event is triggered.
public event EventHandler<NavigationLifecycleEventArgs>? NavigationEvent
Event Type
OverlayEvent
Occurs when an overlay (popup, bottom sheet, tab bar panel, flyout) is presented or closed — one Presented/Closed pair per overlay instance, whatever opened or closed it, after the fact. Overlays are not pages: they never show up in NavigationEvent; this is the hook for overlay-level analytics and diagnostics.
public event EventHandler<ScaffoldOverlayEventArgs>? OverlayEvent