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
defaultValue
TPropertyThe default value of the property
actionOnChange
ChangeActionThe action to take in the layout system when this property changes
validate
Predicate<TProperty>
Methods
Get(ArrangableElement)
Gets the value of this property on an element
public TProperty Get(ArrangableElement element)
Parameters
element
ArrangableElementThe element
Returns
- TProperty
Set(ArrangableElement, TProperty)
Sets the value of this property on an element
public void Set(ArrangableElement element, TProperty value)
Parameters
element
ArrangableElementThe element
value
TPropertyThe new value