Search code examples
c#uwpcross-platformuno-platformwinui

ProgressRing stops animating after a page navigation on Uno 2.4 & WASM


WinUI ProgressRing get stuck and won't turn around the background again after a page navigation. It looks a frozen progress ring :) ProgressRing seems ok on UWP, the real issue seems on WASM. I installed the Lottie package, but it's not the real solution. Without page navigation, ProgressRing on WASM runs perfectly.

I'm using this for delaying the operations and show progressRing to indicate the app is working at the background:

      await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => // Working in different thread.
                {
                    WaiterGrid.Visibility = Visibility.Visible; // Show waiter.

                });

                try
                {
                    await Task.Delay(1000);
// Operations here.
                }

                catch (Exception ex)
                {
                    Debug.WriteLine(ex.Message);
                    MessageDialog warn_box = new MessageDialog("X. Lütfen yeniden deneyin.", "Hata");

                    await warn_box.ShowAsync();
                }
                await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => // Working in different thread.
                {
                    WaiterGrid.Visibility = Visibility.Collapsed; // Show waiter.

                });

Will it causes the issue ?

Packages:

Uno.UI.RemoteControl {2.4.0}
Newtonsoft.Json {12.0.3}
Uno.UI.Lottie {2.4.0}
Uno.Wasm.Bootstrap {1.2.0}
Uno.Wasm.Bootstrap.DevServer {1.2.0}
ACM_Search_AdminApps.Shared {1.1.0}
Microsoft.Extensions.Logging.Filter {1.1.2}
Microsoft.Extensions.Logging.Con... {1.1.1}
NETStandard.Library {2.0.3}
Uno.UI {2.4.0}
ACM_Search_AdminApps.Shared {1.1.0}
Microsoft.NETCore.UniversalWindo... {6.2.10}
Microsoft.Extensions.Logging.Con... {1.1.1}
Microsoft.Extensions.Logging.Filter {1.1.2}
Microsoft.Toolkit.Uwp.UI.Lottie {6.0.0}
Microsoft.UI.Xaml {2.4.2}
Newtonsoft.Json {12.0.3}
Uno.Core {2.0.0}

UWP

enter image description here

WASM

enter image description here


Solution

  • This was actually a bug in Uno.UI.Lottie. I just created a PR to fix the bug.

    UPDATE: The PR is merged, fix will be available in Uno.UI v3.0.0-dev.144.