6

我想自定义初始屏幕期间显示的状态栏的颜色。

以前在 Windows Phone 8.1 上工作的东西在 Windows 10 上似乎被破坏了。
我使用启动画面 PNG 并将Splash Screen Background color我的包清单中的颜色设置为与 PNG 相同的颜色。

这是在 WP8.1 设备上运行的 Windows Phone 8.1 应用程序的结果:

以及在 Windows 10 上运行的相同应用程序:

Windows 10 应用程序也是如此,状态栏始终为黑色。
有没有办法在 Windows 10 Mobile 上设置彩色状态栏?

4

2 回答 2

1

这似乎是 Windows 10 移动版预览版中的一个错误。现在已修复(内部版本 10.0.10586.11)。

于 2015-12-07T13:51:36.953 回答
-3

其实你可以很容易地做到这一点!首先,验证此 API 是否存在。

看看这个:

if (Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.UI.ViewManagement.StatusBar"))
            {
                var statusBar = Windows.UI.ViewManagement.StatusBar.GetForCurrentView();
                statusBar.BackgroundColor = Windows.UI.Colors.Transparent;
                statusBar.ForegroundColor = Windows.UI.Colors.Red;
            }
于 2015-09-03T04:07:25.410 回答