EN
Este conteúdo não está disponível em seu idioma, mas aqui está a versão em inglês.

Package class

Applies to Windows and Windows Phone

Provides information about a package.

Syntax


var package = Windows.ApplicationModel.Package;

Attributes

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

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.

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.

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.

 

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

 

 

Mostrar:
© 2014 Microsoft