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

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

问题描述

我有一个在移动设备上运行的 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 为白色背景和黑色,但应用程序的要求是坚持主题(深色主题中的黑色状态栏,浅色主题中的白色).

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/

它可能对你有帮助.

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

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