Windows Dev Center

Package class

Provides information about a package.

Syntax


var package = Windows.ApplicationModel.Package;

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-onlyGets the package for the current app.

Dependencies

Read-onlyGets the packages on which the current package depends.

Description

Read-onlyGets the description of the package.

DisplayName

Read-onlyGets the display name of the package.

Id

Read-onlyGets the package identity of the current package.

InstallDate

Read-onlyWindows Phone only. Gets the date the application package was installed on the user's phone.

InstalledDate

Read-onlyGets the date on which the application package was installed or last updated.

InstalledLocation

Read-onlyGets the location of the installed package.

IsBundle

Read-onlyIndicates whether the package is a bundle package.

IsDevelopmentMode

Read-onlyIndicates whether the package is installed in development mode.

IsFramework

Read-onlyIndicates whether other packages can declare a dependency on this package.

IsResourcePackage

Read-onlyIndicates whether the package is a resource package.

Logo

Read-onlyGets the logo of the package.

PublisherDisplayName

Read-onlyGets the publisher display name of the package.

Status

Read-onlyGet 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

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
App packages and deployment
Reference
Package.Current
PackageId

 

 

Show:
© 2015 Microsoft