DataPackagePropertySetView class

DataPackagePropertySetView class

[ Updated for UWP apps on Windows 10. For Windows 8.x articles, see the archive ]

Gets the set of properties of a DataPackageView object.

Syntax


public sealed class DataPackagePropertySetView : IReadOnlyDictionary<String, Object>,
    IEnumerable<KeyValuePair>

Members

The DataPackagePropertySetView class has these types of members:

Methods

The DataPackagePropertySetView class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
First Returns an iterator to enumerate the items in the property set.
HasKey Indicates whether the DataPackagePropertySetView object contains a specific property.
Lookup Retrieves the value of a specific property.
Split Divides the object into two views

 

Properties

The DataPackagePropertySetView class has these properties.

PropertyAccess typeDescription

ApplicationListingUri

Read-onlyGets the Uniform Resource Identifier (URI) of the app's location in the Windows Store.

ApplicationName

Read-onlyGets the name of the app that created the DataPackage object.

ContentSourceApplicationLink

Read-onlyGets the application link to the content from the source app.

ContentSourceWebLink

Read-onlyGets a web link to shared content that's currently displayed in the app.

Description

Read-onlyGets the text that describes the contents of the DataPackage.

EnterpriseId

Read-onlyGets or sets the enterprise Id.

FileTypes

Read-onlyGets a vector object that contains the types of files stored in the DataPackage object.

LogoBackgroundColor

Read-onlyGets a background color for the sharing app's Square30x30Logo.

PackageFamilyName

Read-onlyGets the package family name of the source app.

Size

Read-onlyGets the number of items that are contained in the property set.

Square30x30Logo

Read-onlyGets the source app's logo.

Thumbnail

Read-onlyGets the thumbnail image for the DataPackageView.

Title

Read-onlyGets the text that displays as a title for the contents of the DataPackagePropertySetView object.

 

Remarks

In addition to the content being shared, each instance of a DataPackageView object supports a set of properties. Target apps can use these properties to learn more about the content of the DataPackageView.

This class directly supports several default properties, such as a thumbnail, a title, and a description. Target apps can access specific properties through the Lookup or TryGetValue methods.

Note  

When a share target receives shared content, it also receives certain properties associated with the source app as a part of the DataPackageView. In Windows Runtime apps, several of these properties, such as ApplicationListingUri, ApplicationName, and PackageFamilyName, will be set by the operating system. In Windows Phone Silverlight apps, however, these properties will not be automatically filled and must be set manually.

Collection member lists

For JavaScript, DataPackagePropertySetView supports using an index to access items.

Examples


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


Requirements (Windows 10 device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

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

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

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.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

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

Metadata

Windows.winmd

Attributes

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

See also

Object
IMapView(String, Object)
IIterable(IKeyValuePair)

 

 

Show:
© 2016 Microsoft