繁体   English   中英

在状态栏中更改图标的颜色-Windows 10移动UWP应用

[英]Change color of icons in status bar - Windows 10 Mobile UWP app

我有一个在Microsoft / Windows Store中发布的uwp应用程序,我想更改状态栏中的图标颜色。 我知道会更改状态栏背景的颜色,但是如何更改Windows 10 Mobile中状态栏中图标的颜色?

像这样:

if (ApiInformation.IsTypePresent("Windows.UI.ViewManagement.StatusBar"))
{
    var statusBar = StatusBar.GetForCurrentView();
    if (statusBar != null)
        statusBar.ForegroundColor = Colors.Red;
}

您还需要在项目中添加对Windows Mobile Extensions的引用: 在此处输入图片说明

暂无
暂无

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

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