Property​Value Property​Value Property​Value Class

Definition

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

public static class PropertyValuepublic static class PropertyValuePublic Static 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)

Creates a property value from a Boolean value.

public static PlatForm::Object CreateBoolean(Boolean value)public static object CreateBoolean(Boolean value)Public Static Function CreateBoolean(value As Boolean) As object
Parameters
value
System.Boolean System.Boolean System.Boolean

The value to store in the property value.

Returns
object object object

The property value.

Attributes

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

Creates a property value from an array of Boolean values.

public static PlatForm::Object CreateBooleanArray(Boolean[] value)public static object CreateBooleanArray(Boolean[] value)Public Static Function CreateBooleanArray(value As Boolean[]) As object
Parameters
value
System.Boolean[] System.Boolean[] System.Boolean[]

The array to store in the property value.

Returns
object object object

The property value.

Attributes

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

Creates a property value from a Unicode character.

public static PlatForm::Object CreateChar16(Char value)public static object CreateChar16(Char value)Public Static Function CreateChar16(value As Char) As object
Parameters
value
System.Char System.Char System.Char

The value to store in the property value.

Returns
object object object

The property value.

Attributes

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

Creates a property value from an array of Unicode characters.

public static PlatForm::Object CreateChar16Array(Char[] value)public static object CreateChar16Array(Char[] value)Public Static Function CreateChar16Array(value As Char[]) As object
Parameters
value
System.Char[] System.Char[] System.Char[]

The array to store in the property value.

Returns
object object object

The property value.

Attributes

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

Creates a property value from a date and time value.

public static PlatForm::Object CreateDateTime(DateTime value)public static object CreateDateTime(DateTime value)Public Static Function CreateDateTime(value As DateTime) As object
Parameters
value
DateTime DateTime DateTime

The value to store in the property value.

Returns
object object object

The property value.

Attributes

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

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

public static PlatForm::Object CreateDateTimeArray(DateTime[] value)public static object CreateDateTimeArray(DateTime[] value)Public Static Function CreateDateTimeArray(value As DateTime[]) As object
Parameters
value
Windows.Foundation.DateTime[] Windows.Foundation.DateTime[] Windows.Foundation.DateTime[]

The array to store in the property value.

Returns
object object object

The property value.

Attributes

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

Creates a property value from a floating-point value.

public static PlatForm::Object CreateDouble(Double value)public static object CreateDouble(Double value)Public Static Function CreateDouble(value As Double) As object
Parameters
value
System.Double System.Double System.Double

The value to store in the property value.

Returns
object object object

The property value.

Attributes

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

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

public static PlatForm::Object CreateDoubleArray(Double[] value)public static object CreateDoubleArray(Double[] value)Public Static Function CreateDoubleArray(value As Double[]) As object
Parameters
value
System.Double[] System.Double[] System.Double[]

The array to store in the property value.

Returns
object object object

The property value.

Attributes

CreateEmpty() CreateEmpty() CreateEmpty()

Creates an empty property value.

public static PlatForm::Object CreateEmpty()public static object CreateEmpty()Public Static Function CreateEmpty() As object
Returns
object object object

The property value.

Attributes

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

Creates a property value from a GUID.

public static PlatForm::Object CreateGuid(Guid value)public static object CreateGuid(Guid value)Public Static Function CreateGuid(value As Guid) As object
Parameters
value
System.Guid System.Guid System.Guid

The value to store in the property value.

Returns
object object object

The property value.

Attributes

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

Creates a property value from an array of GUID.

public static PlatForm::Object CreateGuidArray(Guid[] value)public static object CreateGuidArray(Guid[] value)Public Static Function CreateGuidArray(value As Guid[]) As object
Parameters
value
System.Guid[] System.Guid[] System.Guid[]

The array to store in the property value.

Returns
object object object

The property value.

Attributes

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

Creates a property value from an inspectable object.

public static PlatForm::Object CreateInspectable(Object value)public static object CreateInspectable(Object value)Public Static Function CreateInspectable(value As Object) As object
Parameters
value
System.Object System.Object System.Object

The object to store in the property value.

Returns
object object object

The property value.

Attributes

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

Creates a property value from an array of inspectable objects.

public static PlatForm::Object CreateInspectableArray(Object[] value)public static object CreateInspectableArray(Object[] value)Public Static Function CreateInspectableArray(value As Object[]) As object
Parameters
value
System.Object[] System.Object[] System.Object[]

The array to store in the property value.

Returns
object object object

The property value.

Attributes

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

Creates a property value from an integer.

