How to get terminating or terminated event,when UWP app is closed by the system?
stackoverflow.com