Class BaseAttachedPropertyInfo
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
idintThe unique identifier for the property.
namestringThe name of the property.
ownerTypeTypeThe type that owns the property.
optionAttachedPropertyOptionThe option specifying how the property affects layout.
attributesAttribute[]Optional attributes for the property.
Properties
Attributes
Gets the attributes associated with this property.
public Attribute[] Attributes { get; }
Property Value
DefaultValueObject
Gets the default value for this property as an object.
public abstract object DefaultValueObject { get; }
Property Value
Id
Gets the unique identifier for this attached property.
public int Id { get; }
Property Value
Name
Gets the name of the attached property.
public string Name { get; }
Property Value
Option
Gets the option that specifies how this property affects layout.
public AttachedPropertyOption Option { get; }
Property Value
OwnerType
Gets the type that owns this attached property.
public Type OwnerType { get; }
Property Value
PropertyType
Gets the type of the property value.
public abstract Type PropertyType { get; }
Property Value
Methods
GetValueObject(BaseObject)
Gets the property value from the specified object.
public abstract object GetValueObject(BaseObject obj)
Parameters
objBaseObjectThe 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
objBaseObjectThe object to check.
Returns
- bool
trueif a value exists; otherwisefalse.
SetValueObject(BaseObject, object)
Sets the property value on the specified object.
public abstract void SetValueObject(BaseObject obj, object value)
Parameters
objBaseObjectThe object to set the property value on.
valueobjectThe property value to set.