public static PlatForm::Object CreateInt16(Int16 value)public static object CreateInt16(Int16 value)Public Static Function CreateInt16(value As Int16) As object
Parameters
value
System.Int16 System.Int16 System.Int16

The value to store in the property value.

Returns
object object object

The property value.

Attributes

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

Creates a property value from an array of integers.

public static PlatForm::Object CreateInt16Array(Int16[] value)public static object CreateInt16Array(Int16[] value)Public Static Function CreateInt16Array(value As Int16[]) As object
Parameters
value
System.Int16[] System.Int16[] System.Int16[]

The array to store in the property value.

Returns
object object object

The property value.

Attributes

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

Creates a property value from an integer.

public static PlatForm::Object CreateInt32(Int32 value)public static object CreateInt32(Int32 value)Public Static Function CreateInt32(value As Int32) As object
Parameters
value
System.Int32 System.Int32 System.Int32

The value to store in the property value.

Returns
object object object

The property value.

Attributes

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

Creates a property value from an array of integers.

public static PlatForm::Object CreateInt32Array(Int32[] value)public static object CreateInt32Array(Int32[] value)Public Static Function CreateInt32Array(value As Int32[]) As object
Parameters
value
System.Int32[] System.Int32[] System.Int32[]

The array to store in the property value.

Returns
object object object

The property value.

Attributes

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

Creates a property value from an integer.

public static PlatForm::Object CreateInt64(Int64 value)public static object CreateInt64(Int64 value)Public Static Function CreateInt64(value As Int64) As object
Parameters
value
System.Int64 System.Int64 System.Int64

The value to store in the property value.

Returns
object object object

The property value.

Attributes

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

Creates a property value from an array of integers.

public static PlatForm::Object CreateInt64Array(Int64[] value)public static object CreateInt64Array(Int64[] value)Public Static Function CreateInt64Array(value As Int64[]) As object
Parameters
value
System.Int64[] System.Int64[] System.Int64[]

The array to store in the property value.

Returns
object object object

The property value.

Attributes

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

Creates a property value from a point structure.

public static PlatForm::Object CreatePoint(Point value)public static object CreatePoint(Point value)Public Static Function CreatePoint(value As Point) As object
Parameters
value
Point Point Point

The structure to store in the property value.

Returns
object object object

The property value.

Attributes

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

Creates a property value from an array of point structures.

public static PlatForm::Object CreatePointArray(Point[] value)public static object CreatePointArray(Point[] value)Public Static Function CreatePointArray(value As Point[]) As object
Parameters
value
Windows.Foundation.Point[] Windows.Foundation.Point[] Windows.Foundation.Point[]

The array to store in the property value.

Returns
object object object

The property value.

Attributes

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

Creates a property value from a rectangle structure.

public static PlatForm::Object CreateRect(Rect value)public static object CreateRect(Rect value)Public Static Function CreateRect(value As Rect) As object
Parameters
value
Rect Rect Rect

The structure to store in the property value.

Returns
object object object

The property value.

Attributes

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

Creates a property value from an array of rectangle structures.

public static PlatForm::Object CreateRectArray(Rect[] value)public static object CreateRectArray(Rect[] value)Public Static Function CreateRectArray(value As Rect[]) As object
Parameters
value
Windows.Foundation.Rect[] Windows.Foundation.Rect[] Windows.Foundation.Rect[]

The array to store in the property value.

Returns
object object object

The property value.

Attributes

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

Creates a property value from a floating-point value.

public static PlatForm::Object CreateSingle(Single value)public static object CreateSingle(Single value)Public Static Function CreateSingle(value As Single) As object
Parameters
value
System.Single System.Single System.Single

The value to store in the property value.

Returns
object object object

The property value.

Attributes

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

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

public static PlatForm::Object CreateSingleArray(Single[] value)public static object CreateSingleArray(Single[] value)Public Static Function CreateSingleArray(value As Single[]) As object
Parameters
value
System.Single[] System.Single[] System.Single[]

The array to store in the property value.

Returns
object object object

The property value.

Attributes

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

Creates a property value from a size structure.

public static PlatForm::Object CreateSize(Size value)public static object CreateSize(Size value)Public Static Function CreateSize(value As Size) As object
Parameters
value
Size Size Size

The structure to store in the property value.

Returns
object object object

The property value.

Attributes

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

Creates a property value from an array of size structures.

public static PlatForm::Object CreateSizeArray(Size[] value)public static object CreateSizeArray(Size[] value)Public Static Function CreateSizeArray(value As Size[]) As object
Parameters
value
Windows.Foundation.Size[] Windows.Foundation.Size[] Windows.Foundation.Size[]

