Shiny .NET v4 is here with BLE Windows Support, Improved GPS, & More! Check It Out
SheetView | Properties & Events
Properties
Section titled “Properties”| Property | Type | Default | Description |
|---|---|---|---|
IsOpen | bool | false | Show/hide the sheet (TwoWay bindable) |
SheetContent | View? | null | Content displayed in the sheet (ContentProperty) |
Detents | ObservableCollection<DetentValue> | Quarter, Half, Full | Snap positions as ratios of available height |
SheetBackgroundColor | Color | White | Background of the sheet panel |
HandleColor | Color | Grey | Drag handle indicator color |
SheetCornerRadius | double | 16 | Top corner radius |
HasBackdrop | bool | true | Show dimming backdrop behind the sheet |
CloseOnBackdropTap | bool | true | Tap backdrop to close |
AnimationDuration | double | 250 | Animation speed in ms |
ExpandOnInputFocus | bool | true | Auto-expand when an input is focused |
IsLocked | bool | false | Prevents swipe, pan, and backdrop tap dismiss; sheet can only be controlled programmatically |
FitContent | bool | false | Measures content and auto-computes a single detent to fit it |
Location | SheetLocation | Bottom | Where the sheet slides from (Bottom, BottomTabs, or Top). Use BottomTabs when inside a Shell TabBar to clip the sheet above the tab bar and avoid rendering behind the tabs |
HeaderTemplate | DataTemplate? | null | Custom header template displayed above the sheet content |
ShowHeaderWhenMinimized | bool | false | When true, shows the header as a peek strip when the sheet is closed |
UseHapticFeedback | bool | true | Haptic click on open, close, and detent snap |
DetentValue
Section titled “DetentValue”Predefined snap points:
| Static Property | Ratio | Description |
|---|---|---|
DetentValue.Quarter | 0.25 | 25% height |
DetentValue.Half | 0.50 | 50% height |
DetentValue.ThreeQuarters | 0.75 | 75% height |
DetentValue.Full | 1.0 | Full height |
Custom detent: new DetentValue(0.33) for 33%.
Custom Detents Example
Section titled “Custom Detents Example”<shiny:SheetView IsOpen="{Binding IsOpen, Mode=TwoWay}" SheetBackgroundColor="#1E1E1E" HandleColor="#888888" SheetCornerRadius="24"> <shiny:SheetView.Detents> <shiny:DetentValue Ratio="0.33" /> <shiny:DetentValue Ratio="0.66" /> <shiny:DetentValue Ratio="1.0" /> </shiny:SheetView.Detents> <VerticalStackLayout Padding="20"> <Label Text="Custom Sheet" TextColor="White" /> </VerticalStackLayout></shiny:SheetView>Events
Section titled “Events”| Event | Args | Description |
|---|---|---|
Opened | EventArgs | Sheet finished opening |
Closed | EventArgs | Sheet finished closing |
DetentChanged | DetentValue | Sheet snapped to a different detent |