Objective to achieve:
- Prompt confirm message "Are you confirm to exit?", with the options "Yes" and "Cancel"
I have been finding a way to to achieve the objective written above. I have tried the following code:
Windows.UI.Core.Preview.SystemNavigationManagerPreview.GetForCurrentView().CloseRequested += async (sender, args) =>
{
args.Handled = true;
var dialog = new MessageDialog("Are you confirm to exit?", "Exit");
System.Diagnostics.Debug.WriteLine("CLOSE");
};
the above code i writtin in MainPage.xaml.cs, but this code seem like not working for me, i don't see the "CLOSE" print out in the debug output.