Skip to content
Shiny .NET v4.1 BETA - Linux, MacOS, & Blazor Support! TONS of new features and improvements across the board. Check It Out

FloatingPanel | Properties & Events

PropertyTypeDefaultDescription
IsOpenboolfalseShow/hide the panel (TwoWay bindable)
PanelContentView?nullContent displayed in the panel (ContentProperty)
HeaderTemplateView?nullCustom header displayed above/below content depending on position
ShowHeaderWhenClosedboolfalseShow the header as a peek strip when the panel is closed
PositionFloatingPanelPositionBottomWhere the panel slides from: Bottom, BottomTabs, or Top
DetentsObservableCollection<DetentValue>Quarter, Half, FullSnap positions as ratios of available height
PanelBackgroundColorColorWhiteBackground of the panel
HandleColorColorGreyDrag handle indicator color
PanelCornerRadiusdouble16Corner radius (auto-flips for top vs bottom)
ShowHandlebooltrueShow/hide the drag handle
HasBackdropbooltrueShow dimming backdrop via the parent OverlayHost
CloseOnBackdropTapbooltrueTap backdrop to close
AnimationDurationdouble250Animation speed in ms
ExpandOnInputFocusbooltrueAuto-expand to highest detent when an input is focused
IsLockedboolfalsePrevents swipe, pan, and backdrop tap dismiss; panel can only be controlled programmatically
FitContentboolfalseMeasures content and auto-computes a single detent to fit it
UseHapticFeedbackbooltrueHaptic click on open, close, and detent snap
ValueDescription
BottomSlides up from the bottom edge
BottomTabsSame as Bottom but clips above a Shell TabBar
TopSlides down from the top edge

Predefined snap points:

Static PropertyRatioDescription
DetentValue.Quarter0.2525% height
DetentValue.Half0.5050% height
DetentValue.ThreeQuarters0.7575% height
DetentValue.Full1.0Full height

Custom detent: new DetentValue(0.33) for 33%.

<shiny:FloatingPanel IsOpen="{Binding IsOpen, Mode=TwoWay}"
PanelBackgroundColor="#1E1E1E"
HandleColor="#888888"
PanelCornerRadius="24">
<shiny:FloatingPanel.Detents>
<shiny:DetentValue Ratio="0.33" />
<shiny:DetentValue Ratio="0.66" />
<shiny:DetentValue Ratio="1.0" />
</shiny:FloatingPanel.Detents>
<VerticalStackLayout Padding="20">
<Label Text="Custom Panel" TextColor="White" />
</VerticalStackLayout>
</shiny:FloatingPanel>
MethodReturnsDescription
AnimateToDetentAsync(DetentValue)TaskProgrammatically animate to a specific detent
EventArgsDescription
OpenedEventArgsPanel finished opening
ClosedEventArgsPanel finished closing
DetentChangedDetentValuePanel snapped to a different detent