导出 (0) 打印
全部展开
信息
您所需的主题如下所示。但此主题未包含在此库中。

DataPackagePropertySetView Class

获取 DataPackageView 对象的属性集。

语法


var dataPackagePropertySetView = dataPackageView.properties;

特性

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

成员

DataPackagePropertySetView类 具有这些类型的成员:

方法

The DataPackagePropertySetView 类 具有这些方法。 对于 C#、Visual Basic 和 C++,它还继承方法于Object 类.

方法说明
ContainsKey [C#, VB]Returns a value that indicates whether a specified key exists in the DataPackagePropertySetView.
First [C++, JavaScript]Returns an iterator to enumerate the items in the property set.
HasKey [C++, JavaScript]Indicates whether the DataPackagePropertySetView object contains a specific property.
Lookup [C++, JavaScript]Retrieves the value of a specific property.
Split [C++, JavaScript]Divides the object into two views
TryGetValue [C#, VB]Returns a value that indicates whether a specified key exists in the DataPackagePropertySetView. If an item with that key exists, the item is retrieved as an out parameter.

 

属性

DataPackagePropertySetView类 具有这些属性。

属性访问类型说明

ApplicationListingUri

只读Gets the Uniform Resource Identifier (URI) of the app's location in the Windows Store.

ApplicationName

只读Gets the name of the app that created the DataPackage object.

ContentSourceApplicationLink

只读Gets the application link to the content from the source app.

ContentSourceWebLink

只读Gets a web link to shared content that's currently displayed in the app.

Count [C#, VB]

只读Gets the number of elements contained in the collection.

Description

只读Gets the text that describes the contents of the DataPackage.

FileTypes

只读Gets a vector object that contains the types of files stored in the DataPackage object.

Item [C#, VB]

只读Gets or sets the element value at the specified key index.

Keys [C#, VB]

只读Gets an ICollection object containing the keys of the DataPackagePropertySetView.

LogoBackgroundColor

只读Gets a background color for the sharing app's Square30x30Logo.

PackageFamilyName

只读Gets the package family name of the source app.

Size [C++, JavaScript]

只读Gets the number of items that are contained in the property set.

Square30x30Logo

只读Gets the source app's logo.

Thumbnail

只读Gets the thumbnail image for the DataPackageView.

Title

只读Gets the text that displays as a title for the contents of the DataPackagePropertySetView object.

Values [C#, VB]

只读Gets an ICollection object containing the values of the DataPackagePropertySetView .

 

备注

除了共享内容以外,DataPackageView 对象的每个实例都支持一组属性。目标应用程序可以使用这些属性来了解 DataPackageView 的内容的更多信息。

此类直接支持若干默认属性,如 thumbnailtitledescription。目标应用程序通过 LookupTryGetValue 方法可以访问特定的属性。

集合成员列表

对于 JavaScript,DataPackagePropertySetView 支持使用索引访问项目。

Windows Phone 8

此 API 不实现,但是调用时会引发异常。请参见 Windows Phone 运行时 API

示例


if (shareOperation.data.contains(Windows.ApplicationModel.DataTransfer.StandardDataFormats.text)) {
    var title = shareOperation.data.properties.title;
    var description = shareOperation.data.properties.description;
}


要求

最低支持客户端

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

最低支持服务器

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

最低支持电话

Windows Phone 8 [未实现,请参见备注]

命名空间

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

元数据

Windows.winmd

 

 

显示:
© 2014 Microsoft