此主题尚未评级 - 评价此主题

包 Class

提供有关应用程序包的信息。

语法


public ref class Package sealed : Object

特性

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

成员

Package类 具有以下类型的成员:

方法

The Package 类 继承以下内容中的方法 Object 类 (C#/VB/C++).

属性

Package类 具有以下属性。

属性访问类型描述

Current

只读Gets the package for the current app.

Dependencies

只读Gets the packages on which the current package depends.

Id

只读Gets the package identity of the current package.

InstalledLocation

只读Gets the location of the installed package.

IsFramework

只读Indicates whether other packages can declare a dependency on this package.

 

示例

使用 Package.Current | current 属性可以获取当前应用程序包。


var myPackage = Windows::ApplicationModel::Package::Current;

要求

最低受支持的客户端

Windows 8 [Windows 应用商店应用, 桌面应用]

最低受支持的服务器

Windows Server 2012 [Windows 应用商店应用, 桌面应用]

最低受支持的电话

Windows Phone 8

命名空间

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

元数据

Windows.winmd

另请参阅

示例
应用程序包信息示例
概念
应用程序包和部署
引用
Package.Current
PackageId

 

 

本文是否对您有所帮助?
(1500 个剩余字符)
© 2013 Microsoft. 版权所有。