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?
A status bar is an area at the bottom of a primary window that displays information about the current window's state (such as what is being viewed and how), background tasks (such as printing, scanning, and formatting), or other contextual information (such as selection and keyboard state).
Multiple-Part Status Bars A status bar can have a maximum of 256 parts, although applications typically use far fewer than that. You retrieve a count of the parts in a status bar, as well as the coordinate of the right edge of each part, by sending the window an SB_GETPARTS message.
The status bar is the area at the bottom of the Word window. It indicates information about the current document. It displays information about what page you are on, as well as your line number on the page and character number on the line. It also shows information about which editing toggles you have turned on.
The status bar is at the bottom of the Word window. It is the place for the Zoom Slider and some other controls.
You should add Microsoft Mobile Extension SDK
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With