简体   繁体   English

.NET MAUI 禁用最小化恢复关闭按钮

[英].NET MAUI disable Minimize Restore Close button

Is it possible to disable or remove Minimize, Restore and Close button from .NET MAUI app?是否可以从 .NET MAUI 应用程序中禁用或删除最小化、恢复和关闭按钮?

I tried this but did not work.我试过这个但没有用。 MAUI .NET Set Window Size 毛伊 .NET 套装 Window 尺寸

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.根据官方文档,如果您的应用程序处于特殊的 model 中,例如全屏 model,系统会隐藏标题栏和三个按钮。

The system reserves the upper-left or upper-right corner of the app window for the system caption buttons (minimize, maximize/restore, close).系统为系统字幕按钮(最小化、最大化/恢复、关闭)保留应用程序 window 的左上角或右上角。 The system retains control of the caption button area to guarantee that minimum functionality is provided for dragging, minimizing, maximizing, and closing the window.系统保留对字幕按钮区域的控制,以确保为拖动、最小化、最大化和关闭 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.通过将这些设置为 false,我能够实现 windows 平台。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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