MSDN Library
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Package class

Provides information about a package.

Syntax


public ref class Package sealed 

Members

The Package class has these types of members:

Methods

The Package class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
GetAppListEntriesAsync Enumerates the packaged apps on the device.
GetThumbnailToken Windows Phone only. Returns a token that can be used to retrieve the thumbnail image associated with this application package.
Launch Windows Phone only. Launches the specified application.

 

Properties

The Package class has these properties.

PropertyAccess typeDescription

Current

Read-only

Gets the package for the current app.

Dependencies

Read-only

Gets the packages on which the current package depends.

Description

Read-only

Gets the description of the package.

DisplayName

Read-only

Gets the display name of the package.

Id

Read-only

Gets the package identity of the current package.

InstallDate

Read-only

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

InstalledDate

Read-only

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

InstalledLocation

Read-only

Gets the location of the installed package.

IsBundle

Read-only

Indicates whether the package is a bundle package.

IsDevelopmentMode

Read-only

Indicates whether the package is installed in development mode.

IsFramework

Read-only

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

IsOptional

Read-only

Indicates whether the package is optional.

IsResourcePackage

Read-only

Indicates whether the package is a resource package.

Logo

Read-only

Gets the logo of the package.

PublisherDisplayName

Read-only

Gets the publisher display name of the package.

SignatureKind

Read-only

How the app package is signed.

Status

Read-only

Get the current status of the package for the user.

 

Examples

Use the Package.Current | current property to get the package for the current app.


var myPackage = Windows::ApplicationModel::Package::Current;

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.ApplicationModel
Windows::ApplicationModel [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8 [Windows Store apps, desktop apps]

Minimum supported server

Windows Server 2012 [Windows Store apps, desktop apps]

Minimum supported phone

Windows Phone 8

Namespace

Windows.ApplicationModel
Windows::ApplicationModel [C++]

Metadata

Windows.winmd

Attributes

[DualApiPartition()]
[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06020000)]

See also

Object
Samples
App package information sample
Concepts
Packaging apps
Reference
Package.Current
PackageId

 

 

Show:
© 2016 Microsoft