Table of Contents

Class Properties

Namespace
SharpDX.Direct2D1
Assembly
SharpDX.Direct2D1.dll
[Guid("483473d7-cd46-4f9d-9d3a-3112aa80159d")]
public class Properties : ComObject
Inheritance
Properties
Derived

Constructors

Properties(nint)

public Properties(nint nativePtr)

Parameters

nativePtr nint

Properties

Cached

Gets or sets Cached property.

public bool Cached { get; set; }

Property Value

bool

PropertyCount

Gets the number of top-level properties.

public int PropertyCount { get; }

Property Value

int

Remarks

This method returns the number of custom properties on the Properties interface. System properties and sub-properties are part of a closed set, and are enumerable by iterating over this closed set.

Methods

GetBoolValue(int)

Gets the value of the specified property by index.

public bool GetBoolValue(int index)

Parameters

index int

The index of the property from which the data is to be obtained.

Returns

bool

The value of the specified property by index.

GetBoolValueByName(string)

Gets the value of the specified property by name.

public bool GetBoolValueByName(string name)

Parameters

name string

The name of the property.

Returns

bool

The value of the specified property by name.

GetColor3Value(int)

Gets the value of the specified property by index.

public RawColor3 GetColor3Value(int index)

Parameters

index int

The index of the property from which the data is to be obtained.

Returns

RawColor3

The value of the specified property by index.

GetColor3ValueByName(string)

Gets the value of the specified property by name.

public RawColor3 GetColor3ValueByName(string name)

Parameters

name string

The name of the property.

Returns

RawColor3

The value of the specified property by name.

GetColor4Value(int)

Gets the value of the specified property by index.

public RawColor4 GetColor4Value(int index)

Parameters

index int

The index of the property from which the data is to be obtained.

Returns

RawColor4

The value of the specified property by index.

GetColor4ValueByName(string)

Gets the value of the specified property by name.

public RawColor4 GetColor4ValueByName(string name)

Parameters

name string

The name of the property.

Returns

RawColor4

The value of the specified property by name.

GetComObjectValueByName<T>(string)

Gets the value of the specified property by name.

public T GetComObjectValueByName<T>(string name) where T : ComObject

Parameters

name string

The name of the property.

Returns

T

The value of the specified property by name.

Type Parameters

T

GetComObjectValue<T>(int)

Gets the value of the specified property by index.

public T GetComObjectValue<T>(int index) where T : ComObject

Parameters

index int

The index of the property from which the data is to be obtained.

Returns

T

The value of the specified property by index.

Type Parameters

T

GetEnumValueByName<T>(string)

Gets the value of the specified property by name.

public T GetEnumValueByName<T>(string name) where T : struct

Parameters

name string

The name of the property.

Returns

T

The value of the specified property by name.

Type Parameters

T

GetEnumValue<T>(int)

Gets the value of the specified property by index.

public T GetEnumValue<T>(int index) where T : struct

Parameters

index int

The index of the property from which the data is to be obtained.

Returns

T

The value of the specified property by index.

Type Parameters

T

GetFloatValue(int)

Gets the value of the specified property by index.

public float GetFloatValue(int index)

Parameters

index int

The index of the property from which the data is to be obtained.

Returns

float

The value of the specified property by index.

GetFloatValueByName(string)

Gets the value of the specified property by name.

public float GetFloatValueByName(string name)

Parameters

name string

The name of the property.

Returns

float

The value of the specified property by name.

GetGuidValue(int)

Gets the value of the specified property by index.

public Guid GetGuidValue(int index)

Parameters

index int

The index of the property from which the data is to be obtained.

Returns

Guid

The value of the specified property by index.

GetGuidValueByName(string)

Gets the value of the specified property by name.

public Guid GetGuidValueByName(string name)

Parameters

name string

The name of the property.

Returns

Guid

The value of the specified property by name.

GetIntValue(int)

Gets the value of the specified property by index.

public int GetIntValue(int index)

Parameters

index int

The index of the property from which the data is to be obtained.

Returns

int

The value of the specified property by index.

GetMatrix3x2Value(int)

Gets the value of the specified property by index.

public RawMatrix3x2 GetMatrix3x2Value(int index)

Parameters

index int

The index of the property from which the data is to be obtained.

Returns

RawMatrix3x2

The value of the specified property by index.

GetMatrix3x2ValueByName(string)

Gets the value of the specified property by name.

public RawMatrix3x2 GetMatrix3x2ValueByName(string name)

Parameters

name string

The name of the property.

Returns

RawMatrix3x2

The value of the specified property by name.

GetMatrix5x4Value(int)

