简体   繁体   中英

.NET MAUI disable Minimize Restore Close button

Is it possible to disable or remove Minimize, Restore and Close button from .NET MAUI app?

I tried this but did not work. MAUI .NET Set Window Size

According to the official document , the title bar and the three buttons will just be hided by the system if your application is in a special model such as full screen model.

The system reserves the upper-left or upper-right corner of the app window for the system caption buttons (minimize, maximize/restore, close). The system retains control of the caption button area to guarantee that minimum functionality is provided for dragging, minimizing, maximizing, and closing the window. The system draws the Close button in the upper-right for left-to-right languages and the upper-left for right-to-left languages.

This is a system reserved area, so you cannot remove these buttons.

Thank you.! I was able to achieve for windows platform by setting these to false.

window.ExtendsContentIntoTitleBar = false; AppUI.SetBorderAndTitleBar(false, false);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM