Summary
Represents a binding notification that can be a valid binding value, or a binding or
data validation error.
- Namespace
- Avalonia
.Data - Base Types
-
- object
graph BT
Type-->Base0["object"]
Type["BindingNotification"]
class Type type-node
Syntax
public class 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
Name | Summary |
---|---|
BindingNotification |
Initializes a new instance of the BindingNotification class.
|
BindingNotification |
Initializes a new instance of the BindingNotification class.
|
BindingNotification |
Initializes a new instance of the BindingNotification class.
|
Fields
Name | Constant Value | Summary |
---|---|---|
Null |
A binding notification representing the null value.
static
|
|
UnsetValue |
A binding notification representing
UnsetValue .
static
|
Properties
Name | Value | Summary |
---|---|---|
Error | Exception |
Gets the error that occurred on the source, if any.
|
ErrorType | BindingErrorType |
Gets the type of error that
Error represents, if any.
|
HasValue | bool |
Gets a value indicating whether
Value should be pushed to the target.
|
Value | object |
Gets the value that should be passed to the target when
HasValue
is true.
|
Methods
Name | Value | Summary |
---|---|---|
AddError |
void |
Adds an error to the
BindingNotification .
|
ClearValue |
void | |
Equals |
bool |
Compares a value to an instance of
BindingNotification for equality.
|
Equals |
bool |
Compares an object to an instance of
BindingNotification for equality.
|
ExtractError |
object |
Gets an exception from an object that may be a
BindingNotification .
static
|
ExtractValue |
object |
Gets a value from an object that may be a
BindingNotification .
static
|
GetHashCode |
int |
Gets the hash code for this instance of
BindingNotification .
|
SetValue |
void |
Sets the
Value .
|
ToBindingValue |
BindingValue |
|
ToString |
string |
Operators
Name | Value | Summary |
---|---|---|
operator != |
bool | |
operator == |
bool |