New to Telerik UI for Xamarin? Download free 30-day trial

Getting Started

This article will guide you through the steps needed to add a basic RadAccordion control in your application.

1. Setting up the app

Take a look at these articles and follow the instructions to setup your app:

2. Adding the required Telerik references

You have two options:

If you don't want to add the all Telerik.UI.for.Xamarin nuget package, you have the option to add a separate nuget package. For RadAccordion control you have to install the Telerik.UI.for.Xamarin.Primitives nuget package. This nuget will automatically refer the Telerik.UI.for.Xamarin.Common and Telerik.UI.for.Xamarin.SkiaSharp nuget packages.

  • Add the references to Telerik assemblies manually, check the list below with the required assemblies for RadAccordion component:
Platform Assemblies
Portable Telerik.XamarinForms.Common.dll
Android Telerik.Xamarin.Android.Common.dll
iOS Telerik.Xamarin.iOS.dll
UWP Telerik.Core.dll

3. Adding RadAccordion control

You could use one of the following approaches:

Drag the control from the Toolbox.

Take a look at the following topics on how to use the toolbox:

Create the control definition in XAML or C#.

The snippet below shows a simple RadAccordion definition:

<telerikPrimitives:RadAccordion x:Name="accordion">
    <telerikPrimitives:AccordionItem HeaderText="Attachments">
            <Label Text="Attach files"  Margin="30" />
    <telerikPrimitives:AccordionItem HeaderText="Comments">
            <Label Text="Add your comment here" Margin="30" />
    <telerikPrimitives:AccordionItem HeaderText="Rating" IsExpanded="True">
            <telerikInput:RadShapeRating x:Name="rating" Margin="20"/>
var accordion = new RadAccordion();

var attachmentsSection = new AccordionItem { HeaderText = "Attachments" };
attachmentsSection.Content = new Label { Text = "Attach files", Margin = 30 };

var commentsSection = new AccordionItem { HeaderText = "Comments" };
commentsSection.Content = new Label { Text = "Add your comment here", Margin = 30 };

var ratingSection = new AccordionItem { IsExpanded = true, HeaderText = "Rating" };
ratingSection.Content = new RadShapeRating { Margin = 20 };

In addition to this, you need to add the following namespace:

using Telerik.XamarinForms.Primitives;
using Telerik.XamarinForms.Input;

This is the result:


SDK Browser and QSF applications contain different examples that show RadAccordion's main features. You can find the applications in the Examples and QSF folders of your local Telerik UI for Xamarin installation.

See Also

In this article