AvaloniaPropertyRegisterDirectTOwner, TValue Method
Namespace: AvaloniaAssembly: Avalonia.Base (in Avalonia.Base.dll) Version: 11.3.999
public static DirectProperty<TOwner, TValue> RegisterDirect<TOwner, TValue>(
string name,
Func<TOwner, TValue> getter,
Action<TOwner, TValue>? setter = null,
TValue unsetValue = null,
BindingMode defaultBindingMode = BindingMode.OneWay,
bool enableDataValidation = false
)
where TOwner : AvaloniaObject
Public Shared Function RegisterDirect(Of TOwner As AvaloniaObject, TValue) (
name As String,
getter As Func(Of TOwner, TValue),
Optional setter As Action(Of TOwner, TValue) = Nothing,
Optional unsetValue As TValue = Nothing,
Optional defaultBindingMode As BindingMode = BindingMode.OneWay,
Optional enableDataValidation As Boolean = false
) As DirectProperty(Of TOwner, TValue)
static member RegisterDirect :
name : string *
getter : Func<'TOwner, 'TValue> *
?setter : Action<'TOwner, 'TValue> *
?unsetValue : 'TValue *
?defaultBindingMode : BindingMode *
?enableDataValidation : bool
(* Defaults:
let _setter = defaultArg setter null
let _unsetValue = defaultArg unsetValue null
let _defaultBindingMode = defaultArg defaultBindingMode BindingMode.OneWay
let _enableDataValidation = defaultArg enableDataValidation false
*)
-> DirectProperty<'TOwner, 'TValue> when 'TOwner : AvaloniaObject
- name String
- The name of the property.
- getter FuncTOwner, TValue
- Gets the current value of the property.
- setter ActionTOwner, TValue (Optional)
- Sets the value of the property.
- unsetValue TValue (Optional)
- The value to use when the property is cleared.
- defaultBindingMode BindingMode (Optional)
- The default binding mode for the property.
- enableDataValidation Boolean (Optional)
-
Whether the property is interested in data validation.
- TOwner
- The type of the class that is registering the property.
- TValue
- The type of the property's value.
DirectPropertyTOwner,
TValueA
AvaloniaPropertyTValue