Search code examples
c#xamlfullscreenuwpuwp-xaml

UWP fullscreen: How to hide taskbar on hover?


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!

Hidden taskbar Hidden image header


Solution

  • 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();