PropertyValue PropertyValue PropertyValue Class

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

Syntax

Declaration

public static class PropertyValuepublic static class PropertyValuePublic Static Class PropertyValue

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 summary

Creates a property value from a Boolean value.

Creates a property value from an array of Boolean values.

Creates a property value from a Unicode character.

Creates a property value from an array of Unicode characters.

Creates a property value from a date and time value.

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

Creates a property value from a floating-point value.

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

Creates an empty property value.

Creates a property value from a GUID.

Creates a property value from an array of GUID.

Creates a property value from an inspectable object.

Creates a property value from an array of inspectable objects.

Creates a property value from an integer.

Creates a property value from an array of integers.

Creates a property value from an integer.

Creates a property value from an array of integers.

Creates a property value from an integer.

Creates a property value from an array of integers.

Creates a property value from a point structure.

Creates a property value from an array of point structures.

Creates a property value from a rectangle structure.

Creates a property value from an array of rectangle structures.

Creates a property value from a floating-point value.

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

Creates a property value from a size structure.

Creates a property value from an array of size structures.

Creates a property value from a string.

Creates a property value from an array of strings.

Creates a property value from a time interval.

Creates a property value from an array of time intervals.

Creates a property value from an unsigned integer.

Creates a property value from an array of unsigned integers.

Creates a property value from an unsigned integer.

Creates a property value from an array of unsigned integers.

Creates a property value from an unsigned integer.

Creates a property value from an array of unsigned integers.

Creates a property value from a byte.

Creates a property value from an array of bytes.

