PropertyValue PropertyValue PropertyValue PropertyValue Class

Definition

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

public : static class PropertyValuepublic static class PropertyValuePublic Static Class PropertyValue// This API is not available in Javascript.
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.

public : static PlatForm::Object CreateBoolean(bool value)public static object CreateBoolean(Boolean value)Public Static Function CreateBoolean(value As Boolean) As object// This API is not available in Javascript.
Parameters
value
bool Boolean Boolean Boolean

The value to store in the property value.

Returns
PlatForm::Object object object object

The property value.

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

Creates a property value from an array of Boolean values.

public : static PlatForm::Object CreateBooleanArray(bool[] value)public static object CreateBooleanArray(Boolean[] value)Public Static Function CreateBooleanArray(value As Boolean[]) As object// This API is not available in Javascript.
Parameters
value
bool[] Boolean[] Boolean[] Boolean[]

The array to store in the property value.

Returns
PlatForm::Object object object object

The property value.

CreateChar16(Char) 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// This API is not available in Javascript.
Parameters
value
Char Char Char Char

The value to store in the property value.

Returns
PlatForm::Object object object object

The property value.

CreateChar16Array(Char[]) 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// This API is not available in Javascript.
Parameters
value
Char[] Char[] Char[] Char[]

The array to store in the property value.

Returns
PlatForm::Object object object object

The property value.

CreateDateTime(DateTime) 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(DateTimeOffset value)Public Static Function CreateDateTime(value As DateTimeOffset) As object// This API is not available in Javascript.
Parameters
value
DateTime DateTimeOffset DateTimeOffset DateTimeOffset

The value to store in the property value.

Returns
PlatForm::Object object object object

The property value.

CreateDateTimeArray(DateTime[]) 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// This API is not available in Javascript.
Parameters
value
DateTime[] DateTime[] DateTime[] DateTime[]

The array to store in the property value.

Returns
PlatForm::Object object object object

The property value.

CreateDouble(Double) 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// This API is not available in Javascript.
Parameters
value
double Double Double Double

The value to store in the property value.

Returns
PlatForm::Object object object object

The property value.

CreateDoubleArray(Double[]) 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// This API is not available in Javascript.
Parameters
value
double[] Double[] Double[] Double[]

The array to store in the property value.

Returns
PlatForm::Object object object object

The property value.

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

Creates an empty property value.

public : static PlatForm::Object CreateEmpty()public static object CreateEmpty()Public Static Function CreateEmpty() As object// This API is not available in Javascript.
Returns
PlatForm::Object object object object

The property value.

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

Creates a property value from a GUID.

public : static PlatForm::Object CreateGuid(PlatForm::Guid value)public static object CreateGuid(Guid value)Public Static Function CreateGuid(value As Guid) As object// This API is not available in Javascript.
Parameters
value
PlatForm::Guid Guid Guid Guid

The value to store in the property value.

Returns
PlatForm::Object object object object

The property value.

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

Creates a property value from an array of GUID.

public : static PlatForm::Object CreateGuidArray(PlatForm::Guid[] value)public static object CreateGuidArray(Guid[] value)Public Static Function CreateGuidArray(value As Guid[]) As object// This API is not available in Javascript.
Parameters
value
PlatForm::Guid[] Guid[] Guid[] Guid[]

The array to store in the property value.

Returns
PlatForm::Object object object object

The property value.

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

Creates a property value from an inspectable object.

public : static PlatForm::Object CreateInspectable(PlatForm::Object value)public static object CreateInspectable(Object value)Public Static Function CreateInspectable(value As Object) As object// This API is not available in Javascript.
Parameters
value
PlatForm::Object Object Object Object

The object to store in the property value.

Returns
PlatForm::Object object object object

The property value.

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

Creates a property value from an array of inspectable objects.

public : static PlatForm::Object CreateInspectableArray(PlatForm::Object[] value)public static object CreateInspectableArray(Object[] value)Public Static Function CreateInspectableArray(value As Object[]) As object// This API is not available in Javascript.
Parameters
value
PlatForm::Object[] Object[] Object[] Object[]

The array to store in the property value.

Returns
PlatForm::Object object object object

