Windows Dev Center

Package.Current | current property

Gets the package for the current app.

Important  Although Package is supported in desktop apps, this member is supported only in Windows Store apps. To access a package object from a desktop app, use Windows.Management.Deployment.PackageManager.

Syntax


public:
static property Package^ Current { 
   Package^ get();
}

Property value

Type: Package

The package.

Examples

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


var package = 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

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8

Namespace

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

Metadata

Windows.winmd

See also

Samples
App package information sample
Reference
Package

 

 

Show:
© 2015 Microsoft