DataPackagePropertySetView Class

Definition

Gets the set of properties of a DataPackageView object.

public ref class DataPackagePropertySetView sealed : IIterable<IKeyValuePair<Platform::String ^, Platform::Object ^> ^>, IMapView<Platform::String ^, Platform::Object ^>
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class DataPackagePropertySetView final : IIterable<IKeyValuePair<winrt::hstring, IInspectable const&>>, IMapView<winrt::hstring, IInspectable const&>
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class DataPackagePropertySetView : IEnumerable<KeyValuePair<string,object>>, IReadOnlyDictionary<string,object>
Public NotInheritable Class DataPackagePropertySetView
Implements IEnumerable(Of KeyValuePair(Of String, Object)), IReadOnlyDictionary(Of String, Object)
Inheritance
Object Platform::Object IInspectable DataPackagePropertySetView
Attributes
Implements
IIterable<IKeyValuePair<K,V>> IEnumerable<KeyValuePair<K,V>> IEnumerable<KeyValuePair<String,Object>> IIterable<IKeyValuePair<Platform::String,Platform::Object>> IIterable<IKeyValuePair<winrt::hstring,IInspectable>> IReadOnlyDictionary<String,Object> IMapView<Platform::String,Platform::Object> IMapView<winrt::hstring,IInspectable>

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Examples

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

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 method.

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 app, 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.

Version history

Windows version SDK version Value added
1803 17134 ContentSourceUserActivityJson
1809 17763 IsFromRoamingClipboard

Properties

ApplicationListingUri

Gets the Uniform Resource Identifier (URI) of the app's location in the Microsoft 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.

ContentSourceUserActivityJson

Gets the UserActivity in serialized JSON format to be shared with another app.

ContentSourceWebLink

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

Description

Gets the text that describes the contents of the DataPackage.

EnterpriseId

Gets or sets the enterprise Id.

FileTypes

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

IsFromRoamingClipboard

Gets a value that indicates whether the shared content in the DataPackageView comes from clipboard data that was synced from another device for the current user.

LogoBackgroundColor

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

PackageFamilyName

Gets the package family name of the source app.

Size

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.

Methods

First()

Returns an iterator to enumerate the items in the property set.

HasKey(String)

Indicates whether the DataPackagePropertySetView object contains a specific property.

Lookup(String)

Retrieves the value of a specific property.

Split(IMapView<String,Object>, IMapView<String,Object>)

Divides the object into two views

Applies to