Windows 10移动应用程序中带有黑色字体的黑色StatusBar [英] Black StatusBar with black font in Windows 10 mobile app

查看:53
本文介绍了Windows 10移动应用程序中带有黑色字体的黑色StatusBar的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在移动设备上运行的Windows 10 UWP应用.当我在模拟器中运行该应用程序时,一切正常.当我在设备(Lumia 550)上运行它时,StatusBar为黑色,带有黑色字体,并且状态指示器不可见.

I have a Windows 10 UWP app running on mobile. When I run the app in an emulator, everything works fine. When I run it on a device (Lumia 550), the StatusBar is black with black font and the status indicators are not visible.

这是某种错误吗?

我知道我可以强制StatusBar具有白色背景和黑色,但是应用程序的要求是坚持使用主题(深色主题中为黑色StatusBar,浅色主题中为白色).

I know I can force the StatusBar to have white background and black color, but the requirement for the app is to stick with the theme (black StatusBar in dark theme, white in Light theme).

如果我创建一个新的空Windows 10应用并在设备上运行它,问题是相同的,它不是特定于我的应用的.

If I create a new empty Windows 10 app and run it on a device, the problem is the same, it is not specific to my app.

推荐答案

编辑
这是一个更正确的答案:

Edit
Here's a more proper answer:

在Windows 10移动版中,状态栏从最顶部的页面继承其背景颜色.前景色是从 RequestedTheme 继承的.

In Windows 10 Mobile the statusbar inherits it's background color from the topmost page. The foreground color is inherited from RequestedTheme.

这意味着,如果将页面的背景色设置为黑色,而将 RequestedTheme 设置为 Light (提供白色前景色),则文本将为黑色黑色.

This means that if you set the background color of your page to black and your RequestedTheme to Light (which gives a white foreground color), the text will be black on black.

原始帖子
您阅读过吗?:https://stenobot.wordpress.com/2015/07/08/uwp-app-development-styling-the-mobile-status-bar/

这可能会对您有所帮助.

It might help you.

这篇关于Windows 10移动应用程序中带有黑色字体的黑色StatusBar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