The Accordion control allows content to be organized in a vertically stacked list of items that is collapsible. Each item can also be expanded to reveal the content associated with that item. This section provides a quick overview for working with the SfAccordion for Xamarin.Forms.
- Animation - Supports customization of animation duration and easing.
- Different expand modes - Support to expand single or multiple items.
- Customization - Supports to customize the header icon position, space between the items and more.
Install Syncfusion.Xamarin.Expander from NuGet in all your project targets.
Use the Syncfusion Xamarin Toolbox to drag and drop SfAccordion into your XAML page.
Add the following assemblies manually:
Syncfusion.Expander.XForms.dllSyncfusion.Core.XForms.dllSyncfusion.Licensing.dll
Call SfAccordionRenderer.Init() in AppDelegate.FinishedLaunching.
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:syncfusion="clr-namespace:Syncfusion.XForms.Accordion;assembly=Syncfusion.Expander.XForms">
<ContentPage.Content>
<syncfusion:SfAccordion>
<syncfusion:SfAccordion.Items>
<syncfusion:AccordionItem>
<syncfusion:AccordionItem.Header>
<Grid>
<Label Text="Cheese burger" />
</Grid>
</syncfusion:AccordionItem.Header>
<syncfusion:AccordionItem.Content>
<Grid>
<Label Text="Hamburger with melted cheese." />
</Grid>
</syncfusion:AccordionItem.Content>
</syncfusion:AccordionItem>
</syncfusion:SfAccordion.Items>
</syncfusion:SfAccordion>
</ContentPage.Content>
</ContentPage>