With Windows App SDK/WinUI 3, it is
You can see OnClosed at Windows
How to open an alert when app is closed in MAUI windows platform ?
I tried OnDisappearing event but exception is thrown.
My scenario is that i want to warn user before closing the app, when something happened.