Class BindingBase
public abstract class BindingBase : IBinding
- Inheritance
-
BindingBase
- Implements
- Derived
- Inherited Members
Constructors
BindingBase()
Initializes a new instance of the Binding class.
public BindingBase()
BindingBase(BindingMode)
Initializes a new instance of the Binding class.
public BindingBase(BindingMode mode = BindingMode.Default)
Parameters
mode
BindingModeThe binding mode.
Properties
Converter
Gets or sets the IValueConverter to use.
public IValueConverter? Converter { get; set; }
Property Value
ConverterCulture
Gets or sets the culture in which to evaluate the converter.
[TypeConverter(typeof(CultureInfoIetfLanguageTagConverter))]
public CultureInfo? ConverterCulture { get; set; }
Property Value
- CultureInfo
The default value is null.
Remarks
If this property is not set then CurrentCulture will be used.
ConverterParameter
Gets or sets a parameter to pass to Converter.
public object? ConverterParameter { get; set; }
Property Value
DefaultAnchor
public WeakReference? DefaultAnchor { get; set; }
Property Value
Delay
Gets or sets the amount of time, in milliseconds, to wait before updating the binding source after the value on the target changes.
public int Delay { get; set; }
Property Value
Remarks
There is no delay when the source is updated via LostFocus or UpdateSource(). Nor is there a delay when OneWayToSource is active and a new source object is provided.
FallbackValue
Gets or sets the value to use when the binding is unable to produce a value.
public object? FallbackValue { get; set; }
Property Value
Mode
Gets or sets the binding mode.
public BindingMode Mode { get; set; }
Property Value
NameScope
public WeakReference<INameScope?>? NameScope { get; set; }
Property Value
Priority
Gets or sets the binding priority.
public BindingPriority Priority { get; set; }
Property Value
StringFormat
Gets or sets the string format.
public string? StringFormat { get; set; }
Property Value
TargetNullValue
Gets or sets the value to use when the binding result is null.
public object? TargetNullValue { get; set; }
Property Value
UpdateSourceTrigger
Gets or sets a value that determines the timing of binding source updates for TwoWay and OneWayToSource bindings.
public UpdateSourceTrigger UpdateSourceTrigger { get; set; }
Property Value
Methods
Initiate(AvaloniaObject, AvaloniaProperty?, object?, bool)
Initiates the binding on a target object.
[Obsolete("This API may be removed in Avalonia 12. If you depend on this API, please open an issue with details of your use-case.")]
public abstract InstancedBinding? Initiate(AvaloniaObject target, AvaloniaProperty? targetProperty, object? anchor = null, bool enableDataValidation = false)
Parameters
target
AvaloniaObjectThe target instance.
targetProperty
AvaloniaPropertyThe target property. May be null.
anchor
objectAn optional anchor from which to locate required context. When binding to objects that are not in the logical tree, certain types of binding need an anchor into the tree in order to locate named controls or resources. The
anchor
parameter can be used to provide this context.enableDataValidation
boolWhether data validation should be enabled.
Returns
- InstancedBinding
A InstancedBinding or null if the binding could not be resolved.