Whenever I am putting my application into background, or calling a chooser task, the NavigateFrom and (when comming back) the NavigateTo events fire.
How can I tell when are we actually navigating somewhere, or when is the application going into background?
if your app starts the OnNavigatedTo NavigationEventArgs NavigationMode is new, if your app comes back from tombstoning the OnNavigatedTo NavigationMode is back, if you set a boolean in App.xaml in the activated event and check if this boolean is set you can determine if your application is comming back from tombstoning.
in the OnNavigatedFrom on tombstoning the NavigationEventArgs NavigationMode is new, while if you press the back button the NavigationMode is back, I’m not sure if any other state can occur for OnNavigatedFrom. So if OnNavigatedFrom NavigationMode is new I’m guessing your app is tombstoning