Vincent
Vincent

Reputation: 3304

How to know UWP OnClosing event?

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.

Upvotes: 0

Views: 1366

Answers (1)

Mamoru Satoh
Mamoru Satoh

Reputation: 2710

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.

Override Close Box on Window 10 Universal Apps UWP

Upvotes: 2

Related Questions