Table of Contents

Class AttachedPropertyInfo<T>

Namespace
Myra.MML
Assembly
Myra.dll

Generic attached property metadata and accessor.

public class AttachedPropertyInfo<T> : BaseAttachedPropertyInfo

Type Parameters

T

The type of the property value.

Inheritance
AttachedPropertyInfo<T>
Inherited Members

Constructors

AttachedPropertyInfo(int, string, Type, T, AttachedPropertyOption, Attribute[])

Initializes a new instance of the AttachedPropertyInfo<T> class.

public AttachedPropertyInfo(int id, string name, Type ownerType, T defaultValue, AttachedPropertyOption option, Attribute[] attributes = null)

Parameters

id int

The unique identifier for the property.

name string

The name of the property.

ownerType Type

The type that owns the property.

defaultValue T

The default value for the property.

option AttachedPropertyOption

The option specifying how the property affects layout.

attributes Attribute[]

Optional attributes for the property.

Properties

DefaultValue

Gets the default value for this property.

public T DefaultValue { get; }

Property Value

T

DefaultValueObject

Gets the default value for this property as an object.

public override object DefaultValueObject { get; }

Property Value

object

PropertyType

Gets the type of the property value.

public override Type PropertyType { get; }

Property Value

Type

Methods

GetValue(BaseObject)

Gets the property value from the specified object.

public T GetValue(BaseObject obj)

Parameters

obj BaseObject

The object to get the property value from.

Returns

T

The property value, or the default value if not set.

GetValueObject(BaseObject)

Gets the property value from the specified object as an object.

public override object GetValueObject(BaseObject widget)

Parameters

widget BaseObject

The object to get the property value from.

Returns

object

The property value as an object.

SetValue(BaseObject, T)

Sets the property value on the specified object.

public void SetValue(BaseObject obj, T value)

Parameters

obj BaseObject

The object to set the property value on.

value T

The property value to set.

SetValueObject(BaseObject, object)

Sets the property value on the specified object from an object.

public override void SetValueObject(BaseObject widget, object value)

Parameters

widget BaseObject

The object to set the property value on.

value object

The property value to set as an object.