AvaloniaPropertyRegisterAttachedTOwner, THost, TValue(String, TValue, Boolean, BindingMode, FuncTValue, Boolean, FuncAvaloniaObject, TValue, TValue) Method
Namespace: AvaloniaAssembly: Avalonia.Base (in Avalonia.Base.dll) Version: 11.3.999
public static AttachedProperty<TValue> RegisterAttached<TOwner, THost, TValue>(
string name,
TValue defaultValue = null,
bool inherits = false,
BindingMode defaultBindingMode = BindingMode.OneWay,
Func<TValue, bool>? validate = null,
Func<AvaloniaObject, TValue, TValue>? coerce = null
)
where THost : AvaloniaObject
Public Shared Function RegisterAttached(Of TOwner, THost As AvaloniaObject, TValue) (
name As String,
Optional defaultValue As TValue = Nothing,
Optional inherits As Boolean = false,
Optional defaultBindingMode As BindingMode = BindingMode.OneWay,
Optional validate As Func(Of TValue, Boolean) = Nothing,
Optional coerce As Func(Of AvaloniaObject, TValue, TValue) = Nothing
) As AttachedProperty(Of TValue)
static member RegisterAttached :
name : string *
?defaultValue : 'TValue *
?inherits : bool *
?defaultBindingMode : BindingMode *
?validate : Func<'TValue, bool> *
?coerce : Func<AvaloniaObject, 'TValue, 'TValue>
(* Defaults:
let _defaultValue = defaultArg defaultValue null
let _inherits = defaultArg inherits false
let _defaultBindingMode = defaultArg defaultBindingMode BindingMode.OneWay
let _validate = defaultArg validate null
let _coerce = defaultArg coerce null
*)
-> AttachedProperty<'TValue> when 'THost : AvaloniaObject
- name String
- The name of the property.
- defaultValue TValue (Optional)
- The default value of the property.
- inherits Boolean (Optional)
- Whether the property inherits its value.
- defaultBindingMode BindingMode (Optional)
- The default binding mode for the property.
- validate FuncTValue, Boolean (Optional)
- A value validation callback.
- coerce FuncAvaloniaObject, TValue, TValue (Optional)
- A value coercion callback.
- TOwner
- The type of the class that is registering the property.
- THost
- The type of the class that the property is to be registered on.
- TValue
- The type of the property's value.
AttachedPropertyTValueA
AvaloniaPropertyTValue