cde*_*ecl 5 .net c# windows universal
我正在尝试使用以下代码从视图构造函数中检索StatusBar对象:
bool mobile = Windows.Foundation.Metadata.ApiInformation.IsApiContractPresent("Windows.Phone.PhoneContract",1,0);
if(mobile) {
var statusbar = Windows.UI.ViewManagement.StatusBar.GetForCurrentView();
}
使用Visual Studio Community 2015,我收到以下错误:
Error CS0731 The type forwarder for type 'Windows.UI.ViewManagement.StatusBar' in assembly 'Windows' causes a cycle
Error CS1069 The type name 'StatusBar' could not be found in the namespace 'Windows.UI.ViewManagement'. This type has been forwarded to assembly 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime' Consider adding a reference to that assembly.
根据微软的说法,这个类应该存在.我甚至为Mobile设备系列添加了对Package.appxmanifest的依赖,但仍然没有.有任何想法吗?
| 归档时间: |
|
| 查看次数: |
2511 次 |
| 最近记录: |