New to Telerik UI for .NET MAUIStart a free 30-day trial

.NET MAUI BottomSheet Methods

The Telerik UI for .NET MAUI BottomSheet component exposes the GoToBottomSheetState(string name) method. Use the method to transition the bottom sheet to a specified state.

The example shows how to use the GoToBottomSheetState(string name) method:

1 Define the BottomSheet in XAML:

xaml
<telerik:RadBottomSheet x:Name="bottomSheet">
	<telerik:RadBottomSheet.Content>
		<HorizontalStackLayout>
			<telerik:RadTemplatedButton Content="Open BottomSheet Content" 
										Clicked="OnOpenClicked"/>
			<telerik:RadTemplatedButton Content="Close BottomSheet Content" 
										Clicked="OnCloseClicked"/>
		</HorizontalStackLayout>
	</telerik:RadBottomSheet.Content>
	<telerik:RadBottomSheet.BottomSheetContent>
		<Label Text="BottomSheet Content"
			   VerticalOptions="Start"
			   HorizontalOptions="Center" />
	</telerik:RadBottomSheet.BottomSheetContent>
</telerik:RadBottomSheet>

2. Add the telerik namespace:

XAML
xmlns:telerik="http://schemas.telerik.com/2022/xaml/maui"

3. Call the GoToBottomSheetState() method with corresponding state name:

c#
private void OnOpenClicked(object sender, System.EventArgs e)
{
	this.bottomSheet.GoToBottomSheetState(BottomSheetState.PartialStateName);
}

This is the result on Android:

.NET MAUI BottomSheet Methods

See Also

In this article
See Also
Not finding the help you need?
Contact Support