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.
| Method | Description |
|---|---|
| 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.
| Property | Access type | Description |
|---|---|---|
| Read-only | Gets the package for the current app. | |
| Read-only | Gets the packages on which the current package depends. | |
| Read-only | Gets the package identity of the current package. | |
| Read-only | Windows Phone only. Gets the date the application package was installed on the user's phone. | |
| Read-only | Gets the location of the installed package. | |
| Read-only | Indicates 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 |
|
|
Metadata |
|
See also
- Samples
- App package information sample
- Concepts
- App packages and deployment
- Reference
- Package.Current
- PackageId
Build date: 2/25/2013