AvaloniaPropertyMetadata Class
Definition
Base class for avalonia property metadata.
public class AvaloniaPropertyMetadata
Constructors
| Name | Description |
|---|---|
| AvaloniaPropertyMetadata | No summary available. |
AvaloniaPropertyMetadata Constructor
public AvaloniaPropertyMetadata(Avalonia.Data.BindingMode defaultBindingMode, Nullable<bool> enableDataValidation)
Parameters
defaultBindingMode Avalonia.Data.BindingMode
enableDataValidation Nullable<bool>
Methods
| Name | Description |
|---|---|
| Freeze | Makes this instance read-only. No further modifications are allowed after this call. |
| GenerateTypeSafeMetadata | Gets a copy of this object configured for use with any owner type. |
| Merge | Merges the metadata with the base metadata. |
Freeze Method
Makes this instance read-only. No further modifications are allowed after this call.
public void Freeze()
GenerateTypeSafeMetadata Method
Gets a copy of this object configured for use with any owner type.
public Avalonia.AvaloniaPropertyMetadata GenerateTypeSafeMetadata()
Returns
Avalonia.AvaloniaPropertyMetadata
Remarks
For example, delegates which receive the owner object should be removed.
Merge Method
Merges the metadata with the base metadata.
public void Merge(Avalonia.AvaloniaPropertyMetadata baseMetadata, Avalonia.AvaloniaProperty property)
Parameters
baseMetadata Avalonia.AvaloniaPropertyMetadata
The base metadata to merge.
property Avalonia.AvaloniaProperty
The property to which the metadata is being applied.
Properties
| Name | Description |
|---|---|
| DefaultBindingMode | Gets the default binding mode for the property. |
| EnableDataValidation | Gets a value indicating whether the property is interested in data validation. |
| IsReadOnly | Gets whether this instance is read-only and can't be modified. |
DefaultBindingMode Property
Gets the default binding mode for the property.
public Avalonia.Data.BindingMode DefaultBindingMode { get; set; }
EnableDataValidation Property
Gets a value indicating whether the property is interested in data validation.
public Nullable<bool> EnableDataValidation { get; set; }
Remarks
Data validation is validation performed at the target of a binding, for example in a view model using the INotifyDataErrorInfo interface. Only certain properties on a control (such as a TextBox's Text property) will be interested in receiving data validation messages so this feature must be explicitly enabled by setting this flag.
IsReadOnly Property
Gets whether this instance is read-only and can't be modified.
public bool IsReadOnly { get; set; }