Skip to main content

GeneratedDirectPropertyAttribute Class

Definition​

Namespace:Avalonia
Assembly:Avalonia.Base
Package:Avalonia

Instructs the Avalonia property source generator to emit a Avalonia.DirectProperty<T1, T2> registration and accessor bodies for the annotated partial property.

public class GeneratedDirectPropertyAttribute

Inheritance: Attribute -> GeneratedDirectPropertyAttribute

Remarks​

Apply to a partial instance property with both get and set accessors, declared on a partial class deriving from Avalonia.AvaloniaObject.

Constructors​

NameDescription
GeneratedDirectPropertyAttributeNo summary available.

GeneratedDirectPropertyAttribute Constructor​

public GeneratedDirectPropertyAttribute()

Properties​

NameDescription
AddOwnerFromRe-owns an existing direct property from the specified base type instead of registering a new property. The source property must be a static {Name}Property member of the given type.
DefaultBindingModeThe default binding mode for the property.
EnableDataValidationWhether the property is interested in data validation.
UnsetValueThe value returned when the property is cleared (e.g. by ClearValue) or when a binding produces an invalid value. The initial value of the property comes from the property initializer.

AddOwnerFrom Property​

Re-owns an existing direct property from the specified base type instead of registering a new property. The source property must be a static {Name}Property member of the given type.

public Type AddOwnerFrom { get; set; }

DefaultBindingMode Property​

The default binding mode for the property.

public Avalonia.Data.BindingMode DefaultBindingMode { get; set; }

EnableDataValidation Property​

Whether the property is interested in data validation.

public bool EnableDataValidation { get; set; }

UnsetValue Property​

The value returned when the property is cleared (e.g. by ClearValue) or when a binding produces an invalid value. The initial value of the property comes from the property initializer.

public object UnsetValue { get; set; }