0 out of 2 rated this helpful - Rate this topic

PropertySet class

Applies to Windows and Windows Phone

Represents a property set.

Syntax

Public NotInheritable Class PropertySet
    Implements IPropertySet, _
    IObservableMap(Of String, Object), _
    IDictionary(Of String, Object), _
    IEnumerable(Of KeyValuePair)

Attributes

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

Members

The PropertySet class has these types of members:

Constructors

The PropertySet class has these constructors.

ConstructorDescription
PropertySet Creates and initializes a new instance of the property set.

 

Events

The PropertySet class has these events.

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

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

PropertyAccess typeDescription

Count [C#, VB]

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

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

Size [C++, JavaScript]

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

Values [C#, VB]

Read-onlyGets 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

Windows.Foundation.Collections
Windows::Foundation::Collections [C++]

Metadata

Windows.winmd

See also

Windows.Foundation.PropertyValue

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.