Table of Contents

Class BaseAttachedPropertyInfo

Namespace
Myra.MML
Assembly
Myra.dll

Base class for attached property metadata.

public abstract class BaseAttachedPropertyInfo
Inheritance
BaseAttachedPropertyInfo
Derived
Inherited Members

Constructors

BaseAttachedPropertyInfo(int, string, Type, AttachedPropertyOption, Attribute[])

Initializes a new instance of the BaseAttachedPropertyInfo class.

protected BaseAttachedPropertyInfo(int id, string name, Type ownerType, 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.

option AttachedPropertyOption

The option specifying how the property affects layout.

attributes Attribute[]

Optional attributes for the property.

Properties

Attributes

Gets the attributes associated with this property.

public Attribute[] Attributes { get; }

Property Value

Attribute[]

DefaultValueObject

Gets the default value for this property as an object.

public abstract object DefaultValueObject { get; }

Property Value

object

Id

Gets the unique identifier for this attached property.

public int Id { get; }

Property Value

int

Name

Gets the name of the attached property.

public string Name { get; }

Property Value

string

Option

Gets the option that specifies how this property affects layout.

public AttachedPropertyOption Option { get; }

Property Value

AttachedPropertyOption

OwnerType

Gets the type that owns this attached property.

public Type OwnerType { get; }

Property Value

Type

PropertyType

Gets the type of the property value.

public abstract Type PropertyType { get; }

Property Value

Type

Methods

GetValueObject(BaseObject)

Gets the property value from the specified object.

public abstract object GetValueObject(BaseObject obj)

Parameters

obj BaseObject

The object to get the property value from.

Returns

object

The property value as an object.

HasValue(BaseObject)

Returns true if the specified object has a value stored for this attached property.

public bool HasValue(BaseObject obj)

Parameters

obj BaseObject

The object to check.

Returns

bool

true if a value exists; otherwise false.

SetValueObject(BaseObject, object)

Sets the property value on the specified object.

public abstract void SetValueObject(BaseObject obj, object value)

Parameters

obj BaseObject

The object to set the property value on.

value object

The property value to set.