This tutorial will walk you through the creation of a sample application that contains RadBusyIndicator.
The RadBusyIndicator is displayed on the UI thread. If this thread is blocked, the control will not be shown. It is meant to indicate to the user that there is a long running background task/process.
In order to use RadBusyIndicator in your projects, you have to add references to the following assembly:
Make sure the required assembly reference is added to the project before you proceed with adding RadBusyIndicator to your project.
You can access the RadBusyIndicator control through an alias pointing to the Telerik.UI.Xaml.Controls.Primitives namespace:
You can add RadBusyIndicator manually by writing the XAML code in Example 1.
Example 1: Adding RadBusyIndicator in XAML
RadBusyIndicator will be visible only when the IsActive property is set to True.
Example 3: Adding Content
<primitives:RadBusyIndicator ContentPosition="Right" IsActive="True" Content="Custom text" x:Name="indicator" />
Figure 1: This figure is generated by the code in Example 3
Similarly to other controls, you can change the color of the text via the Foreground property.
If you want to change the default colors used for the indicator and for the overlay displayed over the underlying controls, however, you need to override the TelerikBusyIndicator_IndicatorBackground and TelerikBusyIndicator_OverlayBackground brushes.
Example 4: Customize Colors
<primitives:RadBusyIndicator IsActive="True" Foreground="Red"> <primitives:RadBusyIndicator.Resources> <SolidColorBrush x:Key="TelerikBusyIndicator_IndicatorBackground" Color="Red" /> <SolidColorBrush x:Key="TelerikBusyIndicator_OverlayBackground" Color="#33FF0000" /> </primitives:RadBusyIndicator.Resources> </primitives:RadBusyIndicator>
Figure 2: RadBusyIndicator with Customized Colors