Summary
Registers the direct property on another type.
Syntax
public DirectProperty<TNewOwner, TValue> AddOwner<TNewOwner>(Func<TNewOwner, TValue> getter, Action<TNewOwner, TValue> setter = null, TValue unsetValue = default(TValue), BindingMode defaultBindingMode = Default, bool enableDataValidation = false)
where TNewOwner : AvaloniaObject
Type Parameters
Name |
Description |
TNewOwner |
The type of the additional owner. |
Parameters
Name |
Type |
Description |
getter |
Func<TNewOwner, TValue> |
Gets the current value of the property. |
setter |
Action<TNewOwner, TValue> |
Sets the value of the property. |
unsetValue |
TValue |
The value to use when the property is set to UnsetValue
|
defaultBindingMode |
BindingMode |
The default binding mode for the property. |
enableDataValidation |
bool |
Whether the property is interested in data validation.
|
Return Value