Provides access to the current app's license metadata.
public : sealed class LicenseInformation : ILicenseInformation
struct winrt::Windows::ApplicationModel::Store::LicenseInformation : ILicenseInformation
public sealed class LicenseInformation : ILicenseInformation
Public NotInheritable Class LicenseInformation Implements ILicenseInformation
// This class does not provide a public constructor.
Windows 10 (introduced v10.0.10240.0)
Windows.Foundation.UniversalApiContract (introduced v1)
For app trial versions of an app, IsActive will return true so long as the trial hasn’t expired. During the trial period the IsTrial returns true; returning false when the customer upgrades to the full version of the app.
You access this object through the LicenseInformation property of the CurrentAppSimulator object during testing, or the LicenseInformation property of the CurrentApp object when the app is distributed through the Microsoft Store.
The CurrentApp object obtains its data from the Microsoft Store, which requires that you have a Microsoft Store developer account and that the app has been 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.
|ExpirationDate ExpirationDate ExpirationDate ExpirationDate ExpirationDate||
Gets the license expiration date and time relative to the system clock.
|IsActive IsActive IsActive IsActive IsActive||
Gets a value that indicates whether the license is active.
|IsTrial IsTrial IsTrial IsTrial IsTrial||
Gets a value that indicates whether the license is a trial license.
|ProductLicenses ProductLicenses ProductLicenses ProductLicenses ProductLicenses||
Gets the associative list of licenses for in-app products that the user is currently entitled to.
|LicenseChanged LicenseChanged LicenseChanged LicenseChanged LicenseChanged||
Raises a notification event when the status of the app's license changes.