UWP全屏显示:如何在悬停时隐藏任务栏? [英] UWP fullscreen: How to hide taskbar on hover?

查看:133
本文介绍了UWP全屏显示:如何在悬停时隐藏任务栏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当您在UWP上处于全屏模式"时,当您用鼠标光标触摸显示屏的底部/顶部时,任务栏/窗口标题始终会显示.在UWP版本的《古墓丽影:崛起》中,出现了一个小的蓝色矩形,您必须单击以显示任务栏/窗口标题.如何在C#/XAML UWP游戏中实现类似的行为?谢谢!

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!

推荐答案

在UWP版本的《古墓丽影:崛起》中,出现了一个小的蓝色矩形,您必须单击以显示任务栏/窗口标题.

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.

如何在C#/XAML UWP游戏中实现类似的行为?

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

您可以设置 FullScreenSystemOverlayMode 当您的应用进入全屏模式时,有两种系统覆盖模式:

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

这篇关于UWP全屏显示:如何在悬停时隐藏任务栏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