The property value.

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

Creates a property value from an integer.

public : static PlatForm::Object CreateInt16(short value)public static object CreateInt16(Int16 value)Public Static Function CreateInt16(value As Int16) As object// This API is not available in Javascript.
Parameters
value
short Int16 Int16 Int16

The value to store in the property value.

Returns
PlatForm::Object object object object

The property value.

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

Creates a property value from an array of integers.

public : static PlatForm::Object CreateInt16Array(short[] value)public static object CreateInt16Array(Int16[] value)Public Static Function CreateInt16Array(value As Int16[]) As object// This API is not available in Javascript.
Parameters
value
short[] Int16[] Int16[] Int16[]

The array to store in the property value.

Returns
PlatForm::Object object object object

The property value.

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

Creates a property value from an integer.

public : static PlatForm::Object CreateInt32(int value)public static object CreateInt32(Int32 value)Public Static Function CreateInt32(value As Int32) As object// This API is not available in Javascript.
Parameters
value
int Int32 Int32 Int32

The value to store in the property value.

Returns
PlatForm::Object object object object

The property value.

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

Creates a property value from an array of integers.

public : static PlatForm::Object CreateInt32Array(int[] value)public static object CreateInt32Array(Int32[] value)Public Static Function CreateInt32Array(value As Int32[]) As object// This API is not available in Javascript.
Parameters
value
int[] Int32[] Int32[] Int32[]

The array to store in the property value.

Returns
PlatForm::Object object object object

The property value.

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

Creates a property value from an integer.

public : static PlatForm::Object CreateInt64(long value)public static object CreateInt64(Int64 value)Public Static Function CreateInt64(value As Int64) As object// This API is not available in Javascript.
Parameters
value
long Int64 Int64 Int64

The value to store in the property value.

Returns
PlatForm::Object object object object

The property value.

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

Creates a property value from an array of integers.

public : static PlatForm::Object CreateInt64Array(long[] value)public static object CreateInt64Array(Int64[] value)Public Static Function CreateInt64Array(value As Int64[]) As object// This API is not available in Javascript.
Parameters
value
long[] Int64[] Int64[] Int64[]

The array to store in the property value.

Returns
PlatForm::Object object object object

The property value.

CreatePoint(Point) 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// This API is not available in Javascript.
Parameters
value
Point Point Point Point

The structure to store in the property value.

Returns
PlatForm::Object object object object

The property value.

CreatePointArray(Point[]) 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// This API is not available in Javascript.
Parameters
value
Point[] Point[] Point[] Point[]

The array to store in the property value.

Returns
PlatForm::Object object object object

The property value.

CreateRect(Rect) 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// This API is not available in Javascript.
Parameters
value
Rect Rect Rect Rect

The structure to store in the property value.

Returns
PlatForm::Object object object object

The property value.

CreateRectArray(Rect[]) 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// This API is not available in Javascript.
Parameters
value
Rect[] Rect[] Rect[] Rect[]

The array to store in the property value.

Returns
PlatForm::Object object object object

The property value.

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

Creates a property value from a floating-point value.

public : static PlatForm::Object CreateSingle(float value)public static object CreateSingle(Single value)Public Static Function CreateSingle(value As Single) As object// This API is not available in Javascript.
Parameters
value
float Single Single Single

The value to store in the property value.

Returns
PlatForm::Object object object object

The property value.

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

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

public : static PlatForm::Object CreateSingleArray(float[] value)public static object CreateSingleArray(Single[] value)Public Static Function CreateSingleArray(value As Single[]) As object// This API is not available in Javascript.
Parameters
value
float[] Single[] Single[] Single[]

The array to store in the property value.

Returns
PlatForm::Object object object object

The property value.

CreateSize(Size) 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// This API is not available in Javascript.
Parameters
value
Size Size Size Size

The structure to store in the property value.

Returns
PlatForm::Object object object object

The property value.

CreateSizeArray(Size[]) 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// This API is not available in Javascript.
Parameters
value
Size[] Size[] Size[] Size[]

The array to store in the property value.

Returns
PlatForm::Object object object object

The property value.

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

Creates a property value from a string.

