HumanGenome
HumanGenome

Reputation: 35

How to prevent Actions & Notificatins bar from accidental dragging in UWP Phone app

I'm creating a Windows 10 Mobile game which requires fast swiping in horizontal orientation. Due to that fact player can accidentally expand Actions & Notifications bar: enter image description here

Is there a way to prevent this bar from appearing during application runtime? I've seen also in some other apps smaller drag handle: enter image description here How to force switching to this smaller mode?

Upvotes: 1

Views: 128

Answers (1)

Jay Zuo
Jay Zuo

Reputation: 15758

To achieve what you've seen, you can place your app in full-screen mode with setting FullScreenSystemOverlayMode to Minimal.

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.

For more info, please see Remarks and User experience under IsFullScreenMode.

Upvotes: 1

Related Questions