标签: c# xaml mobile uwp .net-core
我正在使用UWP .net核心。 该应用程序在桌面上看起来很好,但在移动设备上有一个白色条纹而不是状态栏。
我读了一篇关于
StatusBar.GetForCurrentView().BackgroundColor = Colors.Black; StatusBar.GetForCurrentView().BackgroundOpacity = 1;
但是Visual Studio找不到“StatusBar”。 我能做什么?
谢谢
答案 0 :(得分:6)
您需要将 Windows Mobile Extension SDK 添加到您的项目中,因为这仅适用于移动设备。
右键单击您的项目,转到
添加> 参考... 的
当弹出参考管理器窗口时,选择
通用Windows > 扩展程序
,然后选择包含您要定位的版本的SDK。