Skip to main content

DirectPropertyMetadata<TValue> Class

Definition

Namespace:Avalonia
Assembly:Avalonia.Base
Package:Avalonia

Metadata for direct avalonia properties.

public class DirectPropertyMetadata<TValue>

Inheritance: object -> AvaloniaPropertyMetadata -> DirectPropertyMetadata<TValue>

Constructors

NameDescription
DirectPropertyMetadata<TValue>No summary available.

DirectPropertyMetadata<TValue> Constructor

public DirectPropertyMetadata<TValue>(TValue unsetValue, Avalonia.Data.BindingMode defaultBindingMode, Nullable<bool> enableDataValidation)

Parameters

unsetValue TValue

defaultBindingMode Avalonia.Data.BindingMode

enableDataValidation Nullable<bool>

Methods

NameDescription
GenerateTypeSafeMetadataGets a copy of this object configured for use with any owner type.
MergeMerges the metadata with the base metadata.
FreezeMakes 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

NameDescription
UnsetValueGets the value to use when the property is set to Avalonia.AvaloniaProperty.UnsetValue.
DefaultBindingModeGets the default binding mode for the property. Inherited from AvaloniaPropertyMetadata.
EnableDataValidationGets a value indicating whether the property is interested in data validation. Inherited from AvaloniaPropertyMetadata.
IsReadOnlyGets whether this instance is read-only and can't be modified. Inherited from AvaloniaPropertyMetadata.

UnsetValue Property

Gets the value to use when the property is set to Avalonia.AvaloniaProperty.UnsetValue.

public TValue UnsetValue { get; set; }