5

I'm trying to retrieve the StatusBar object from within the view constructor using the following code: bool mobile = Windows.Foundation.Metadata.ApiInformation.IsApiContractPresent("Windows.Phone.PhoneContract",1,0); if(mobile) { var statusbar = Windows.UI.ViewManagement.StatusBar.GetForCurrentView(); }

Using Visual Studio Community 2015, I get the following errors: 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.

According to Microsoft, this class should be present. I even added a dependency to Package.appxmanifest for the Mobile device family and still nothing. Any ideas?

optlink
  • 55
  • 1
  • 3

1 Answers1

11

You should add Microsoft Mobile Extension SDK

enter image description here