Detect Application closing in UWP
Nearly every application when user closes it using the “X” button on upper right corner prompts something like this
Asking user if he wants to save actual work or cancel closing operation.
Doing this in a UWP application is far from trivial…