How to catch the OnClosing event like WinForm on uwp?
On desktop, we always close the app by clicking the "Close" button on the top-right corner.
I want to do something before closing.
How to catch the OnClosing event like WinForm on uwp?
On desktop, we always close the app by clicking the "Close" button on the top-right corner.
I want to do something before closing.
By default, you can't. But you can use the confirmAppClose capability to override the close button. To use this capability, you need to add it on your appxmanifest, AND, ask Microsoft to get the certification.