Due to the different/invalid sequence of events when a Page is Popped (and Pushed) in Android and iOS compared to WP (which appears correct as detailed in the thread link below) it’s impossible in a Page’s OnDisappearing to determine if the Page is being Popped or merely if it’s being hidden (disappearing) due to a field popup or other action.
So there’s no way (unless I’m missing something) to be able to do “clean up” work when the Page is closing (being popped) as it can’t tell when to do that.
Whilst it is possible in WP by catching the Page being popped in NavigationPage.Popped and then in Page's OnDisappearing comparing "This" to captured Page to tell if it's being closed (rather than hidden by say an ActionMenu hiding it or even a PickList field popping up a list which also invokes the Page's OnDisappearing) this can't be done in Android or iOS as the NavigationPage.Popped event occurs AFTER the Page's OnDisappearing event which seems wrong to me.
Apart from the sequence of events being totally different between the platforms which in itself must be wrong surely (?) if this was consistent and matched the sequence in WP then it'd be possible .. even if this meant introducing say a NavigationPage.Popping(Page beginpopped) pre-event always occurring first before any OnDisappearing/onAppearing and then followed by a .Popped event afterwards perhaps?
Unless I'm missing something obvious (?), there's no other way to tell in a Page's OnDisappearing whether it's due to Back button or action or for any other reason causing it to be hidden (rather than closed) and hence no way to ensure clean up operations which is what I need for example.
I’ve asked this question a number of times in various posts including tech preview thread of 1.3 and also separate post which details the different event sequences between platforms at :
https://forums.xamarin.com/discussion/comment/84500
but there’s been ZERO response at all from Zamarin guys so could someone please comment on it?
Any/all thoughts Zamarin guys please? @JasonASmith ?
Thanks Derek