Share via


ListingInformation Class

Definition

Provides the listing info that describes the app in the Microsoft Store.

public ref class ListingInformation sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class ListingInformation final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class ListingInformation
Public NotInheritable Class ListingInformation
Inheritance
Object Platform::Object IInspectable ListingInformation
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

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 the license info for this app from the simulator
ListingInformation listing = await CurrentAppSimulator.LoadListingInformationAsync();

// get the price of the app from the listing info.
String thisAppsPrice = listing.FormattedPrice;

Remarks

The info that this object returns comes from the listing info you enter when you submit the app to the Microsoft 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 Microsoft Store.

Note

The CurrentApp object obtains its data from the Microsoft Store, so you must have a Microsoft Store developer account and the app must be published in the Microsoft Store. If you don't have a Microsoft Store developer account, you can test the functions of this class by using the CurrentAppSimulator.

Version history

Windows version SDK version Value added
1511 10586 CurrencyCode
1511 10586 FormattedBasePrice
1511 10586 IsOnSale
1511 10586 SaleEndDate

Properties

AgeRating

Gets the age rating for the app.

CurrencyCode

Gets the currency code associated with the user's market, such as USD or CAD.

CurrentMarket

Gets the country code associated with the user's location, such as US or CA, that is used to identify their market for transactions in the current session.

Description

Gets the app's description in the current market.

FormattedBasePrice

Gets the app's base price formatted for the current market and currency.

FormattedPrice

Gets the app's purchase price formatted for the current market and currency.

IsOnSale

Gets a value that indicates whether the app is on sale.

Name

Gets the app's name in the current market.

ProductListings

Gets information about add-ons (also called in-app products or IAPs) available for purchase.

SaleEndDate

Gets the end date of the sale period for the app.

Applies to

See also