Why the app is closing when I press on the left corner of title bar in window 10 and above

Dani_S 3,106 Reputation points
2023-04-19T12:23:48.7366667+00:00

Hi, Why the app is closing when I press on the left corner of title bar in window 10 and above? Thanks, User's image

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,077 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Saad Markou 11 Reputation points
    2023-04-27T14:45:39.2766667+00:00

    On Windows 10 and above, when you press the left corner of the title bar, it activates the "Close" button. This button is used to close the application window. When you click on it, the application is terminated and closed.

    This is the default behavior of Windows 10 and above, and it is designed to provide users with a convenient way to close an application. However, if you accidentally click on the "Close" button or the left corner of the title bar, it can cause your application to close unexpectedly.

    To avoid accidentally closing your application, you can move your mouse to the middle or right corner of the title bar before clicking on it. Alternatively, you can use the Alt + F4 keyboard shortcut to close the application, which will prompt you to confirm that you want to close the application before it terminates.


  2. Rob Caplan - MSFT 5,427 Reputation points Microsoft Employee
    2023-04-27T18:35:54.51+00:00

    I assume from your name that you are running on an RTL system, in which case this is probably https://github.com/dotnet/maui/issues/7751

    The symptom in your video (included in one of the other threads you posted on this problem) is that the button hit testing is flipped to the left side while the button rendering is on the right. Your video shows the close button on the right highlighting when the mouse hovers on the left.

    The bug you filed at Close button - not close the app in window. #7197is probably the same, but it doesn't identify as being on RTL. Please add your details from this thread and from your previous close button threads to that so it can be properly investigated.

    Please don't post multiple threads on the same issue. It is very difficult to track when the information about a problem is scattered in multiple places.

    0 comments No comments