Gets the value of the specified property by index.

public RawMatrix5x4 GetMatrix5x4Value(int index)

Parameters

index int

The index of the property from which the data is to be obtained.

Returns

RawMatrix5x4

The value of the specified property by index.

GetMatrix5x4ValueByName(string)

Gets the value of the specified property by name.

public RawMatrix5x4 GetMatrix5x4ValueByName(string name)

Parameters

name string

The name of the property.

Returns

RawMatrix5x4

The value of the specified property by name.

GetMatrixValue(int)

Gets the value of the specified property by index.

public RawMatrix GetMatrixValue(int index)

Parameters

index int

The index of the property from which the data is to be obtained.

Returns

RawMatrix

The value of the specified property by index.

GetMatrixValueByName(string)

Gets the value of the specified property by name.

public RawMatrix GetMatrixValueByName(string name)

Parameters

name string

The name of the property.

Returns

RawMatrix

The value of the specified property by name.

GetPropertyIndex(string)

Gets the index corresponding to the given property name.

public int GetPropertyIndex(string name)

Parameters

name string

The name of the property to retrieve.

Returns

int

The index of the corresponding property name.

Remarks

If the property does not exist, this method returns D2D1_INVALID_PROPERTY_INDEX. This reserved value will never map to a valid index and will cause null or sentinel values to be returned from other parts of the property interface.

GetPropertyName(int)

Gets the number of characters for the given property name.

public string GetPropertyName(int index)

Parameters

index int

The index of the property for which the name is being returned.

Returns

string

The name of the property

Remarks

This method returns an empty string if index is invalid.

GetRectangleFValue(int)

Gets the value of the specified property by index.

public RawRectangleF GetRectangleFValue(int index)

Parameters

index int

The index of the property from which the data is to be obtained.

Returns

RawRectangleF

The value of the specified property by index.

GetRectangleFValueByName(string)

Gets the value of the specified property by name.

public RawRectangleF GetRectangleFValueByName(string name)

Parameters

name string

The name of the property.

Returns

RawRectangleF

The value of the specified property by name.

GetSubProperties(int)

Gets the sub-properties of the provided property by index. This is a template overload. See Remarks.

public Properties GetSubProperties(int index)

Parameters

index int

The index of the sub-properties to be retrieved.

Returns

Properties

When this method returns, contains the address of a reference to the sub-properties.

Remarks

If there are no sub-properties, subProperties will be null, and will be returned.

template<typename U> SharpDX.Result GetSubProperties( U index, _Outptr_opt_ Properties **subProperties ) CONST;

GetTypeInfo(int)

Gets the PropertyType of the selected property.

public PropertyType GetTypeInfo(int index)

Parameters

index int

No documentation.

Returns

PropertyType

This method returns a PropertyType-typed value for the type of the selected property.

Remarks

If the property does not exist, the method returns D2D1_PROPERTY_TYPE_UNKNOWN.

GetUIntValue(int)

Gets the value of the specified property by index.

public uint GetUIntValue(int index)

Parameters

index int

The index of the property from which the data is to be obtained.

Returns

uint

The value of the specified property by index.

GetUIntValueByName(string)

Gets the value of the specified property by name.

public uint GetUIntValueByName(string name)

Parameters

name string

The name of the property.

Returns

uint

The value of the specified property by name.

GetValue(int, PropertyType, nint, int)

Gets the value of the property by index. This is a template overload. See Remarks.

public void GetValue(int index, PropertyType type, nint data, int dataSize)

Parameters

index int

The index of the property from which the value is to be obtained.

type PropertyType

No documentation.

data nint

No documentation.

dataSize int

No documentation.

Remarks

template<typename T, typename U> T GetValue( U index ) const;

GetValueByName(string, PropertyType, nint, int)

Gets the property value by name. This is a template overload. See Remarks.

public void GetValueByName(string name, PropertyType type, nint data, int dataSize)

Parameters

name string

The property name to get.

type PropertyType

No documentation.

data nint

No documentation.

dataSize int

No documentation.

Remarks

If propertyName does not exist, no information is retrieved.

Any error not in the standard set returned by a property implementation will be mapped into the standard error range.

template<typename T> T GetValueByName( _In_ PCWSTR propertyName ) const;

GetValueSize(int)

Gets the size of the property value in bytes, using the property index. This is a template overload. See Remarks.

public int GetValueSize(int index)

Parameters

index int

The index of the property.

Returns

int

This method returns size of the value in bytes, using the property index

Remarks

This method returns zero if index does not exist.

template<typename U> UINT32 GetValueSize( U index ) CONST;

