PropertyValue PropertyValue PropertyValue PropertyValue Class

Definition

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

public : static class PropertyValue
static struct winrt::Windows::Foundation::PropertyValue
public static class PropertyValue
Public Shared Class PropertyValue
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.FoundationContract (introduced v1)

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.

Methods

CreateBoolean(Boolean) CreateBoolean(Boolean) CreateBoolean(Boolean) CreateBoolean(Boolean)

Creates a property value from a Boolean value.

CreateBooleanArray(Boolean[]) CreateBooleanArray(Boolean[]) CreateBooleanArray(Boolean[]) CreateBooleanArray(Boolean[])

Creates a property value from an array of Boolean values.

CreateChar16(Char) CreateChar16(Char) CreateChar16(Char) CreateChar16(Char)

Creates a property value from a Unicode character.

CreateChar16Array(Char[]) CreateChar16Array(Char[]) CreateChar16Array(Char[]) CreateChar16Array(Char[])

Creates a property value from an array of Unicode characters.

CreateDateTime(DateTime) CreateDateTime(DateTime) CreateDateTime(DateTime) CreateDateTime(DateTime)

Creates a property value from a date and time value.

CreateDateTimeArray(DateTime[]) CreateDateTimeArray(DateTime[]) CreateDateTimeArray(DateTime[]) CreateDateTimeArray(DateTime[])

Creates a property value from an array of date and time values.

CreateDouble(Double) CreateDouble(Double) CreateDouble(Double) CreateDouble(Double)

Creates a property value from a floating-point value.

CreateDoubleArray(Double[]) CreateDoubleArray(Double[]) CreateDoubleArray(Double[]) CreateDoubleArray(Double[])

Creates a property value from an array of floating-point values.

CreateEmpty() CreateEmpty() CreateEmpty() CreateEmpty()

Creates an empty property value.

CreateGuid(Guid) CreateGuid(Guid) CreateGuid(Guid) CreateGuid(Guid)

Creates a property value from a GUID.

CreateGuidArray(Guid[]) CreateGuidArray(Guid[]) CreateGuidArray(Guid[]) CreateGuidArray(Guid[])

Creates a property value from an array of GUID.

CreateInspectable(Object) CreateInspectable(Object) CreateInspectable(Object) CreateInspectable(Object)

Supplies the property value representation of an inspectable object. Since an object is a reference type, it is also a valid property value and does not need to be boxed. Instead, this method returns the object provided without modification. An object can be set as a property value without first calling this method.

CreateInspectableArray(Object[]) CreateInspectableArray(Object[]) CreateInspectableArray(Object[]) CreateInspectableArray(Object[])

Creates a property value from an array of inspectable objects.

CreateInt16(Int16) CreateInt16(Int16) CreateInt16(Int16) CreateInt16(Int16)

Creates a property value from an integer.

CreateInt16Array(Int16[]) CreateInt16Array(Int16[]) CreateInt16Array(Int16[]) CreateInt16Array(Int16[])

Creates a property value from an array of integers.

CreateInt32(Int32) CreateInt32(Int32) CreateInt32(Int32) CreateInt32(Int32)

Creates a property value from an integer.

CreateInt32Array(Int32[]) CreateInt32Array(Int32[]) CreateInt32Array(Int32[]) CreateInt32Array(Int32[])

Creates a property value from an array of integers.

CreateInt64(Int64) CreateInt64(Int64) CreateInt64(Int64) CreateInt64(Int64)

Creates a property value from an integer.

CreateInt64Array(Int64[]) CreateInt64Array(Int64[]) CreateInt64Array(Int64[]) CreateInt64Array(Int64[])

Creates a property value from an array of integers.

CreatePoint(Point) CreatePoint(Point) CreatePoint(Point) CreatePoint(Point)

Creates a property value from a point structure.

CreatePointArray(Point[]) CreatePointArray(Point[]) CreatePointArray(Point[]) CreatePointArray(Point[])

Creates a property value from an array of point structures.

CreateRect(Rect) CreateRect(Rect) CreateRect(Rect) CreateRect(Rect)

Creates a property value from a rectangle structure.

CreateRectArray(Rect[]) CreateRectArray(Rect[]) CreateRectArray(Rect[]) CreateRectArray(Rect[])

Creates a property value from an array of rectangle structures.

CreateSingle(Single) CreateSingle(Single) CreateSingle(Single) CreateSingle(Single)

Creates a property value from a floating-point value.

CreateSingleArray(Single[]) CreateSingleArray(Single[]) CreateSingleArray(Single[]) CreateSingleArray(Single[])

Creates a property value from an array of floating-point values.

CreateSize(Size) CreateSize(Size) CreateSize(Size) CreateSize(Size)

Creates a property value from a size structure.

CreateSizeArray(Size[]) CreateSizeArray(Size[]) CreateSizeArray(Size[]) CreateSizeArray(Size[])

Creates a property value from an array of size structures.

CreateString(String) CreateString(String) CreateString(String) CreateString(String)

Creates a property value from a string.

CreateStringArray(String[]) CreateStringArray(String[]) CreateStringArray(String[]) CreateStringArray(String[])

Creates a property value from an array of strings.

CreateTimeSpan(TimeSpan) CreateTimeSpan(TimeSpan) CreateTimeSpan(TimeSpan) CreateTimeSpan(TimeSpan)

Creates a property value from a time interval.

CreateTimeSpanArray(TimeSpan[]) CreateTimeSpanArray(TimeSpan[]) CreateTimeSpanArray(TimeSpan[]) CreateTimeSpanArray(TimeSpan[])

Creates a property value from an array of time intervals.

CreateUInt16(UInt16) CreateUInt16(UInt16) CreateUInt16(UInt16) CreateUInt16(UInt16)

Creates a property value from an unsigned integer.

CreateUInt16Array(UInt16[]) CreateUInt16Array(UInt16[]) CreateUInt16Array(UInt16[]) CreateUInt16Array(UInt16[])

Creates a property value from an array of unsigned integers.

CreateUInt32(UInt32) CreateUInt32(UInt32) CreateUInt32(UInt32) CreateUInt32(UInt32)

Creates a property value from an unsigned integer.

CreateUInt32Array(UInt32[]) CreateUInt32Array(UInt32[]) CreateUInt32Array(UInt32[]) CreateUInt32Array(UInt32[])

Creates a property value from an array of unsigned integers.

CreateUInt64(UInt64) CreateUInt64(UInt64) CreateUInt64(UInt64) CreateUInt64(UInt64)

Creates a property value from an unsigned integer.

CreateUInt64Array(UInt64[]) CreateUInt64Array(UInt64[]) CreateUInt64Array(UInt64[]) CreateUInt64Array(UInt64[])

Creates a property value from an array of unsigned integers.

CreateUInt8(Byte) CreateUInt8(Byte) CreateUInt8(Byte) CreateUInt8(Byte)

Creates a property value from a byte.

CreateUInt8Array(Byte[]) CreateUInt8Array(Byte[]) CreateUInt8Array(Byte[]) CreateUInt8Array(Byte[])

Creates a property value from an array of bytes.

See Also