ListingInformation ListingInformation ListingInformation ListingInformation ListingInformation Class

Definition

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

public : sealed class ListingInformation : IListingInformation, IListingInformation2
struct winrt::Windows::ApplicationModel::Store::ListingInformation : IListingInformation, IListingInformation2
public sealed class ListingInformation : IListingInformation, IListingInformation2
Public NotInheritable Class ListingInformation Implements IListingInformation, IListingInformation2
// This class does not provide a public constructor.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

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;
    }
);
// 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.

Properties

AgeRating AgeRating AgeRating AgeRating AgeRating

Gets the age rating for the app.

CurrencyCode CurrencyCode CurrencyCode CurrencyCode CurrencyCode

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

CurrentMarket CurrentMarket CurrentMarket CurrentMarket 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 Description Description Description Description

Gets the app's description in the current market.

FormattedBasePrice FormattedBasePrice FormattedBasePrice FormattedBasePrice FormattedBasePrice

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

FormattedPrice FormattedPrice FormattedPrice FormattedPrice FormattedPrice

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

IsOnSale IsOnSale IsOnSale IsOnSale IsOnSale

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

Name Name Name Name Name

Gets the app's name in the current market.

ProductListings ProductListings ProductListings ProductListings ProductListings

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

SaleEndDate SaleEndDate SaleEndDate SaleEndDate SaleEndDate

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

See Also