How exit from net maui App?

Luis Guillermo Mora Rivas 0 Reputation points
2023-10-10T06:38:28.0533333+00:00

Which the best option to exit from net maui application?

I'm using Application.Current.Quit, but not working.

Developer technologies | .NET | .NET MAUI
Windows for business | Windows Client for IT Pros | User experience | Other
{count} votes

2 answers

Sort by: Most helpful
  1. Q&A Assist
    2023-10-10T06:38:28.0533333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    To exit a .NET MAUI application, you can use the Application.Current.Quit() method. However, this method may not work on all platforms. In some cases, you may need to use platform-specific code to exit the application. It's also worth noting that exiting an application is generally discouraged on mobile platforms, as it can lead to a poor user experience.


    References:


  2. Martin Packer 0 Reputation points
    2025-09-17T08:32:21.37+00:00

    Not a pretty solution, but this is the only method I could find that works in WIndows:

    System.Diagnostics.Process.GetCurrentProcess()?.Kill();

    Anybody got anything nicer?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.