Package Package Package Package Package Class

Definition

Provides information about a package.

public : sealed class Package : IPackage, IPackage2, IPackage3, IPackage4, IPackage5, IPackage6, IPackageWithMetadata
struct winrt::Windows::ApplicationModel::Package : IPackage, IPackage2, IPackage3, IPackage4, IPackage5, IPackage6, IPackageWithMetadata
public sealed class Package : IPackage, IPackage2, IPackage3, IPackage4, IPackage5, IPackage6, IPackageWithMetadata
Public NotInheritable Class Package Implements IPackage, IPackage2, IPackage3, IPackage4, IPackage5, IPackage6, IPackageWithMetadata
// This class does not provide a public constructor.
Attributes

Windows 10 requirements

Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

Although Package is supported in desktop apps, some members of this class are supported only in UWP app. The remarks section will indicate whether a member has any restrictions on its behavior.

Properties

Current Current Current Current Current

Gets the package for the current app.

Dependencies Dependencies Dependencies Dependencies Dependencies

Gets the packages on which the current package depends.

Description Description Description Description Description

Gets the description of the package.

DisplayName DisplayName DisplayName DisplayName DisplayName

Gets the display name of the package.

Id Id Id Id Id

Gets the package identity of the current package.

InstallDate InstallDate InstallDate InstallDate InstallDate

Windows Phone only. Gets the date the application package was installed on the user's phone.

InstalledDate InstalledDate InstalledDate InstalledDate InstalledDate

Gets the date on which the application package was installed or last updated.

InstalledLocation InstalledLocation InstalledLocation InstalledLocation InstalledLocation

Gets the location of the installed package.

IsBundle IsBundle IsBundle IsBundle IsBundle

Indicates whether the package is a bundle package.

IsDevelopmentMode IsDevelopmentMode IsDevelopmentMode IsDevelopmentMode IsDevelopmentMode

Indicates whether the package is installed in development mode.

IsFramework IsFramework IsFramework IsFramework IsFramework

Indicates whether other packages can declare a dependency on this package.

IsOptional IsOptional IsOptional IsOptional IsOptional

Indicates whether the package is optional.

IsResourcePackage IsResourcePackage IsResourcePackage IsResourcePackage IsResourcePackage

Indicates whether the package is a resource package.

Logo Logo Logo Logo Logo

Gets the logo of the package.

PublisherDisplayName PublisherDisplayName PublisherDisplayName PublisherDisplayName PublisherDisplayName

Gets the publisher display name of the package.

SignatureKind SignatureKind SignatureKind SignatureKind SignatureKind

How the app package is signed.

Status Status Status Status Status

Get the current status of the package for the user.

Methods

CheckUpdateAvailabilityAsync() CheckUpdateAvailabilityAsync() CheckUpdateAvailabilityAsync() CheckUpdateAvailabilityAsync() CheckUpdateAvailabilityAsync()

The CheckUpdateAvailabilityAsync method allows developers to check for updates to the main app package listed in the .appinstaller file. It allows the developer to determine if the updates are required due to .appinstaller policy. This method currently only works for applications installed via .appinstaller files.

GetAppInstallerInfo() GetAppInstallerInfo() GetAppInstallerInfo() GetAppInstallerInfo() GetAppInstallerInfo()

The GetAppInstallerInfo() method returns the .appinstaller xml file location. This allows app developers to retrieve the .appinstaller xml file location when needed by their app.

GetAppListEntriesAsync() GetAppListEntriesAsync() GetAppListEntriesAsync() GetAppListEntriesAsync() GetAppListEntriesAsync()

Enumerates the packaged apps on the device. Only apps included in the current package are returned.

GetContentGroupAsync(String) GetContentGroupAsync(String) GetContentGroupAsync(String) GetContentGroupAsync(String) GetContentGroupAsync(String)

Provides information about the package content group such as its state, name, whether it is required, and so on.

GetContentGroupsAsync() GetContentGroupsAsync() GetContentGroupsAsync() GetContentGroupsAsync() GetContentGroupsAsync()

Provides information about all of the package content groups in the app and their state, name, whether they are required, and so on.

GetThumbnailToken() GetThumbnailToken() GetThumbnailToken() GetThumbnailToken() GetThumbnailToken()

Windows Phone only. Returns a token that can be used to retrieve the thumbnail image associated with this application package.

Launch(String) Launch(String) Launch(String) Launch(String) Launch(String)

Windows Phone only. Launches the specified application.

SetInUseAsync(Boolean) SetInUseAsync(Boolean) SetInUseAsync(Boolean) SetInUseAsync(Boolean) SetInUseAsync(Boolean)

Sets whether the package is in use or not.

StageContentGroupsAsync(IIterable<String>) StageContentGroupsAsync(IIterable<String>) StageContentGroupsAsync(IIterable<String>) StageContentGroupsAsync(IIterable<String>) StageContentGroupsAsync(IIterable<String>)

Put the packages in the specified content groups into the staging queue.

StageContentGroupsAsync(IIterable<String>, Boolean) StageContentGroupsAsync(IIterable<String>, Boolean) StageContentGroupsAsync(IIterable<String>, Boolean) StageContentGroupsAsync(IIterable<String>, Boolean) StageContentGroupsAsync(IIterable<String>, Boolean)

Put the packages in the specified content groups into the staging queue; optionally placing the content groups at the head of the queue.

VerifyContentIntegrityAsync() VerifyContentIntegrityAsync() VerifyContentIntegrityAsync() VerifyContentIntegrityAsync() VerifyContentIntegrityAsync()

Ensures that the package has not been modified or tampered with before being loaded.

See also