Windows Dev Center

Expand Minimize

PropertyValue class

Represents a value in a property store (such as a PropertySet instance).

Syntax


public static class PropertyValue

Members

The PropertyValue class has these types of members:

Methods

The PropertyValue class has these methods. It also inherits methods from the Object class.

MethodDescription
CreateBoolean Creates a property value from a Boolean value.
CreateBooleanArray Creates a property value from an array of Boolean values.
CreateChar16 Creates a property value from a Unicode character.
CreateChar16Array Creates a property value from an array of Unicode characters.
CreateDateTime Creates a property value from a date and time value.
CreateDateTimeArray Creates a property value from an array of date and time values.
CreateDouble Creates a property value from a floating-point value.
CreateDoubleArray Creates a property value from an array of floating-point values.
CreateEmpty Creates an empty property value.
CreateGuid Creates a property value from a GUID.
CreateGuidArray Creates a property value from an array of GUID.
CreateInspectable Creates a property value from an inspectable object.
CreateInspectableArray Creates a property value from an array of inspectable objects.
CreateInt16 Creates a property value from an integer.
CreateInt16Array Creates a property value from an array of integers.
CreateInt32 Creates a property value from an integer.
CreateInt32Array Creates a property value from an array of integers.
CreateInt64 Creates a property value from an integer.
CreateInt64Array Creates a property value from an array of integers.
CreatePoint Creates a property value from a point structure.
CreatePointArray Creates a property value from an array of point structures.
CreateRect Creates a property value from a rectangle structure.
CreateRectArray Creates a property value from an array of rectangle structures.
CreateSingle Creates a property value from a floating-point value.
CreateSingleArray Creates a property value from an array of floating-point values.
CreateSize Creates a property value from a size structure.
CreateSizeArray Creates a property value from an array of size structures.
CreateString Creates a property value from a string.
CreateStringArray Creates a property value from an array of strings.
CreateTimeSpan Creates a property value from a time interval.
CreateTimeSpanArray Creates a property value from an array of time intervals.
CreateUInt16 Creates a property value from an unsigned integer.
CreateUInt16Array Creates a property value from an array of unsigned integers.
CreateUInt32 Creates a property value from an unsigned integer.
CreateUInt32Array Creates a property value from an array of unsigned integers.
CreateUInt64 Creates a property value from an unsigned integer.
CreateUInt64Array Creates a property value from an array of unsigned integers.
CreateUInt8 Creates a property value from a byte.
CreateUInt8Array Creates a property value from an array of bytes.

 

Remarks

PropertyValue represents the value portion of a property that typically has a string name, and some value. There are multiple properties in a property set, and each property potentially has a different value type, so from a collection standpoint the collection is mixed, not strongly typed. The PropertySet class and the IPropertySet interface are existing interfaces or implementations that use this model and use a PropertyValue as the value part of a key-value pair. IPropertySet is the type of various Windows Runtime properties where the goal is to provide your app with a property bag of properties that are conceptually related in their origin, but each property might (and often does) use a different value type.

When used by other Windows Runtime APIs and their signatures, values are often passed as the IPropertyValue interface rather than as the PropertyValue type.

In addition to representing the value itself, PropertyValue defines utility methods that populate a PropertyValue instance. Calling these utility methods from app code is uncommon. The methods create a boxed value, and in this aspect a PropertyValue instance functions similarly to the VARIANT concept from Component Object Model (COM). Each method has a matched method that creates an array of values as opposed to a single value.

Requirements (Windows 10 device family)

Device family

Universal

API contract

Windows.Foundation.FoundationContract, introduced version 1.0

Namespace

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

Metadata

Windows.Foundation.FoundationContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

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
Windows::Foundation [C++]

Metadata

Windows.winmd

Attributes

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

See also

Object
PropertyType
IPropertyValue
Windows.Foundation.Collections.PropertySet

 

 

Show:
© 2015 Microsoft