PushPopupAsync() returns before popup is actually displayed
See original GitHub issue await Navigation.PushPopupAsync(popup, false);
You can await this but… The call returns before the popup is actually displayed. So more like when the popup system receives the request for the popup to be displayed.
I’ve had a few situations were I await the push, do some work, dismiss the popup BEFORE IT ACTUALLY APPEARS… then the popup appears… and is on screen forever now because my code already dismissed it.
I shouldn’t be running into race conditions on something I await.
Issue Analytics
- State:
- Created 6 years ago
- Comments:57 (22 by maintainers)
Top Results From Across the Web
How to pause a method till getting response from Rg. ...
I am using Rg.Plugins.Popup for a simple confirmation popup before deleting an item from the list like "Are you sure you want to...
Read more >So I created a Popup with Transparent background in Xamarin ...
PushModalAsync() as what we normally do in Xamarin Forms, yes of course you could do the same to open this Transparent Popup page,...
Read more >Xamarin Community Toolkit Popup
The Popup control allows developers to create and display popups within their applications. The Popup can be extended to return data to the ......
Read more >Ajeromi central school
But, by clicking back button in phone, again the same popup is shown. But there is a really nice library which allow to...
Read more >Pixel-Perfect, Customizable Popups for Xamarin.Forms with ...
... Add New PopupPage 12:03 - PopupPage Navigation/ Show Popup 14:30 - Our First Popup On Screen 15:06 - Customize Popup Look and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

This is just what I was looking for. With the new tuple support in c#, I can easily return multiple objects without having to create a new class. In my popup, I am accepting a string for a prompt which is stored in a UserText property. I also have an Accept and Cancel button. The Accept button assigns ‘true’ to an Accepted property. Then your OnDisappearing method becomes.
My calling code looks like…
Thanks.
@tlhintoq my code can await until popup is closed, or not await, depends on the logic 😃
and your Page (which you showing as popup) will contain next:
You can also make PopupClosedTask as interface and implement for any Page