BindingNotification Class

Represents a binding notification that can be a valid binding value, or a binding or data validation error.

Definition

Namespace: Avalonia.Data
Assembly: Avalonia.Base (in Avalonia.Base.dll) Version: 11.3.999
public class BindingNotification
Inheritance
Object    BindingNotification

Remarks

This class is very similar to BindingValueT, but where BindingValueT is used by typed bindings, this class is used to hold binding and data validation errors in untyped bindings. As Avalonia moves towards using typed bindings by default we may want to remove this class.

Properties

Error Gets the error that occurred on the source, if any.
ErrorType Gets the type of error that Error represents, if any.
HasValue Gets a value indicating whether Value should be pushed to the target.
Value Gets the value that should be passed to the target when HasValue is true.

Methods

AddError(Exception, BindingErrorType) Adds an error to the BindingNotification.
ClearValue Removes the Value and makes HasValue return null.
Equals(BindingNotification) Compares a value to an instance of BindingNotification for equality.
Equals(Object) Compares an object to an instance of BindingNotification for equality.
(Overrides ObjectEquals(Object))
ExtractError(Object) Gets an exception from an object that may be a BindingNotification.
ExtractValue(Object) Gets a value from an object that may be a BindingNotification.
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCode Gets the hash code for this instance of BindingNotification.
(Overrides ObjectGetHashCode)
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
SetValue(Object) Sets the Value.
ToStringReturns a string that represents the current object.
(Overrides ObjectToString)
UpdateValue(Object, Object) Updates the value of an object that may be a BindingNotification.

Operators

Equality(BindingNotification, BindingNotification) Compares two instances of BindingNotification for equality.
Inequality(BindingNotification, BindingNotification) Compares two instances of BindingNotification for inequality.

Fields

Null A binding notification representing the null value.
UnsetValue A binding notification representing UnsetValue.

See Also