问题
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