How to display a dialog when the application is closing? #8459
-
I am trying to display a dialog to confirm if the user would like to save their work before the application is closed, but it does not seem to be working, either the application crashes or it hangs. I am trying to subscribe to the
I suppose this a very basic ask. Am I missing something or WinUI3/WinAppSDK missing this feature too? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
In the AppWindow.Closing event, I would interrupt the closing I have implemented something similar in an application that interacts with a trayicon. |
Beta Was this translation helpful? Give feedback.
-
This works for me (Windows 10 22H2, Windows app SDK 1.1.0) :
|
Beta Was this translation helpful? Give feedback.
-
WHERE DO I ADD THIS????!!!!! |
Beta Was this translation helpful? Give feedback.
This works for me (Windows 10 22H2, Windows app SDK 1.1.0) :