Defines a set of properties to use with a DataPackage object.
Syntax
public sealed class DataPackagePropertySet : Object, IDictionary<String, Object>, IEnumerable<KeyValuePair>
Attributes
- DualApiPartitionAttribute()
- MarshalingBehaviorAttribute(Agile)
- VersionAttribute(NTDDI_WIN8)
Members
The DataPackagePropertySet class has these types of members:
Methods
The DataPackagePropertySet class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.
| Method | Description |
|---|---|
| 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. |
Properties
The DataPackagePropertySet class has these properties.
| Property | Access type | Description |
|---|---|---|
| Read/write | Gets or sets the Uniform Resource Identifier (URI) of the app's location in the Windows Store. | |
| Read/write | Gets or sets the name of the app that created the DataPackage object. | |
|
Count [C#, VB] | Read-only | Gets the number of elements contained in the collection. |
| Read/write | Gets or sets text that describes the contents of the DataPackage. | |
| Read-only | Specifies a vector object that contains the types of files stored in the DataPackage object. | |
|
IsReadOnly [C#, VB] | Read-only | Gets a value indicating whether the dictionary is read-only. |
|
Item [C#, VB] | Read/write | Gets or sets the element value at the specified key index. |
|
Keys [C#, VB] | Read-only | Gets an ICollection object containing the keys of the DataPackagePropertySet. |
|
Size [C++, JavaScript] | Read-only | Gets the number of items that are contained in the property set. |
| Read/write | Gets or sets a thumbnail image for the DataPackage. | |
| Read/write | Gets or sets the text that displays as a title for the contents of the DataPackage object. | |
|
Values [C#, VB] | Read-only | Gets an ICollection object containing the values of the DataPackagePropertySet . |
Remarks
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.
Requirements
|
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 |
|
Namespace |
|
|
Metadata |
|
Build date: 2/25/2013