Class ScaffoldBottomSheetView
- Namespace
- Nalu
- Assembly
- Nalu.Maui.Scaffold.dll
The bottom sheet chrome of ShowBottomSheetAsync(View, ScaffoldBottomSheetOptions?): a top-rounded surface with an optional drag handle hosting the user content. Drag is recognized natively; detent snapping and pull-down-to-close live at the virtual view layer.
public sealed class ScaffoldBottomSheetView : 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
-
ScaffoldBottomSheetView
- Implements
- Inherited Members
- Extension Methods
Remarks
The drag rides the WHOLE sheet surface: inner controls that need their own drag gestures
prevent propagation themselves (e.g. InteractableCanvasView.StopPropagation), and
scrollable content relies on platform gesture arbitration. The sheet is as tall as its
LARGEST detent — dragging up past it is a no-op (expansion exists only while a bigger detent
does), dragging far enough below the smallest detent dismisses (when allowed).
Instances are created per presentation — the type is public as a styling surface;
SnapToDetentAsync(int) is reachable from the content via
(ScaffoldBottomSheetView?)content.Parent?.Parent:
<Style TargetType="nalu:ScaffoldBottomSheetView">
<Setter Property="SheetBackground" Value="{AppThemeBinding Light=..., Dark=...}" />
</Style>
Fields
HandleColorProperty
Bindable property for HandleColor.
public static readonly BindableProperty HandleColorProperty
Field Value
SheetBackgroundProperty
Bindable property for SheetBackground.
public static readonly BindableProperty SheetBackgroundProperty
Field Value
SheetCornerRadiusProperty
Bindable property for SheetCornerRadius.
public static readonly BindableProperty SheetCornerRadiusProperty
Field Value
Properties
HandleColor
Gets or sets the drag handle color. Defaults to #4D8E8E93.
public Color HandleColor { get; set; }
Property Value
SheetBackground
Gets or sets the sheet surface brush. Defaults to opaque white — set it per theme.
Drives the view's own Background — style THIS, not
Background.
public Brush? SheetBackground { get; set; }
Property Value
SheetCornerRadius
Gets or sets the radius of the sheet's top corners. Defaults to 16.
public double SheetCornerRadius { get; set; }
Property Value
Methods
SnapToDetentAsync(int)
Animates the sheet to the given detent (index into Detents, clamped into range) — the programmatic counterpart of dragging. No-op until the sheet's geometry is initialized.
public Task SnapToDetentAsync(int detentIndex)
Parameters
detentIndexint