DirectProperty<TOwner, TValue>.

AddOwnerWithDataValidation<TNewOwner>(Func<TNewOwner, TValue>, Action<TNewOwner, TValue>, TValue, BindingMode, bool) Method

Summary

Registers the direct property on another type.
Namespace
Avalonia
Containing Type
DirectProperty<TOwner, TValue>

Syntax

public DirectProperty<TNewOwner, TValue> AddOwnerWithDataValidation<TNewOwner>(Func<TNewOwner, TValue> getter, Action<TNewOwner, TValue> setter, 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

Type Description
DirectProperty<TNewOwner, TValue> The property.