StyledPropertyMetadata<TValue> Class
Definition
Metadata for styled avalonia properties.
public class StyledPropertyMetadata<TValue>
Constructors
| Name | Description |
|---|---|
| StyledPropertyMetadata<TValue> | No summary available. |
StyledPropertyMetadata<TValue> Constructor
public StyledPropertyMetadata<TValue>(Avalonia.Data.Optional<T><TValue> defaultValue, Avalonia.Data.BindingMode defaultBindingMode, Func<Avalonia.AvaloniaObject, TValue, TValue> coerce, bool enableDataValidation)
Parameters
defaultValue Avalonia.Data.Optional<T><TValue>
defaultBindingMode Avalonia.Data.BindingMode
coerce Func<Avalonia.AvaloniaObject, TValue, TValue>
enableDataValidation bool
Methods
| Name | Description |
|---|---|
| GenerateTypeSafeMetadata | Gets a copy of this object configured for use with any owner type. |
| Merge | Merges the metadata with the base metadata. |
| Freeze | Makes this instance read-only. No further modifications are allowed after this call. Inherited from AvaloniaPropertyMetadata. |
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 |
|---|---|
| CoerceValue | Gets the value coercion callback, if any. |
| DefaultValue | Gets the default value for the property. |
| DefaultBindingMode | Gets the default binding mode for the property. Inherited from AvaloniaPropertyMetadata. |
| EnableDataValidation | Gets a value indicating whether the property is interested in data validation. Inherited from AvaloniaPropertyMetadata. |
| IsReadOnly | Gets whether this instance is read-only and can't be modified. Inherited from AvaloniaPropertyMetadata. |
CoerceValue Property
Gets the value coercion callback, if any.
public Func<Avalonia.AvaloniaObject, TValue, TValue> CoerceValue { get; set; }
DefaultValue Property
Gets the default value for the property.
public TValue DefaultValue { get; set; }