I am trying to show user MessageBox just before app is closed (or deactivated). So I added this to both events:
if (AppSettings.ShouldShowAlertTransfer)
{
MessageBox.Show("...");
}
But the MessageBox is not shown. I am adding this because then I am adding background transfers and I must inform user that I created some background trasnfers. I know I can add this code to OnKeyBackPressed in every page. But it's working just for back key and not middle button. And it wouldn't be nice to have same code copied in every page.
So is it possible to show this MessageBox in App.xaml.cs? How can I do that? If it's not how can I show MessageBox when user pressed middle button?