The array to store in the property value.

Returns
object object object

The property value.

Attributes

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

Creates a property value from a string.

public static PlatForm::Object CreateString(String value)public static object CreateString(String value)Public Static Function CreateString(value As String) As object
Parameters
value
System.String System.String System.String

The string to store in the property value.

Returns
object object object

The property value.

Attributes

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

Creates a property value from an array of strings.

public static PlatForm::Object CreateStringArray(String[] value)public static object CreateStringArray(String[] value)Public Static Function CreateStringArray(value As String[]) As object
Parameters
value
System.String[] System.String[] System.String[]

The array to store in the property value.

Returns
object object object

The property value.

Attributes

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

Creates a property value from a time interval.

public static PlatForm::Object CreateTimeSpan(TimeSpan value)public static object CreateTimeSpan(TimeSpan value)Public Static Function CreateTimeSpan(value As TimeSpan) As object
Parameters
value
TimeSpan TimeSpan TimeSpan

The time interval to store in the property value.

Returns
object object object

The property value.

Attributes

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

Creates a property value from an array of time intervals.

public static PlatForm::Object CreateTimeSpanArray(TimeSpan[] value)public static object CreateTimeSpanArray(TimeSpan[] value)Public Static Function CreateTimeSpanArray(value As TimeSpan[]) As object
Parameters
value
Windows.Foundation.TimeSpan[] Windows.Foundation.TimeSpan[] Windows.Foundation.TimeSpan[]

The array to store in the property value.

Returns
object object object

The property value.

Attributes

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

Creates a property value from an unsigned integer.

public static PlatForm::Object CreateUInt16(UInt16 value)public static object CreateUInt16(UInt16 value)Public Static Function CreateUInt16(value As UInt16) As object
Parameters
value
System.UInt16 System.UInt16 System.UInt16

The value to store in the property value.

Returns
object object object

The property value.

Attributes

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

Creates a property value from an array of unsigned integers.

public static PlatForm::Object CreateUInt16Array(UInt16[] value)public static object CreateUInt16Array(UInt16[] value)Public Static Function CreateUInt16Array(value As UInt16[]) As object
Parameters
value
System.UInt16[] System.UInt16[] System.UInt16[]

The array to store in the property value.

Returns
object object object

The property value.

Attributes

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

Creates a property value from an unsigned integer.

public static PlatForm::Object CreateUInt32(UInt32 value)public static object CreateUInt32(UInt32 value)Public Static Function CreateUInt32(value As UInt32) As object
Parameters
value
System.UInt32 System.UInt32 System.UInt32

The value to store in the property value.

Returns
object object object

The property value.

Attributes

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

Creates a property value from an array of unsigned integers.

public static PlatForm::Object CreateUInt32Array(UInt32[] value)public static object CreateUInt32Array(UInt32[] value)Public Static Function CreateUInt32Array(value As UInt32[]) As object
Parameters
value
System.UInt32[] System.UInt32[] System.UInt32[]

The array to store in the property value.

Returns
object object object

The property value.

Attributes

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

Creates a property value from an unsigned integer.

public static PlatForm::Object CreateUInt64(UInt64 value)public static object CreateUInt64(UInt64 value)Public Static Function CreateUInt64(value As UInt64) As object
Parameters
value
System.UInt64 System.UInt64 System.UInt64

The value to store in the property value.

Returns
object object object

The property value.

Attributes

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

Creates a property value from an array of unsigned integers.

public static PlatForm::Object CreateUInt64Array(UInt64[] value)public static object CreateUInt64Array(UInt64[] value)Public Static Function CreateUInt64Array(value As UInt64[]) As object
Parameters
value
System.UInt64[] System.UInt64[] System.UInt64[]

The array to store in the property value.

Returns
object object object

The property value.

Attributes

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

Creates a property value from a byte.

public static PlatForm::Object CreateUInt8(Byte value)public static object CreateUInt8(Byte value)Public Static Function CreateUInt8(value As Byte) As object
Parameters
value
System.Byte System.Byte System.Byte

The value to store in the property value.

Returns
object object object

The property value.

Attributes

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

Creates a property value from an array of bytes.

public static PlatForm::Object CreateUInt8Array(Byte[] value)public static object CreateUInt8Array(Byte[] value)Public Static Function CreateUInt8Array(value As Byte[]) As object
Parameters
value
System.Byte[] System.Byte[] System.Byte[]

The array to store in the property value.

Returns
object object object

The property value.

Attributes