更新1:UWP應用如何在全屏顯示狀態欄?
更新2:圖片和更多的細節更新改變了絲毫不差,以反映對這個問題更好,因爲導航欄不能進行手動控制,如狀態欄
好了,所以我想覆蓋應用上的狀態欄並隱藏導航欄。
我使用實現了這個:(這是所有裏面app.xaml.cs)
public override async Task OnInitializeAsync(IActivatedEventArgs args)
{
//this allows nav bar and status bar to overlay the app
ApplicationView.GetForCurrentView().SetDesiredBoundsMode(ApplicationViewBoundsMode.UseCoreWindow);
//this hides nav bar and status bar
ApplicationView.GetForCurrentView().TryEnterFullScreenMode();
{
所以,如果我註釋掉
ApplicationView.GetForCurrentView().TryEnterFullScreenMode();
應用仍然像全屏但現在的導航酒吧只是覆蓋應用程序。而不是全屏行爲(我注意到),它只是普通的導航欄,所以需要全屏。但是,當全屏顯示時,無論我在哪個應用程序中調用它,以下代碼都不會顯示狀態欄。
var statusBar = StatusBar.GetForCurrentView();
await statusBar.ShowAsync();
圖片:
所以我需要一種方法讓狀態欄顯示全屏。
這個應用程序是一個開源項目「口袋妖怪Go客戶端爲WM」在git上。我想要達到這個目標,不僅僅是爲了這個應用程序,而是爲了我的教育。如果您感興趣,可以在此處找到該項目Pokemon Go-UWP for WM
繪製自己的狀態欄。 –
你可以添加一些照片你得到了什麼,你想要什麼? – ad1Dima
而一些xaml可能會有所幫助。聽起來像是一個佈局問題 – lokusking