public : static PlatForm::Object CreateString(PlatForm::String value)public static object CreateString(String value)Public Static Function CreateString(value As String) As object// This API is not available in Javascript.
Parameters
value
PlatForm::String String String String

The string to store in the property value.

Returns
PlatForm::Object object object object

The property value.

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

Creates a property value from an array of strings.

public : static PlatForm::Object CreateStringArray(PlatForm::String[] value)public static object CreateStringArray(String[] value)Public Static Function CreateStringArray(value As String[]) As object// This API is not available in Javascript.
Parameters
value
PlatForm::String[] String[] String[] String[]

The array to store in the property value.

Returns
PlatForm::Object object object object

The property value.

CreateTimeSpan(TimeSpan) 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// This API is not available in Javascript.
Parameters
value
TimeSpan TimeSpan TimeSpan TimeSpan

The time interval to store in the property value.

Returns
PlatForm::Object object object object

The property value.

CreateTimeSpanArray(TimeSpan[]) 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// This API is not available in Javascript.
Parameters
value
TimeSpan[] TimeSpan[] TimeSpan[] TimeSpan[]

The array to store in the property value.

Returns
PlatForm::Object object object object

The property value.

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

Creates a property value from an unsigned integer.

public : static PlatForm::Object CreateUInt16(unsigned short value)public static object CreateUInt16(UInt16 value)Public Static Function CreateUInt16(value As UInt16) As object// This API is not available in Javascript.
Parameters
value
unsigned short UInt16 UInt16 UInt16

The value to store in the property value.

Returns
PlatForm::Object object object object

The property value.

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

Creates a property value from an array of unsigned integers.

public : static PlatForm::Object CreateUInt16Array(unsigned short[] value)public static object CreateUInt16Array(UInt16[] value)Public Static Function CreateUInt16Array(value As UInt16[]) As object// This API is not available in Javascript.
Parameters
value
unsigned short[] UInt16[] UInt16[] UInt16[]

The array to store in the property value.

Returns
PlatForm::Object object object object

The property value.

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

Creates a property value from an unsigned integer.

public : static PlatForm::Object CreateUInt32(unsigned int value)public static object CreateUInt32(UInt32 value)Public Static Function CreateUInt32(value As UInt32) As object// This API is not available in Javascript.
Parameters
value
unsigned int UInt32 UInt32 UInt32

The value to store in the property value.

Returns
PlatForm::Object object object object

The property value.

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

Creates a property value from an array of unsigned integers.

public : static PlatForm::Object CreateUInt32Array(unsigned int[] value)public static object CreateUInt32Array(UInt32[] value)Public Static Function CreateUInt32Array(value As UInt32[]) As object// This API is not available in Javascript.
Parameters
value
unsigned int[] UInt32[] UInt32[] UInt32[]

The array to store in the property value.

Returns
PlatForm::Object object object object

The property value.

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

Creates a property value from an unsigned integer.

public : static PlatForm::Object CreateUInt64(unsigned __int64 value)public static object CreateUInt64(UInt64 value)Public Static Function CreateUInt64(value As UInt64) As object// This API is not available in Javascript.
Parameters
value
unsigned __int64 UInt64 UInt64 UInt64

The value to store in the property value.

Returns
PlatForm::Object object object object

The property value.

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

Creates a property value from an array of unsigned integers.

public : static PlatForm::Object CreateUInt64Array(unsigned __int64 value)public static object CreateUInt64Array(UInt64[] value)Public Static Function CreateUInt64Array(value As UInt64[]) As object// This API is not available in Javascript.
Parameters
value
unsigned __int64 UInt64[] UInt64[] UInt64[]

The array to store in the property value.

Returns
PlatForm::Object object object object

The property value.

CreateUInt8(Byte) 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// This API is not available in Javascript.
Parameters
value
Byte Byte Byte Byte

The value to store in the property value.

Returns
PlatForm::Object object object object

The property value.

CreateUInt8Array(Byte[]) 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// This API is not available in Javascript.
Parameters
value
Byte[] Byte[] Byte[] Byte[]

The array to store in the property value.

Returns
PlatForm::Object object object object

The property value.