StoreContext.GetDefault Method

Definition

Gets a StoreContext object that can be used to access and manage Microsoft Store-related data for the current user in the context of the current app.

public:
 static StoreContext ^ GetDefault();
 static StoreContext GetDefault();
public static StoreContext GetDefault();
function getDefault()
Public Shared Function GetDefault () As StoreContext

Returns

An object that you can use to access and manage Microsoft Store-related data for the current user.

Remarks

If your app is a single-user app (that is, it runs only in the context of the user that launched the app), use the GetDefault method to get a StoreContext object that you can use to access and manage Microsoft Store-related data for the user. Most Universal Windows Platform (UWP) apps are single-user apps. For more information about this method, see In-app purchases and trials.

If your app is a multi-user app, use the GetForUser method to get a StoreContext object for a specific user.

Applies to

See also