我想自定义启动画面期间显示的状态栏的颜色。
以前在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上设置彩色状态栏?
答案 0 :(得分:1)
似乎这是Windows 10移动版预览版中的一个错误。 它现在已经修复(build 10.0.10586.11)。
答案 1 :(得分:-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;
}