Is there a way to cancel or ignore a user’s close request? I’d like to delay a window closing if the user’s project is still saving.
I know about NewWindow::closeButtonPressed
and Component::userTriedToCloseWindow
, but neither of these functions allows for a way to completely cancel or ignore a close request. I can’t create a while loop in these functions either, because I don’t want the UI to freeze up.
For an example, C# WPF has a way to Cancel
a window closing: Window.Closing Event (System.Windows) | Microsoft Docs