GetValue<T>(int, PropertyType)

Gets the value of the specified property by index.

public T GetValue<T>(int index, PropertyType type) where T : struct

Parameters

index int

The index of the property from which the data is to be obtained.

type PropertyType

Returns

T

The value of the specified property by index.

Type Parameters

T

GetValue<T>(string, PropertyType)

Gets the value of the specified property by name.

public T GetValue<T>(string name, PropertyType type) where T : struct

Parameters

name string

The name of the property.

type PropertyType

Specifies the type of property to get.

Returns

T

The value of the specified property by name.

Type Parameters

T

GetVector2Value(int)

Gets the value of the specified property by index.

public RawVector2 GetVector2Value(int index)

Parameters

index int

The index of the property from which the data is to be obtained.

Returns

RawVector2

The value of the specified property by index.

GetVector2ValueByName(string)

Gets the value of the specified property by name.

public RawVector2 GetVector2ValueByName(string name)

Parameters

name string

The name of the property.

Returns

RawVector2

The value of the specified property by name.

GetVector3Value(int)

Gets the value of the specified property by index.

public RawVector3 GetVector3Value(int index)

Parameters

index int

The index of the property from which the data is to be obtained.

Returns

RawVector3

The value of the specified property by index.

GetVector3ValueByName(string)

Gets the value of the specified property by name.

public RawVector3 GetVector3ValueByName(string name)

Parameters

name string

The name of the property.

Returns

RawVector3

The value of the specified property by name.

GetVector4Value(int)

Gets the value of the specified property by index.

public RawVector4 GetVector4Value(int index)

Parameters

index int

The index of the property from which the data is to be obtained.

Returns

RawVector4

The value of the specified property by index.

GetVector4ValueByName(string)

Gets the value of the specified property by name.

public RawVector4 GetVector4ValueByName(string name)

Parameters

name string

The name of the property.

Returns

RawVector4

The value of the specified property by name.

SetEnumValue<T>(int, T)

Sets the named property to the given value.

public void SetEnumValue<T>(int index, T value) where T : struct

Parameters

index int

Index of the property

value T

Value of the property

Type Parameters

T

SetValue(int, PropertyType, nint, int)

Sets the corresponding property by index. This is a template overload. See Remarks.

public void SetValue(int index, PropertyType type, nint data, int dataSize)

Parameters

index int

The index of the property to set.

type PropertyType

The data to set.

data nint

No documentation.

dataSize int

No documentation.

Remarks

template<typename T, typename U> SharpDX.Result SetValue( U index, _In_ const T &value );

SetValue(int, RawColor3)

Sets the named property to the given value.

public void SetValue(int index, RawColor3 value)

Parameters

index int

Index of the property

value RawColor3

Value of the property

SetValue(int, RawColor4)

Sets the named property to the given value.

public void SetValue(int index, RawColor4 value)

Parameters

index int

Index of the property

value RawColor4

Value of the property

SetValue(int, RawMatrix)

Sets the named property to the given value.

public void SetValue(int index, RawMatrix value)

Parameters

index int

Index of the property

value RawMatrix

Value of the property

SetValue(int, RawMatrix3x2)

Sets the named property to the given value.

public void SetValue(int index, RawMatrix3x2 value)

Parameters

index int

Index of the property

value RawMatrix3x2

Value of the property

SetValue(int, RawMatrix5x4)

Sets the named property to the given value.

public void SetValue(int index, RawMatrix5x4 value)

Parameters

index int

Index of the property

value RawMatrix5x4

Value of the property

SetValue(int, RawRectangleF)

Sets the named property to the given value.

public void SetValue(int index, RawRectangleF value)

Parameters

index int

Index of the property

value RawRectangleF

Value of the property

SetValue(int, RawVector2)

Sets the named property to the given value.

public void SetValue(int index, RawVector2 value)

Parameters

index int

Index of the property

value RawVector2

Value of the property

SetValue(int, RawVector3)

Sets the named property to the given value.

public void SetValue(int index, RawVector3 value)

Parameters

index int

Index of the property

value RawVector3

Value of the property

SetValue(int, RawVector4)

Sets the named property to the given value.

public void SetValue(int index, RawVector4 value)

Parameters

index int

Index of the property

value RawVector4

Value of the property

SetValue(int, bool)

Sets the named property to the given value.

public void SetValue(int index, bool value)

Parameters

index int

Index of the property

value bool

Value of the property

SetValue(int, Guid)

Sets the named property to the given value.

public void SetValue(int index, Guid value)

Parameters

index int

Index of the property

value Guid

Value of the property

