Collapse the table of content
Expand the table of content

Windows.ApplicationModel.Store namespace

Provides types and members for interacting with the Windows Store. You can use the members of this class to check the license state of the app and determine if it's a trial version or an active license. You can also check in-app features and enable in-app product purchases. This class also allows you to simulate these functions before you submit the app to the Windows Store.

You need a valid Windows Store developer account to interact with the Windows Store. If you don't have a Windows Store developer account, you can use only the simulated functions.

Note  If your app targets Windows 10, version 1607 or later, we recommend that you use members of the Windows.Services.Store namespace instead of the Windows.ApplicationModel.Store namespace. The Windows.Services.Store namespace supports the latest add-on types, such as Store-managed consumable add-ons, and is designed to be compatible with future types of products and features supported by Windows Dev Center and the Store. The Windows.Services.Store namespace is also designed to have better performance. For more information, see In-app purchases and trials.


The Windows.ApplicationModel.Store namespace has these types of members:


CurrentApp Defines methods and properties you can use to get license and listing info about the current app and perform in-app product purchases.
CurrentAppSimulator Defines methods and properties used to instantiate an object that you can use to get simulated license info during testing.
LicenseInformation Provides access to the current app's license metadata.
ListingInformation Provides the listing info that describes the app in the Windows Store.
ProductLicense Provides info about a license that is associated with an add-on (also called an in-app product or IAP).
ProductListing Provides localized information that details an add-on (also called an in-app product or IAP).
ProductPurchaseDisplayProperties Used to provide the product name that is displayed to the user at time of purchase. This class is used in the creation of a RequestProductPurchaseAsync operation to visually represent a specific offer within a large catalog of in-app products, which is represented by a single product entry in the Windows Store.
PurchaseResults Contains information detailing the results of an in-app product purchase transaction.
UnfulfilledConsumable Contains purchase and product information for an unfulfilled consumable in-app product.



The Windows.ApplicationModel.Store namespace has these delegates.

LicenseChangedEventHandler Represents the method that will handle the LicenseChanged event.



The Windows.ApplicationModel.Store namespace has these enumerations.

FulfillmentResult Defines values used to indicate fulfillment status for a consumable in-app product.
ProductPurchaseStatus Defines values used to indicate the transaction status when purchasing an in-app product.
ProductType Specifies the product type for an in-app product.



Note  The Windows.ApplicationModel.Store namespace is not supported in Windows desktop applications that use the Desktop Bridge. These applications must use the Windows.Services.Store namespace to implement in-app purchases and trials. For more information, see In-app purchases and trials.

See also

Store sample (UWP)
Trial app and in-app purchase sample (Windows 8.1)



© 2017 Microsoft