ListingInformation class
Provides the listing info that describes the app in the Windows Store.
Syntax
/* For information about creating or accessing this object, see Remarks. */
Attributes
- MarshalingBehaviorAttribute(Agile)
- ThreadingAttribute(Both)
- VersionAttribute(NTDDI_WIN8)
Members
The ListingInformation class has these types of members:
Methods
The ListingInformation class inherits methods from the Object class (C#/VB/C++).
Properties
The ListingInformation class has these properties.
| Property | Access type | Description |
|---|---|---|
| Read-only | Gets the age rating for the app. | |
| Read-only | Gets the value that indicates the customer's market, such as en-us, that will be used for transactions in the current session. | |
| Read-only | Gets the app's description in the current market. | |
| Read-only | Gets the app's purchase price formatted for the current market and currency. | |
| Read-only | Gets the app's name in the current market. | |
| Read-only | Gets information about the features and products that can be bought by making in-app purchases. |
Remarks
The info that this object returns comes from the listing info you enter when you submit the app to the Windows Store.
You access this object through the LoadListingInformationAsync method of the CurrentAppSimulator object during testing, or the LoadListingInformationAsync method of the CurrentApp object when the app is distributed through the Windows Store.
// get current app object using the simulator interface currentApp = Windows.ApplicationModel.Store.CurrentAppSimulator; // get the listing information for the products this app supports currentApp.loadListingInformationAsync().then( function (listing) { // loadListingInformationAsync returns the ListingInformation object in listing. // get one of the listing properties thisAppsAgeRating = listing.ageRating; } );
Note The CurrentApp object obtains its data from the Windows Store, so you must have a Windows Store developer account and the app must be published in the Windows Store. If you don't have a Windows Store developer account, you can test the functions of this class by using the CurrentAppSimulator.
Examples
This code example shows how to get the ListingInformation from simulated app data and then get the ProductListing object for one of the features offered by the app.
// get current app object using the simulator interface currentApp = Windows.ApplicationModel.Store.CurrentAppSimulator; // get the listing information for the products this app supports currentApp.loadListingInformationAsync().then( function (listing) { // loadListingInformationAsync returns the ListingInformation object in listing. // get one of the listing properties thisAppsPrice = listing.formattedPrice; } );
Requirements
|
Minimum supported client | Windows 8 [Windows Store apps only] |
|---|---|
|
Minimum supported server | Windows Server 2012 [Windows Store apps only] |
|
Minimum supported phone | Windows Phone 8 |
|
Namespace |
|
|
Metadata |
|
See also
Build date: 2/25/2013