SetValue(int, int)

Sets the named property to the given value.

public void SetValue(int index, int value)

Parameters

index int

Index of the property

value int

Value of the property

SetValue(int, float)

Sets the named property to the given value.

public void SetValue(int index, float value)

Parameters

index int

Index of the property

value float

Value of the property

SetValue(int, string)

Sets the named property to the given value.

public void SetValue(int index, string value)

Parameters

index int

Index of the property

value string

Value of the property

SetValue(int, uint)

Sets the named property to the given value.

public void SetValue(int index, uint value)

Parameters

index int

Index of the property

value uint

Value of the property

SetValueByName(string, PropertyType, nint, int)

Sets the named property to the given value.

public void SetValueByName(string name, PropertyType type, nint data, int dataSize)

Parameters

name string

No documentation.

type PropertyType

No documentation.

data nint

No documentation.

dataSize int

No documentation.

SetValueByName(string, RawColor3)

Sets the named property to the given value.

public void SetValueByName(string name, RawColor3 value)

Parameters

name string

Name of the property

value RawColor3

Value of the property

SetValueByName(string, RawColor4)

Sets the named property to the given value.

public void SetValueByName(string name, RawColor4 value)

Parameters

name string

Name of the property

value RawColor4

Value of the property

SetValueByName(string, RawMatrix)

Sets the named property to the given value.

public void SetValueByName(string name, RawMatrix value)

Parameters

name string

Name of the property

value RawMatrix

Value of the property

SetValueByName(string, RawMatrix3x2)

Sets the named property to the given value.

public void SetValueByName(string name, RawMatrix3x2 value)

Parameters

name string

Name of the property

value RawMatrix3x2

Value of the property

SetValueByName(string, RawMatrix5x4)

Sets the named property to the given value.

public void SetValueByName(string name, RawMatrix5x4 value)

Parameters

name string

Name of the property

value RawMatrix5x4

Value of the property

SetValueByName(string, RawRectangleF)

Sets the named property to the given value.

public void SetValueByName(string name, RawRectangleF value)

Parameters

name string

Name of the property

value RawRectangleF

Value of the property

SetValueByName(string, RawVector2)

Sets the named property to the given value.

public void SetValueByName(string name, RawVector2 value)

Parameters

name string

Name of the property

value RawVector2

Value of the property

SetValueByName(string, RawVector4)

Sets the named property to the given value.

public void SetValueByName(string name, RawVector4 value)

Parameters

name string

Name of the property

value RawVector4

Value of the property

SetValueByName(string, bool)

Sets the named property to the given value.

public void SetValueByName(string name, bool value)

Parameters

name string

Name of the property

value bool

Value of the property

SetValueByName(string, Guid)

Sets the named property to the given value.

public void SetValueByName(string name, Guid value)

Parameters

name string

Name of the property

value Guid

Value of the property

SetValueByName(string, int)

Sets the named property to the given value.

public void SetValueByName(string name, int value)

Parameters

name string

Name of the property

value int

Value of the property

SetValueByName(string, float)

Sets the named property to the given value.

public void SetValueByName(string name, float value)

Parameters

name string

Name of the property

value float

Value of the property

SetValueByName(string, string)

Sets the named property to the given value.

public void SetValueByName(string name, string value)

Parameters

name string

Name of the property

value string

Value of the property

SetValueByName(string, uint)

Sets the named property to the given value.

public void SetValueByName(string name, uint value)

Parameters

name string

Name of the property

value uint

Value of the property

SetValueByName<T>(string, PropertyType, T)

Sets the named property to the given value.

public void SetValueByName<T>(string name, PropertyType type, T value) where T : struct

Parameters

name string

Name of the property

type PropertyType

Specifies the type of property to set.

value T

Value of the property

Type Parameters

T

SetValueByName<T>(string, T)

Sets the named property to the given value.

public void SetValueByName<T>(string name, T value) where T : ComObject

Parameters

name string

Name of the property

value T

Value of the property

Type Parameters

T

SetValue<T>(int, PropertyType, T)

Sets the named property to the given value.

public void SetValue<T>(int index, PropertyType type, T value) where T : struct

Parameters

index int

Index of the property

type PropertyType

Specifies the type of property to set.

value T

Value of the property

Type Parameters

T

SetValue<T>(int, T)

Sets the named property to the given value.

public void SetValue<T>(int index, T value) where T : ComObject

Parameters

index int

Index of the property

value T

Value of the property

Type Parameters

T

Operators

explicit operator Properties(nint)

public static explicit operator Properties(nint nativePtr)

Parameters

nativePtr nint

Returns

Properties