简体   繁体   English

如何在Xamarin.Forms的状态栏上启动页面?

[英]how to start page over status bar in Xamarin.Forms?

In Xamarin.Forms, how do I make the status bar transparent, and start my page behind it? 在Xamarin.Forms中,如何使状态栏透明,并在其后面启动页面?

I'm not using a nav bar, and I'm hiding the title bar. 我没有使用导航栏,而是隐藏了标题栏。 I have a header image, and instead of the status bar(top of the phone that shows carrier, battery %, time etc) being black, i'd like my page to be behind it. 我有一个标题图像,而不是状态栏(电话的顶部显示运营商,电池%,时间等)是黑色的,我希望页面位于它的后面。

Is this possible in xamarin.forms, and how would I go about it? 在xamarin.forms中可能吗,我将如何处理?

Thanks! 谢谢!

Try to put this in info.plist 尝试将其放在info.plist中

    <key>UIStatusBarHidden</key>
    <true/>
    <key>UIViewControllerBasedStatusBarAppearance</key>
    <false/>

Best regards, 最好的祝福,

https://innovia.me https://innovia.me

For iOS you can do 对于iOS,您可以执行

NavigationPage.SetHasNavigationBar(this,false);

but for Android it depends on version. 但对于Android,则取决于版本。 Here is the link 链接在这里

Hiding the Status Bar 隐藏状态栏

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM