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 RadBusyIndicator 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 RadBusyIndicator 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 RadBusyIndicator component:
Platform Assemblies
Portable Telerik.XamarinForms.Common.dll
Telerik.XamarinForms.Primitives.dll
Telerik.XamarinForms.SkiaSharp.dll
Android Telerik.XamarinForms.Common.dll
Telerik.XamarinForms.Primitives.dll
Telerik.XamarinForms.SkiaSharp.dll
iOS Telerik.XamarinForms.Common.dll
Telerik.XamarinForms.Primitives.dll
Telerik.XamarinForms.SkiaSharp.dll
UWP Telerik.XamarinForms.Common.dll
Telerik.XamarinForms.Primitives.dll
Telerik.XamarinForms.SkiaSharp.dll

RadBusyIndicator is rendered via the SkiaSharp graphics library so you need to install also SkiaSharp.Views.Forms in all projects of the xamarin solution (portable, android, ios, etc).

3. Adding RadBusyIndicator control

The busy indicator is a layout control that can display two views depending on its current state - busy and not-busy. You can define the state of the control via its IsBusy property. The default value is False and the control's normal content is displayed. If you change it to True, the busy content is displayed, which by default is a spinning balls animation. Check the Animations article to see the built-in animations, how to change them and how to us a custom animation.

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#.

To use the busy indicator you can include the following namespaces:

using Telerik.XamarinForms.Primitives;

Proceed with defining the component:

<telerikPrimitives:RadBusyIndicator x:Name="BusyIndicator"
                                       AnimationContentHeightRequest="100"
                                       AnimationContentWidthRequest="100"
                                       IsBusy="True">
    <telerikPrimitives:RadBusyIndicator.Content>
        <Label Text="This is the content of the RadBusyIndicator control displayed when the indicator is not busy." TextColor="Black" />
    </telerikPrimitives:RadBusyIndicator.Content>
</telerikPrimitives:RadBusyIndicator>
RadBusyIndicator radBusyIndicator = new RadBusyIndicator()
{
    IsBusy = true,
    Content = new Label() { Text = "This is the content of the RadBusyIndicator control displayed when the indicator is not busy.", TextColor = Color.Black },
    AnimationContentWidthRequest = 100,
    AnimationContentHeightRequest = 100,
};

Figure 1: RadBusyIndicator when IsBusy is True

BusyIndicator example

SDK Browser and QSF applications contain different examples that show RadBusyIndicator'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