Export (0) Print
Expand All
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DataPackagePropertySet class

Applies to Windows and Windows Phone

Defines a set of properties to use with a DataPackage object.


var dataPackagePropertySet = dataPackage.properties;




The DataPackagePropertySet class has these types of members:


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

Add(KeyValuePair) [C#, VB]Adds a new key-value pair to the DataPackagePropertySet.
Add(String) [C#, VB]Adds an item to the DataPackagePropertySet.
Clear Removes all items from the property set.
Contains [C#, VB]Returns a value that indicates whether a specified key-value pair exists in the DataPackagePropertySet.
ContainsKey [C#, VB]Returns a value that indicates whether a specified key exists in the DataPackagePropertySet.
CopyTo [C#, VB]Copies the elements of the collection to an array, starting at a particular array index.
First [C++, JavaScript]Returns an iterator to enumerate the items in the property set.
GetView [C++, JavaScript]Gets an immutable view of the property set.
HasKey [C++, JavaScript]Indicates whether the DataPackagePropertySet object contains a specific property.
Insert [C++, JavaScript]Adds a property to the DataPackagePropertySet object.
Lookup [C++, JavaScript]Retrieves the value of a specific property.
Remove [C++, JavaScript]Removes an item from the property set.
Remove(KeyValuePair) [C#, VB]Removes a specific key-value pair from the DataPackagePropertySet.
Remove(String) [C#, VB]Removes a specific item from the DataPackagePropertySet.
TryGetValue [C#, VB]Returns a value that indicates whether a specified key exists in the DataPackagePropertySet. If an item with that key exists, the item is retrieved as an out parameter.



The DataPackagePropertySet class has these properties.

PropertyAccess typeDescription


Read/writeGets or sets the Uniform Resource Identifier (URI) of the app's location in the Windows Store.


Read/writeGets or sets the name of the app that created the DataPackage object.


Read/writeGets or sets the application link to the content from the source app.


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

Count [C#, VB]

Read-onlyGets the number of elements contained in the collection.


Read/writeGets or sets text that describes the contents of the DataPackage.


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

IsReadOnly [C#, VB]

Read-onlyGets a value indicating whether the dictionary is read-only.

Item [C#, VB]

Read/writeGets or sets the element value at the specified key index.

Keys [C#, VB]

Read-onlyGets an ICollection object containing the keys of the DataPackagePropertySet.


Read/writeGets or sets a background color for the sharing app's Square30x30Logo.


Read/writeGets or sets the package family name of the source app.

Size [C++, JavaScript]

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


Read/writeGets or sets the source app's logo.


Read/writeGets or sets a thumbnail image for the DataPackage.


Read/writeGets or sets the text that displays as a title for the contents of the DataPackage object.

Values [C#, VB]

Read-onlyGets an ICollection object containing the values of the DataPackagePropertySet .



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

This class directly supports several default properties, such as a thumbnail, a title, and a description. You can also create your own custom properties by using the Insert method or one of the Add methods. Target apps can access specific properties through the Lookup or TryGetValue methods.

Collection member lists

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


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


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





© 2015 Microsoft