duplicate busy indicators when using await Navigation.PushAsync(customPage)

Hello Syncfusion Team,

I am using the SfBusyIndicator in my .NET MAUI application to display a loading animation during navigation operations. However, I am encountering an issue where there two busy indicators are displayed when I use the following navigation code:

public class CustomPage : ContentPage{

private readonly SfBusyIndicator BusyIndicator;


Public CustomPage(){

BusyIndicator = new SfBusyIndicator();

BusyIndicator.BindingContext = this;

BusyIndicator.VerticalOptions = LayoutOptions.CenterAndExpand;

BusyIndicator.HorizontalOptions = LayoutOptions.CenterAndExpand;

BusyIndicator.SetBinding(SfBusyIndicator.IndicatorColorProperty, BusyColorProperty.PropertyName);

BusyIndicator.SetBinding(WidthRequestProperty, BusySizeProperty.PropertyName);

BusyIndicator.SetBinding(HeightRequestProperty, BusySizeProperty.PropertyName);

BusyIndicator.SetBinding(SfBusyIndicator.IsRunningProperty, IsBusyProperty.PropertyName);

BusyIndicator.SetBinding(IsVisibleProperty, IsBusyProperty.PropertyName);

BusyIndicator.AnimationType = AnimationType.CircularMaterial;

}

public async Task SetBusy(bool value)

{

    IsBusy = value;

    await Task.Delay(1);

}

}



Image_2510_1736230691634


1 Reply

BV Brundha Velusamy Syncfusion Team January 8, 2025 01:38 PM UTC

Hi Nguy?n Th?nh,

 

Thank you for reaching out to Syncfusion support!

 

Based on the code snippets and details you provided, we have created a sample to replicate your scenario. Since some specifics of your implementation were unclear, we structured the sample as follows:

  1. On the MainPage, we added a Button to navigate to another page.
  2. On the navigated page, the SfBusyIndicator is initialized and its behavior is controlled within the OnAppearing method.

 

We thoroughly tested this scenario and found that the sample performed as expected, without reproducing the reported issue of duplicate busy indicators.

 

To assist you better, we have attached a sample project and a demo video demonstrating our testing process. We kindly request you to review them and share any specific scenarios or edge cases we might have missed. If needed, you can modify the attached sample to replicate the issue and send it back to us for further investigation. This will greatly help us validate the problem and provide a prompt resolution.

 

Additionally, to aid in our investigation, please provide the following details:

  • The platform(s) where the issue occurs.
  • The .NET version you are using (e.g., .NET 8 or 9).
  • The NuGet version of Microsoft.Maui.Controls.
  • The Syncfusion NuGet version you are using.

 

We appreciate your cooperation and look forward to resolving the issue for you.

 

Regards,

Brundha V


Attachment: Sample_Demo_b88c8712.zip

Loader.
Up arrow icon