I am trying to display a message box to exit the app on back key press before user exits the app. If i am trying to run the app without visual studio and pressing Back Key, after some 10-12 seconds automatically the app will exit without pressing any button on Message Box.
Please let me know if there is any other way to achieve this functionality (on back key press a pop up should come for user to exit the app with Ok and Cancel button, and if user presses any button then only the app should exit).
Need to show a message box before exiting the app as per requirement of project.
Thanks & Regards,