XF-Material-Library
XF-Material-Library copied to clipboard
LoadingDialog animation freezes when loading a new page
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?