New to Telerik UI for .NET MAUI? Start 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:

<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:

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

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

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