While closing the MAUI project on Mac (clicking the red cross) I need it to ask a question if I really want to close the project and when clicking ‘yes’ it closes, by clicking ‘no’ it stays open. How can I do that if it’s possible?
Thank you!
While closing the MAUI project on Mac (clicking the red cross) I need it to ask a question if I really want to close the project and when clicking ‘yes’ it closes, by clicking ‘no’ it stays open. How can I do that if it’s possible?
Thank you!
You want to implement a Close Confirmation with a MAUI Mac App. It needs to keep tracking the states of the open windows and when there is only one left, it shows alert to close the app. You may need to get this done in
AppDelegate.csunder Platforms\MacCatalyst like below:Similar to MAUI Mac, please refer to this answered thread: How to do a Close Confirmation with a Xamarin Forms mac App?, if there's any issue, don't hesitate to report to githu:https://github.com/dotnet/maui/issues