Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using StatusBar in Windows Universal App

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?

like image 679
cdecl Avatar asked Sep 22 '15 19:09

cdecl


People also ask

What is the use of status bar in window?

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).

How many status bar does an application have?

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.

What is the use of status bar in MS Word?

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.

Where is status bar in MS Word?

The status bar is at the bottom of the Word window. It is the place for the Zoom Slider and some other controls.


1 Answers

You should add Microsoft Mobile Extension SDK

enter image description here

like image 174
Moises Alexander Salazar Vila Avatar answered Oct 13 '22 01:10

Moises Alexander Salazar Vila