After calling Navigation.PopPopupAsync, I'm expecting OnAppearing to be called on the main page. Unfortunately, it does not seem to be triggered.
This issue is very similar to https://bugzilla.xamarin.com/show_bug.cgi?id=32615 , however the bug with modal pages on Xamarin.Forms has been fixed.
Any idea for a fix or a workaround ?
Thanks
(Tested with Xamarin.Forms 2.2.0.45)
Or maybe this is the expected behaviour ?
Anyway, a simple workaround consists in adding mainpage's OnAppearing to the Disappearing event of the popup, when creating the popup:
var popup = new PopupPage();
popup.Disappearing += (sender, e) => { this.OnAppearing(); };
await Navigation.PushPopupAsync(popup);
@balmeras Hi friend. Yes, OnAppearing don't calling.
This is for two reasons.
All right, it makes sense.
Thanks for your answer and for this plugin :)
@tranb3r thank you very much for your workaround it works fine. I hope that it is not navigation violation or whatsoever :)
@EmilAlipiev @tranb3r I can send OnAppearing and OnDisappearing events from external code with the new version Xamarin.Forms. Maybe I add OnAppearing and OnDisappearing events in new version of plugin
@EmilAlipiev @tranb3r P.S. But a problem exists. Popup can be visible even if pages behind it will be hidden and PopupNavigation will not be able to send OnAppearing event because Xamarin.Forma.Navigation will have already sent it .
Most helpful comment
Or maybe this is the expected behaviour ?
Anyway, a simple workaround consists in adding mainpage's OnAppearing to the Disappearing event of the popup, when creating the popup:
var popup = new PopupPage();
popup.Disappearing += (sender, e) => { this.OnAppearing(); };
await Navigation.PushPopupAsync(popup);