Reputation: 350
I can hide the status bar on each page but is there an easier way to do this in one place?
Upvotes: 0
Views: 508
Reputation: 707
You can hide it in the App.xaml.cs in the OnLaunched
event handler. In order to avoid adding async
to the OnLaunched
method, you can use Wait()
method of Task
:
StatusBar statusBar = Windows.UI.ViewManagement.StatusBar.GetForCurrentView();
// Hide the status bar
Task hidingStatusBarTask = statusBar.HideAsync();
hidingStatusBarTask.Wait();
Upvotes: 1
Reputation: 759
Go in you App.xaml.cs file and in the OnLaunched
add
this
StatusBar statusBar = Windows.UI.ViewManagement.StatusBar.GetForCurrentView();
// Hide the status bar
await statusBar.HideAsync();
Upvotes: 2