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)
- C#
- VB
- F#
public class BindingNotification
Public Class BindingNotification
type BindingNotification = class end
Inheritance | Object → BindingNotification |
Remarks
This class is very similar to BindingValue(T), but where BindingValue(T) 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.
Constructors
BindingNotification(Object) | Initializes a new instance of the BindingNotification class. |
BindingNotification(Exception, BindingErrorType) | Initializes a new instance of the BindingNotification class. |
BindingNotification(Exception, BindingErrorType, Object) | Initializes a new instance of the BindingNotification 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 Object.Equals(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. |
Finalize() | Allows 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 Object.GetHashCode()) |
GetType() | Gets the Type of the current instance. (Inherited from Object) |
MemberwiseClone() | Creates a shallow copy of the current Object. (Inherited from Object) |
SetValue(Object) | Sets the Value. |
ToString() | Returns a string that represents the current object. (Overrides Object.ToString()) |
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. |