Delen via


StorePackageUpdate.Mandatory Property

Definition

Gets a value that indicates whether the package that has an update available for download from the Microsoft Store is a mandatory package, as specified by the developer in Partner Center.

public:
 property bool Mandatory { bool get(); };
bool Mandatory();
public bool Mandatory { get; }
var boolean = storePackageUpdate.mandatory;
Public ReadOnly Property Mandatory As Boolean

Property Value

Boolean

bool

True if the package is a mandatory package; otherwise, false.

Remarks

The mandatory status of a package is not enforced by Microsoft, and the OS does not provide a UI to indicate to users that a mandatory app must be installed. Developers are intended to use the mandatory setting to enforce mandatory app updates in their own code that uses GetAppAndOptionalStorePackageUpdatesAsync to determine which packages have updates available and RequestDownloadStorePackageUpdatesAsync or RequestDownloadAndInstallStorePackageUpdatesAsync to download or install the updated packages.

For more information about using this property, including a code example, see Download and install package updates for your app.

Applies to

See also