PropertySet class
Represents a property set.
Syntax
var propertySet = new Windows.Foundation.Collections.PropertySet();
Attributes
- ActivatableAttribute(NTDDI_WIN8)
- DualApiPartitionAttribute()
- MarshalingBehaviorAttribute(Agile)
- ThreadingAttribute(Both)
- VersionAttribute(NTDDI_WIN8)
Members
The PropertySet class has these types of members:
Constructors
The PropertySet class has these constructors.
| Constructor | Description |
|---|---|
| PropertySet | Creates and initializes a new instance of the property set. |
Events
The PropertySet class has these events.
| Event | Description |
|---|---|
| MapChanged | Occurs when the observable map has changed. |
Methods
The PropertySet 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 PropertySet. |
| Add(String) [C#, VB] | Adds an item to the PropertySet. |
| 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 PropertySet. |
| ContainsKey [C#, VB] | Returns a value that indicates whether a specified key exists in the PropertySet. |
| 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 property set has an item with the specified key. |
| Insert [C++, JavaScript] | Adds an item to the property set. |
| Lookup [C++, JavaScript] | Retrieves the value for the specified key. |
| Remove [C++, JavaScript] | Removes an item from the property set. |
| Remove(KeyValuePair) [C#, VB] | Removes a specific key-value pair from the PropertySet. |
| Remove(String) [C#, VB] | Removes a specific item from the PropertySet. |
| TryGetValue [C#, VB] | Returns a value that indicates whether a specified key exists in the PropertySet. If an item with that key exists, the item is retrieved as an out parameter. |
Properties
The PropertySet class has these properties.
| Property | Access type | Description |
|---|---|---|
|
Count [C#, VB] | Read-only | Gets the number of elements contained in the collection. |
|
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 PropertySet. |
|
Size [C++, JavaScript] | Read-only | Gets the number of items contained in the property set. |
|
Values [C#, VB] | Read-only | Gets an ICollection object containing the values of the PropertySet . |
Remarks
Implements a map with keys of type String and values of type PropertyValue.
Collection member lists
For JavaScript, PropertySet 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 |
|
|
DLL |
|
See also
Build date: 2/25/2013
