Package class

1 out of 4 rated this helpful - Rate this topic

Provides information about an app package.

Syntax


var package = Windows.ApplicationModel.Package;

Attributes

DualApiPartitionAttribute()
MarshalingBehaviorAttribute(Agile)
StaticAttribute(Windows.ApplicationModel.IPackageStatics, NTDDI_WIN8)
ThreadingAttribute(Both)
VersionAttribute(NTDDI_WIN8)

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
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.

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.

InstalledLocation

Read-onlyGets the location of the installed package.

IsFramework

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

 

Examples

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


var myPackage = Windows.ApplicationModel.Package.current;

Requirements

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

See also

Samples
App package information sample
Concepts
App packages and deployment
Reference
Package.Current
PackageId

 

 

Build date: 2/25/2013

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.