如何防止操作和通知栏在 UWP Phone 应用程序中意外拖动
How to prevent Actions & Notificatins bar from accidental dragging in UWP Phone app
我正在创建一个 Windows 10 手机游戏,它需要在水平方向上快速滑动。由于这个事实,玩家可能会不小心展开操作和通知栏:
有没有办法阻止这个栏在应用程序运行时出现?我还在其他一些应用程序中看到了较小的拖动手柄:
如何强制切换到这种较小的模式?
要实现您所看到的效果,您可以将应用置于全屏模式,并将FullScreenSystemOverlayMode设置为最小[=22] =].
Windows.UI.ViewManagement.ApplicationView.PreferredLaunchWindowingMode = Windows.UI.ViewManagement.ApplicationViewWindowingMode.FullScreen;
var view = Windows.UI.ViewManagement.ApplicationView.GetForCurrentView();
view.FullScreenSystemOverlayMode = Windows.UI.ViewManagement.FullScreenSystemOverlayMode.Minimal;
In full-screen mode:
On the mobile device family, the user can swipe from the bottom to bring up the navigation bar (Back, Start, Cortana). They can also swipe from the top to bring up Action Center.
On the desktop device family, the user can swipe from the bottom to bring up the navigation bar (taskbar). They can swipe from the left to bring up Task View, from the right to bring up Action Center, and from the top to bring up the title bar.
You can suppress edge swipes and show a small UI instead by setting FullScreenSystemOverlayMode to Minimal.
更多信息,请参阅IsFullScreenMode下的备注和用户体验。
我正在创建一个 Windows 10 手机游戏,它需要在水平方向上快速滑动。由于这个事实,玩家可能会不小心展开操作和通知栏:
有没有办法阻止这个栏在应用程序运行时出现?我还在其他一些应用程序中看到了较小的拖动手柄:
要实现您所看到的效果,您可以将应用置于全屏模式,并将FullScreenSystemOverlayMode设置为最小[=22] =].
Windows.UI.ViewManagement.ApplicationView.PreferredLaunchWindowingMode = Windows.UI.ViewManagement.ApplicationViewWindowingMode.FullScreen;
var view = Windows.UI.ViewManagement.ApplicationView.GetForCurrentView();
view.FullScreenSystemOverlayMode = Windows.UI.ViewManagement.FullScreenSystemOverlayMode.Minimal;
In full-screen mode:
On the mobile device family, the user can swipe from the bottom to bring up the navigation bar (Back, Start, Cortana). They can also swipe from the top to bring up Action Center.
On the desktop device family, the user can swipe from the bottom to bring up the navigation bar (taskbar). They can swipe from the left to bring up Task View, from the right to bring up Action Center, and from the top to bring up the title bar.
You can suppress edge swipes and show a small UI instead by setting FullScreenSystemOverlayMode to Minimal.
更多信息,请参阅IsFullScreenMode下的备注和用户体验。