Class AttachedPropertiesRegistry
Registry for managing all attached properties in the Myra framework.
public static class AttachedPropertiesRegistry
- Inheritance
-
AttachedPropertiesRegistry
- Inherited Members
Methods
Create<T>(Type, string, T, AttachedPropertyOption, Attribute[])
Creates a new attached property and registers it.
public static AttachedPropertyInfo<T> Create<T>(Type type, string name, T defaultValue, AttachedPropertyOption option, Attribute[] attributes = null)
Parameters
typeTypeThe type that owns the property.
namestringThe name of the property.
defaultValueTThe default value for the property.
optionAttachedPropertyOptionThe option specifying how the property affects layout.
attributesAttribute[]Optional attributes for the property.
Returns
- AttachedPropertyInfo<T>
The created attached property metadata.
Type Parameters
TThe type of the property value.
GetPropertiesOfType(Type)
Gets all attached properties defined on the specified type and its base types.
public static BaseAttachedPropertyInfo[] GetPropertiesOfType(Type type)
Parameters
typeTypeThe type to get properties for.
Returns
- BaseAttachedPropertyInfo[]
An array of all attached properties for the type.