Share via


PackageCatalog Class

Definition

Provides access to app packages on the device.

public ref class PackageCatalog sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 196608)]
class PackageCatalog final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 196608)]
public sealed class PackageCatalog
Public NotInheritable Class PackageCatalog
Inheritance
Object Platform::Object IInspectable PackageCatalog
Attributes

Windows requirements

Device family
Windows 10 Anniversary Edition (introduced in 10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v3.0)

Remarks

Note that for PackageCatalog events:

  • If the PackageCatalog object is obtained using OpenForCurrentUser, package events will be received for all packages being installed for the current user.

  • If the PackageCatalog object is obtained using OpenForCurrentPackage, package events will be received for the current package or its related packages such as optional packages.

Version history

Windows version SDK version Value added
1703 15063 AddOptionalPackageAsync
1703 15063 PackageContentGroupStaging
1709 16299 RemoveOptionalPackagesAsync
1803 17134 AddResourcePackageAsync
1803 17134 RemoveResourcePackagesAsync

Methods

AddOptionalPackageAsync(String)

Adds an optional package to the package catalog.

AddResourcePackageAsync(String, String, AddResourcePackageOptions)

Adds a resource package to an existing app package.

OpenForCurrentPackage()

Opens the catalog of packages for the main package.

OpenForCurrentUser()

Opens the catalog of app packages on the device that are available to the current user.

OpenForPackage(Package)

Allows listening to any Package and its dependents (optional, resource, and hostRuntime).

RemoveOptionalPackagesAsync(IIterable<String>)

Removes installed optional app packages from the user account.

RemoveResourcePackagesAsync(IIterable<Package>)

Removes resource packages from an existing app package.

Events

PackageContentGroupStaging

The event that is fired when a package content group starts staging.

PackageInstalling

Indicates that an app package is installing.

PackageStaging

Indicates that an app package is staging.

PackageStatusChanged

Indicates that an app package has been removed or updated

PackageUninstalling

Indicates that an app package is uninstalling.

PackageUpdating

Indicates that an app package is being updated.

Applies to

See also