Articles in this section
Category / Section

How to work with .NET MAUI (SFExpander) in the FlyoutPage?

4 mins read

The .NET MAUI SfExpander is a versatile component that can be used within a FlyoutPage to create collapsible sections.

XAML

Load the SfExpander in the Flyout of the FlyoutPage.

<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="ExpanderMaui.Views.ExpanderFlyoutMaster"
             xmlns:syncfusion="clr-namespace:Syncfusion.Maui.Expander;assembly=Syncfusion.Maui.Expander"
             Title="Menu">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="150"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid BackgroundColor="#f54291" HeightRequest="150" Padding="20" Grid.Row="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="70"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Image Source="userimage.png" HeightRequest="70" WidthRequest="70" Margin="10,10,10,10"/>
            <Label Text="John" Grid.Column="1" FontSize="Large" VerticalOptions="Center" HorizontalOptions="Start" Padding="20"/>
        </Grid>
        <ScrollView BackgroundColor="#EDF2F5" VerticalScrollBarVisibility="Always" Grid.Row="1">
            <StackLayout>
                <syncfusion:SfExpander HeaderIconPosition="End">
                    <syncfusion:SfExpander.Header>
                        <Grid HeightRequest="50">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="50"/>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <Image Source="home.png" HeightRequest="25" WidthRequest="25" HorizontalOptions="Center" VerticalOptions="Center"/>
                            <Label Text="Home" Grid.Column="1" TextColor="#495F6E" VerticalTextAlignment="Center" />
                        </Grid>
                    </syncfusion:SfExpander.Header>

                    <syncfusion:SfExpander.Content>
                        <StackLayout Padding="10,10,10,10" BackgroundColor="#FFFFFF">
                            <Label HeightRequest="50" Text="Tasks" TextColor="#303030" VerticalTextAlignment="Center"/>
                            <Label HeightRequest="50" Text="Settings" TextColor="#303030" VerticalTextAlignment="Center"/>
                        </StackLayout>
                    </syncfusion:SfExpander.Content>
                </syncfusion:SfExpander>
            </StackLayout>
        </ScrollView>
    </Grid>
</ContentPage>

OUTPUT:

Picture.png

View sample in GitHub

CONCLUSION:
I hope you enjoyed learning about how to work with SfExpander in flyout page.
You can refer to our .NET MAUI Expander feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our .NET MAUI Expander example to understand how to create and manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied