我正在使用 UWP .net 核心。 该应用程序在桌面上看起来不错,但在移动设备上有一个白色条纹而不是状态栏。
我读了一篇关于
StatusBar.GetForCurrentView().BackgroundColor = Colors.Black;
StatusBar.GetForCurrentView().BackgroundOpacity = 1;
但是 Visual Studio 找不到“StatusBar”。 我能做些什么?
谢谢
最佳答案
您需要将 Windows Mobile Extension SDK 添加到您的项目中,因为这仅适用于移动设备。
右键点击你的项目,去
Add > Reference...
当 Reference Manager 窗口弹出时,选择
Universal Windows > Extensions
在左 Pane 中,然后选择具有目标版本的 SDK。
关于c# - 缺少手机状态栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45801052/