Methods

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

    Creates a property value from a Boolean value.

    public static object CreateBoolean(Boolean value)public static object CreateBoolean(Boolean value)Public Static Function CreateBoolean(value As Boolean) As objectpublic static object CreateBoolean(Boolean value)

    Parameters

    • value
      System.Boolean
      System.Boolean
      System.Boolean

      The value to store in the property value.

    Returns

    • 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 object CreateBooleanArray(Boolean[] value)public static object CreateBooleanArray(Boolean[] value)Public Static Function CreateBooleanArray(value As Boolean[]) As objectpublic static object CreateBooleanArray(Boolean[] value)

    Parameters

    • value
      System.Boolean[]
      System.Boolean[]
      System.Boolean[]

      The array to store in the property value.

    Returns

    • object
      object
      object

      The property value.

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

    Creates a property value from a Unicode character.

    public static object CreateChar16(Char value)public static object CreateChar16(Char value)Public Static Function CreateChar16(value As Char) As objectpublic static object CreateChar16(Char value)

    Parameters

    • value
      System.Char
      System.Char
      System.Char

      The value to store in the property value.

    Returns

    • 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 object CreateChar16Array(Char[] value)public static object CreateChar16Array(Char[] value)Public Static Function CreateChar16Array(value As Char[]) As objectpublic static object CreateChar16Array(Char[] value)

    Parameters

    • value
      System.Char[]
      System.Char[]
      System.Char[]

      The array to store in the property value.

    Returns

    • 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 object CreateDateTime(DateTime value)public static object CreateDateTime(DateTime value)Public Static Function CreateDateTime(value As DateTime) As objectpublic static object CreateDateTime(DateTime value)

    Parameters

    Returns

    • 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 object CreateDateTimeArray(DateTime[] value)public static object CreateDateTimeArray(DateTime[] value)Public Static Function CreateDateTimeArray(value As DateTime[]) As objectpublic static object CreateDateTimeArray(DateTime[] value)

    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.

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

    Creates a property value from a floating-point value.

    public static object CreateDouble(Double value)public static object CreateDouble(Double value)Public Static Function CreateDouble(value As Double) As objectpublic static object CreateDouble(Double value)

    Parameters

    • value
      System.Double
      System.Double
      System.Double

      The value to store in the property value.

    Returns

    • 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 object CreateDoubleArray(Double[] value)public static object CreateDoubleArray(Double[] value)Public Static Function CreateDoubleArray(value As Double[]) As objectpublic static object CreateDoubleArray(Double[] value)

    Parameters

    • value
      System.Double[]
      System.Double[]
      System.Double[]

      The array to store in the property value.

    Returns

    • object
      object
      object

      The property value.

  • CreateEmpty()
    CreateEmpty()
    CreateEmpty()
    CreateEmpty()

    Creates an empty property value.

    public static object CreateEmpty()public static object CreateEmpty()Public Static Function CreateEmpty() As objectpublic static object CreateEmpty()

    Returns

    • object
      object
      object

      The property value.

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

    Creates a property value from a GUID.

    public static object CreateGuid(Guid value)public static object CreateGuid(Guid value)Public Static Function CreateGuid(value As Guid) As objectpublic static object CreateGuid(Guid value)

    Parameters

    • value
      System.Guid
      System.Guid
      System.Guid

      The value to store in the property value.

    Returns

    • 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 object CreateGuidArray(Guid[] value)public static object CreateGuidArray(Guid[] value)Public Static Function CreateGuidArray(value As Guid[]) As objectpublic static object CreateGuidArray(Guid[] value)

    Parameters

    • value
      System.Guid[]
      System.Guid[]
      System.Guid[]

      The array to store in the property value.

    Returns

    • object
      object
      object

      The property value.

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

    Creates a property value from an inspectable object.

    public static object CreateInspectable(Object value)public static object CreateInspectable(Object value)Public Static Function CreateInspectable(value As Object) As objectpublic static object CreateInspectable(Object value)

    Parameters

    • value
      System.Object
      System.Object
      System.Object

      The object to store in the property value.

    Returns

    • 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 object CreateInspectableArray(Object[] value)public static object CreateInspectableArray(Object[] value)Public Static Function CreateInspectableArray(value As Object[]) As objectpublic static object CreateInspectableArray(Object[] value)

    Parameters

    • value
      System.Object[]
      System.Object[]
      System.Object[]

      The array to store in the property value.

    Returns

    • object
      object
      object

      The property value.

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

    Creates a property value from an integer.

    public static object CreateInt16(Int16 value)public static object CreateInt16(Int16 value)Public Static Function CreateInt16(value As Int16) As objectpublic static object CreateInt16(Int16 value)

    Parameters

    • value
      System.Int16
      System.Int16
      System.Int16

      The value to store in the property value.

    Returns

    • 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 object CreateInt16Array(Int16[] value)public static object CreateInt16Array(Int16[] value)Public Static Function CreateInt16Array(value As Int16[]) As objectpublic static object CreateInt16Array(Int16[] value)

    Parameters

    • value
      System.Int16[]
      System.Int16[]
      System.Int16[]

      The array to store in the property value.

    Returns

    • object
      object
      object

      The property value.

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

    Creates a property value from an integer.

    public static object CreateInt32(Int32 value)public static object CreateInt32(Int32 value)Public Static Function CreateInt32(value As Int32) As objectpublic static object CreateInt32(Int32 value)

    Parameters

    • value
      System.Int32
      System.Int32
      System.Int32

      The value to store in the property value.

    Returns

    • 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 object CreateInt32Array(Int32[] value)public static object CreateInt32Array(Int32[] value)Public Static Function CreateInt32Array(value As Int32[]) As objectpublic static object CreateInt32Array(Int32[] value)

    Parameters

    • value
      System.Int32[]
      System.Int32[]
      System.Int32[]

      The array to store in the property value.

    Returns

    • object
      object
      object

      The property value.

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

    Creates a property value from an integer.

    public static object CreateInt64(Int64 value)public static object CreateInt64(Int64 value)Public Static Function CreateInt64(value As Int64) As objectpublic static object CreateInt64(Int64 value)

    Parameters

    • value
      System.Int64
      System.Int64
      System.Int64

      The value to store in the property value.

    Returns

    • 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 object CreateInt64Array(Int64[] value)public static object CreateInt64Array(Int64[] value)Public Static Function CreateInt64Array(value As Int64[]) As objectpublic static object CreateInt64Array(Int64[] value)

    Parameters

    • value
      System.Int64[]
      System.Int64[]
      System.Int64[]

      The array to store in the property value.

    Returns

    • object
      object
      object

      The property value.

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

    Creates a property value from a point structure.

    public static object CreatePoint(Point value)public static object CreatePoint(Point value)Public Static Function CreatePoint(value As Point) As objectpublic static object CreatePoint(Point value)

    Parameters

    Returns

    • 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 object CreatePointArray(Point[] value)public static object CreatePointArray(Point[] value)Public Static Function CreatePointArray(value As Point[]) As objectpublic static object CreatePointArray(Point[] value)

    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.

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

    Creates a property value from a rectangle structure.

    public static object CreateRect(Rect value)public static object CreateRect(Rect value)Public Static Function CreateRect(value As Rect) As objectpublic static object CreateRect(Rect value)

    Parameters

    • value

      The structure to store in the property value.

    Returns

    • 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 object CreateRectArray(Rect[] value)public static object CreateRectArray(Rect[] value)Public Static Function CreateRectArray(value As Rect[]) As objectpublic static object CreateRectArray(Rect[] value)

    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.

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

    Creates a property value from a floating-point value.

    public static object CreateSingle(Single value)public static object CreateSingle(Single value)Public Static Function CreateSingle(value As Single) As objectpublic static object CreateSingle(Single value)

    Parameters

    • value
      System.Single
      System.Single
      System.Single

      The value to store in the property value.

    Returns

    • 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 object CreateSingleArray(Single[] value)public static object CreateSingleArray(Single[] value)Public Static Function CreateSingleArray(value As Single[]) As objectpublic static object CreateSingleArray(Single[] value)

    Parameters

    • value
      System.Single[]
      System.Single[]
      System.Single[]

      The array to store in the property value.

    Returns

    • object
      object
      object

      The property value.

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

    Creates a property value from a size structure.

    public static object CreateSize(Size value)public static object CreateSize(Size value)Public Static Function CreateSize(value As Size) As objectpublic static object CreateSize(Size value)

    Parameters

    • value

      The structure to store in the property value.

    Returns

    • 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 object CreateSizeArray(Size[] value)public static object CreateSizeArray(Size[] value)Public Static Function CreateSizeArray(value As Size[]) As objectpublic static object CreateSizeArray(Size[] value)

    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.

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

    Creates a property value from a string.

    public static object CreateString(String value)public static object CreateString(String value)Public Static Function CreateString(value As String) As objectpublic static object CreateString(String value)

    Parameters

    • value
      System.String
      System.String
      System.String

      The string to store in the property value.

    Returns

    • 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 object CreateStringArray(String[] value)public static object CreateStringArray(String[] value)Public Static Function CreateStringArray(value As String[]) As objectpublic static object CreateStringArray(String[] value)

    Parameters

    • value
      System.String[]
      System.String[]
      System.String[]

      The array to store in the property value.

    Returns

    • object
      object
      object

      The property value.

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

    Creates a property value from a time interval.

    public static object CreateTimeSpan(TimeSpan value)public static object CreateTimeSpan(TimeSpan value)Public Static Function CreateTimeSpan(value As TimeSpan) As objectpublic static object CreateTimeSpan(TimeSpan value)

    Parameters

    Returns

    • 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 object CreateTimeSpanArray(TimeSpan[] value)public static object CreateTimeSpanArray(TimeSpan[] value)Public Static Function CreateTimeSpanArray(value As TimeSpan[]) As objectpublic static object CreateTimeSpanArray(TimeSpan[] value)

    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.

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

    Creates a property value from an unsigned integer.

    public static object CreateUInt16(UInt16 value)public static object CreateUInt16(UInt16 value)Public Static Function CreateUInt16(value As UInt16) As objectpublic static object CreateUInt16(UInt16 value)

    Parameters

    • value
      System.UInt16
      System.UInt16
      System.UInt16

      The value to store in the property value.

    Returns

    • 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 object CreateUInt16Array(UInt16[] value)public static object CreateUInt16Array(UInt16[] value)Public Static Function CreateUInt16Array(value As UInt16[]) As objectpublic static object CreateUInt16Array(UInt16[] value)

    Parameters

    • value
      System.UInt16[]
      System.UInt16[]
      System.UInt16[]

      The array to store in the property value.

    Returns

    • object
      object
      object

      The property value.

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

    Creates a property value from an unsigned integer.

    public static object CreateUInt32(UInt32 value)public static object CreateUInt32(UInt32 value)Public Static Function CreateUInt32(value As UInt32) As objectpublic static object CreateUInt32(UInt32 value)

    Parameters

    • value
      System.UInt32
      System.UInt32
      System.UInt32

      The value to store in the property value.

    Returns

    • 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 object CreateUInt32Array(UInt32[] value)public static object CreateUInt32Array(UInt32[] value)Public Static Function CreateUInt32Array(value As UInt32[]) As objectpublic static object CreateUInt32Array(UInt32[] value)

    Parameters

    • value
      System.UInt32[]
      System.UInt32[]
      System.UInt32[]

      The array to store in the property value.

    Returns

    • object
      object
      object

      The property value.

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

    Creates a property value from an unsigned integer.

    public static object CreateUInt64(UInt64 value)public static object CreateUInt64(UInt64 value)Public Static Function CreateUInt64(value As UInt64) As objectpublic static object CreateUInt64(UInt64 value)

    Parameters

    • value
      System.UInt64
      System.UInt64
      System.UInt64

      The value to store in the property value.

    Returns

    • 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 object CreateUInt64Array(UInt64[] value)public static object CreateUInt64Array(UInt64[] value)Public Static Function CreateUInt64Array(value As UInt64[]) As objectpublic static object CreateUInt64Array(UInt64[] value)

    Parameters

    • value
      System.UInt64[]
      System.UInt64[]
      System.UInt64[]

      The array to store in the property value.

    Returns

    • object
      object
      object

      The property value.

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

    Creates a property value from a byte.

    public static object CreateUInt8(Byte value)public static object CreateUInt8(Byte value)Public Static Function CreateUInt8(value As Byte) As objectpublic static object CreateUInt8(Byte value)

    Parameters

    • value
      System.Byte
      System.Byte
      System.Byte

      The value to store in the property value.

    Returns

    • 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 object CreateUInt8Array(Byte[] value)public static object CreateUInt8Array(Byte[] value)Public Static Function CreateUInt8Array(value As Byte[]) As objectpublic static object CreateUInt8Array(Byte[] value)

    Parameters

    • value
      System.Byte[]
      System.Byte[]
      System.Byte[]

      The array to store in the property value.

    Returns

    • object
      object
      object

      The property value.

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.FoundationContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.DualApiPartitionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.StaticAttribute
Windows.Foundation.Metadata.ThreadingAttribute
Windows.Foundation.Metadata.WebHostHiddenAttribute

Details

Assembly

Windows.Foundation.dll