UWP fullscreen: How to hide taskbar on hover?

此生再无相见时 提交于 2019-12-13 02:37:39

问题


When you are in "fullscreen-mode" on UWP the taskbar / window header always shows up, when you are touching the bottom / top of the display with your mouse cursor. In the UWP version of Rise of the Tomb Raider a small blue rectangle appears instead, that you have to click to show the taskbar / window header. How can I achieve a similar behaviour in my C#/XAML UWP game? Thanks!


回答1:


In the UWP version of Rise of the Tomb Raider a small blue rectangle appears instead, that you have to click to show the taskbar / window header.

First I want to say, it is not always a blue rectangle, this rectangle's color is changed along with system's theme.

How can I achieve a similar behaviour in my C#/XAML UWP game?

You can set the FullScreenSystemOverlayMode when your app enters full screen mode, there are two system overlay mode: Standard, Minimal.

By default in full-screen mode, Standard mode will be used, now you can set it like this:

ApplicationView.GetForCurrentView().FullScreenSystemOverlayMode = FullScreenSystemOverlayMode.Minimal;
ApplicationView.GetForCurrentView().TryEnterFullScreenMode();



回答2:


On system level you can locally disable even "small blue rectangle" by creating DWORD name AllowEdgeSwipe in

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\EdgeUI

and set it to 0.



来源:https://stackoverflow.com/questions/37601081/uwp-fullscreen-how-to-hide-taskbar-on-hover

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!