Issue
I tried to insert a Modal Page in my App.
Now I post an Example. Only an Example
await this.Navigation.PushModalAsync(new MyModalPage());
await this.Navigation.PushModalAsync(new LoginPage());
I don't understand why my app don't wait after myModalpage
has been loaded.
Also I have tried to insert an
await DispleayAlert(....)
row after my second PushModalAsync
and I see this alert without waiting.
Solution
As Cheesebaron said:
That is not how the API works. It just continue as soon as it is done pushing.
The method did await and I think it performs too fast so that you feel like it does not await.
You can add some custom delay to make it slower. It only wait until the page pop up.
public async void test()
{
await Task.Delay(1000);
await this.Navigation.PushModalAsync(new Page1());
await Task.Delay(2000);
await this.Navigation.PushModalAsync(new Page1());
}
Answered By - nevermore
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.