Skip to content

This repository contains the sample that show how to get started with the Syncfusion .NET MAUI Busy indicator control.

Notifications You must be signed in to change notification settings

SyncfusionExamples/Getting-Started-with-.NET-MAUI-BusyIndicator

Repository files navigation

Getting Started with .NET MAUI BusyIndicator (SfBusyIndicator)

This section provides a quick overview for working with the SfBusyIndicator for .NET MAUI. Walk through the entire process of creating a real world of this control.

Creating an application using the .NET MAUI Busy Indicator

  1. Create a new .NET MAUI application in Visual Studio.
  2. Syncfusion .NET MAUI components are available on nuget.org. To add SfBusyIndicator to your project, open the NuGet package manager in Visual Studio, search for Syncfusion.Maui.Core and then install it.

Register the handler

To use this control inside an application, you must register the handler for Syncfusion® core.

using Microsoft.Extensions.Logging;
using Syncfusion.Maui.Core.Hosting;

namespace BusyIndicatorGettingStarted
{
    public static class MauiProgram
    {
        public static MauiApp CreateMauiApp()
        {
            var builder = MauiApp.CreateBuilder();
            builder
                .UseMauiApp<App>()
                .ConfigureSyncfusionCore()
                .ConfigureFonts(fonts =>
                {
                    fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
                    fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
                });

#if DEBUG
    		builder.Logging.AddDebug();
#endif

            return builder.Build();
        }
    }
}

Add a basic Busy Indicator

  1. Import the control namespace Syncfusion.Maui.Core in XAML or C# code.
  2. Initialize the SfBusyIndicator control.
<ContentPage   
    . . .
    xmlns:core="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core">

   <core:SfBusyIndicator x:Name="busyIndicator"
                          IsRunning = "True" />
</ContentPage>
using Syncfusion.Maui.Core;
. . .

public partial class MainPage : ContentPage
{
    public MainPage()
    {
        InitializeComponent();
        SfBusyIndicator busyIndicator = new SfBusyIndicator(){IsRunning = true};
        Content = busyIndicator;  
    }
}

Setting AnimationType in .NET MAUI Busy Indicator

The .NET MAUI Busy Indicator provides some predefined animation types like Cupertino, LinearMaterial, and CircularMaterial. Users can select any one of the animation types using the AnimationType property.

       <ContentPage.Content>
        <core:SfBusyIndicator x:Name="busyIndicator"
                              IsRunning="True"
                              AnimationType="CircularMaterial" />
    </ContentPage.Content>

Run the application to render the following output:

Getting started with .NET MAUI busy indicator

About

This repository contains the sample that show how to get started with the Syncfusion .NET MAUI Busy indicator control.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages