XF-Material-Library icon indicating copy to clipboard operation
XF-Material-Library copied to clipboard

LoadingDialog animation freezes when loading a new page

Open ske66 opened this issue 4 years ago • 0 comments

I'm trying to navigate to a new tabbedpage and while the page is initialising, I want to show a loading dialog. However when I implement the LoadingDailogAsync, the UI seems to hang and the animation stops running. The page loads after a couple seconds, but the hanged animation makes the program look slow.

Here is my code;

        public InfoViewModel()
        {
            VersionNumber = "v 1.0";

            StartCommand = new Command(async () => await Start());
        }


        async Task Start()
        {
            using (await MaterialDialog.Instance.LoadingDialogAsync(message: "Updating config file..."))
            {
                MainPage main = new MainPage();
                await App.Nav.PushAsync(main, true);
            }
        }

Any ideas why the thread is hanging?

ske66 avatar Feb 17 '20 14:02 ske66