• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: How to prevent the main form closed by the user in .NET MAUI?

Resolved: How to prevent the main form closed by the user in .NET MAUI?

0
By Isaac Tonny on 04/04/2023 Issue
Share
Facebook Twitter LinkedIn

In this post, we will see how to resolve How to prevent the main form closed by the user in .NET MAUI?

Question:

In windows form native application we can prevent a user to close the application when they press “X” button in the top right. the below code is an example code when the user tries to close the application, instead of closing the application will be minimized mode:
How to achieve that on .NET MAUI?
I tried an ovveride method like OnDisappearing but no luck

Best Answer:

You can using the following code in the OnHandlerChanged method of the MainPage.cs.

If you have better answer, please add a comment about this, thank you!

Source: Stackoverflow.com

c# maui
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: How to stop a thread that has a blocking function from easygui in python

05/04/2023

Resolved: Removing null keys from a json array of objects

05/04/2023

Resolved: How can I generate at compile-time a separate OpenAPI Swagger.json file for each Controller in my ASP.NET project?

05/04/2023

Comments are closed.

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.