Disable fullscreen/maximise button in UWP-applicat

2019-07-10 22:49发布

I'm working on a Universal Windows Platform-application for desktop platforms. How can I disable/remove the maximise-button from a <page> or <application> in Windows 10?

4条回答
冷血范
2楼-- · 2019-07-10 23:12

There could be another workaround for this : Although you cannot disable the AppTitle bar but you can try entering your view to full view so that it covers up the Title bar and then you can add a custom title bar if you need to customize the functionality.

https://social.msdn.microsoft.com/Forums/windowsapps/en-US/830607c5-0b2a-4309-b59c-ab4b381cf128/what-is-the-easiest-way-to-show-full-screen-button-in-the-app-title-bar?forum=wpdevelop#9b3d0f1a-dfa9-4949-8785-80a74e911790

查看更多
来,给爷笑一个
3楼-- · 2019-07-10 23:18

We can hide the maximize and minimize buttons by the ResizeMode property in our .xaml like this

ResizeMode="NoResize" //CanMinimize || CanResize || CanResizeWithGrip

Resize mode will allow any of the four values for the Window element in the form.

查看更多
我命由我不由天
4楼-- · 2019-07-10 23:26

You cannot. I didn't see any option to disable these buttons. You can only change their colors.

ApplicationViewTitleBar titlebar = ApplicationView.GetForCurrentView().TitleBar;

titlebar.ButtonBackgroundColor = Windows.UI.Color.FromArgb(255, 126, 188, 66);
titlebar.ButtonForegroundColor = Windows.UI.Colors.White;
查看更多
祖国的老花朵
5楼-- · 2019-07-10 23:30

If the objective of removing the Maximize/Minimize button is to run the app in Kiosk mode then you can see something like https://technet.microsoft.com/itpro/windows/manage/set-up-a-kiosk-for-windows-10-for-desktop-editions

However, you cannot remove these things programatically

查看更多
登录 后发表回答