我可以隐藏每个页面上的状态栏,但是是否有一种更简单的方法可以在一个地方进行此操作?
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();
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();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.