Class ScaffoldNavBarContext
- Namespace
- Nalu
- Assembly
- Nalu.Maui.Scaffold.dll
The binding context of the mounted nav bar view (the default template or a custom
replacement): one observable object PER PAGE, created when the page enters a navigation
stack and live while that page's title, title view, binding context, scroll ramp or
flyout policies change. The page it describes never changes — during a transition two
contexts are alive and each bar shows its OWN page's state.
Custom bars bind to it directly (e.g. IsVisible="{Binding CanNavigateBack}",
Command="{Binding BackCommand}") — the same contract the built-in
ScaffoldBackButton, ScaffoldFlyoutButton and
ScaffoldNavBarTitle primitives consume.
public sealed class ScaffoldNavBarContext : INotifyPropertyChanged
- Inheritance
-
ScaffoldNavBarContext
- Implements
- Inherited Members
Properties
BackCommand
Pops the current page through the navigation engine — guards and lifecycle run. Cannot execute while a pop is already in flight.
public ICommand BackCommand { get; }
Property Value
CanNavigateBack
Gets whether back navigation is offered: the stack has at least one pushed page and the current page is not modal.
public bool CanNavigateBack { get; }
Property Value
Foreground
Gets the effective NavBarForegroundProperty: the color fallback of every primitive (title text, glyphs) — a color set directly or via style on a primitive wins over it. Null when no appearance in the chain sets one, in which case primitives use their built-in default color.
public Color? Foreground { get; }
Property Value
IsCloseButtonVisible
Gets whether the trailing close (X) button should show: DismissableModal pages.
public bool IsCloseButtonVisible { get; }
Property Value
IsFlyoutEndButtonVisible
Gets whether the end-drawer button should show: flyout content resolves, the page is not modal, and the ScaffoldFlyoutButtonVisibility policy allows it (by default only at the stack root).
public bool IsFlyoutEndButtonVisible { get; }
Property Value
IsFlyoutStartButtonVisible
Gets whether the start-drawer button should show: flyout content resolves, the page is not modal, and the ScaffoldFlyoutButtonVisibility policy allows it (by default only at the stack root).
public bool IsFlyoutStartButtonVisible { get; }
Property Value
IsModal
Gets whether the current page is a modal page (PageModeProperty).
public bool IsModal { get; }
Property Value
IsScrolledUnder
Gets whether the tracked content is scrolled down (offset above 0.5dp).
public bool IsScrolledUnder { get; }
Property Value
OpenFlyoutEndCommand
Opens the end-edge flyout.
public ICommand OpenFlyoutEndCommand { get; }
Property Value
OpenFlyoutStartCommand
Opens the start-edge flyout.
public ICommand OpenFlyoutStartCommand { get; }
Property Value
PageBindingContext
Gets the current page's binding context: the title slot propagates it to hosted TitleView content, which is page content and binds the page model — not this context.
public object? PageBindingContext { get; }
Property Value
ScrollOffset
Gets the tracked scrollable's vertical offset in dp (see ScrollTrackerProperty): 0 at rest, negative while over-scrolling at the top. Updates per frame — bind chrome transforms to it (e.g. via NavBarBindingExtension and a converter).
public double ScrollOffset { get; }
Property Value
ScrollRampEnd
Gets the effective interpolation ramp end for the current page (resolved page → area → scaffold via ScrollRampEndProperty; 100 by default).
public double ScrollRampEnd { get; }
Property Value
ScrollRampStart
Gets the effective interpolation ramp start for the current page (resolved
page → area → scaffold via ScrollRampStartProperty; 0 by
default): the RampStart fallback of every scroll-value interpolation on the page.
public double ScrollRampStart { get; }
Property Value
Title
Gets the current page's Title.
public string? Title { get; }
Property Value
TitleForeground
Gets the effective title color from the appearance chain: level by level, the first appearance setting NavBarTitleForegroundProperty or NavBarForegroundProperty wins (its title color first). Null when no appearance sets either — the title then uses its built-in default.
public Color? TitleForeground { get; }
Property Value
TitleView
Gets the current page's TitleViewProperty content, replacing the title label when set.
public View? TitleView { get; }
Property Value
Events
PropertyChanged
Occurs when a property value changes.
public event PropertyChangedEventHandler? PropertyChanged