Class AttachedProperty<TProperty>
A property declaration on a parent object that requires its children to specify parameters
public class AttachedProperty<TProperty>
Type Parameters
TProperty
- Inheritance
-
AttachedProperty<TProperty>
- Inherited Members
Constructors
AttachedProperty(TProperty, ChangeAction, Predicate<TProperty>?)
Creates a new attached property
public AttachedProperty(TProperty defaultValue, ChangeAction actionOnChange = ChangeAction.None, Predicate<TProperty>? validate = null)
Parameters
defaultValueTPropertyThe default value of the property
actionOnChangeChangeActionThe action to take in the layout system when this property changes
validatePredicate<TProperty>
Methods
Get(ArrangableElement)
Gets the value of this property on an element
public TProperty Get(ArrangableElement element)
Parameters
elementArrangableElementThe element
Returns
- TProperty
Set(ArrangableElement, TProperty)
Sets the value of this property on an element
public void Set(ArrangableElement element, TProperty value)
Parameters
elementArrangableElementThe element
valueTPropertyThe new value