Getting Started with UWP Busy Indicator (SfBusyIndicator)
24 May 20212 minutes to read
This section explains how to create a visual representation indicating background running process with animation using SfBusyIndicator control.
Adding SfBusyIndicator Control
Create a Universal Windows Platform project in Visual Studio and refer to the “Syncfusion.SfBusyIndicator.UWP” assembly.
1.Include the namespace for Syncfusion.SfBusyIndicator.UWP assembly in MainPage.xaml
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:notification="using:Syncfusion.UI.Xaml.Controls.Notification">2.Now add the SfBusyIndicator control with a required optimal name using the included namespace
<notification:SfBusyIndicator x:Name="busyIndicator">SfBusyIndicator busyIndicator = new SfBusyIndicator();Dim busyIndicator As New SfBusyIndicator()
Choosing Animation
Choose an animation from the available built-in animations and set it using AnimationType property.
<Grid Background="CornFlowerBlue"/>
<notification:SfBusyIndicator AnimationType="Gear"/>
</Grid>SfBusyIndicator busyIndicator = new SfBusyIndicator() { AnimationType = AnimationTypes.Gear };Dim busyIndicator As New SfBusyIndicator() With {.AnimationType = AnimationTypes.Gear}
Setting Busy Header
Set the Header property with text “Loading…” to display a busy status and customize the header with HeaderTemplate property as given below:
<Grid Background="CornFlowerBlue"/>
<notification:SfBusyIndicator Header="Loading..."/>
</Grid>SfBusyIndicator busyIndicator = new SfBusyIndicator() { Header="Loading..." };Dim busyIndicator As New SfBusyIndicator() With {.Header="Loading..."}