// internal sealed class AddOwnerAttribute : global::System.Attribute // ... 省略 [global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = true)] [global::System.Diagnostics.Conditional("DEPENDENCY_PROPERTY_GENERATOR_ATTRIBUTES")] internal sealed class AddOwnerAttribute : global::System.Attribute { /// /// Name of this dependency property. /// public string Name { get; } /// /// Type of this dependency property. /// public global::System.Type Type { get; } /// /// Default value of this dependency property.
/// If you need to pass a new() expression, use .
/// Default - . ///
public T? DefaultValue { get; set; } /// /// Default value expression of this dependency property.
/// Used to pass a new() expression to an initializer.
/// Default - . ///
public string? DefaultValueExpression { get; set; } /// /// Avalonia: For direct properties, the generated property is read-only and the setter is non-public.
/// Default - . ///
public bool IsReadOnly { get; set; } /// /// Avalonia: Direct properties are a lightweight version of styled properties.
/// Default - . ///
public bool IsDirect { get; set; } /// /// Description of this dependency property.
/// The property will contain a with this value.
/// This will also be used in the xml documentation if not explicitly specified.
/// Default - . ///
public string? Description { get; set; } /// /// Category of this dependency property.
/// The property will contain a with this value.
/// Default - . ///
public string? Category { get; set; } /// /// Type converter of this dependency property.
/// The property will contain a with this value.
/// Default - . ///
public global::System.Type? TypeConverter { get; set; } /// /// The property will contain a with this value.
/// Default - . ///
public bool Bindable { get; set; } /// /// The property will contain a with this value.
/// Default - . ///
public bool Browsable { get; set; } /// /// The property will contain a with this value.
/// Default - . ///
public global::System.ComponentModel.DesignerSerializationVisibility DesignerSerializationVisibility { get; set; } /// /// The property will contain a with this value.
/// Default - . ///
public bool ClsCompliant { get; set; } /// /// The type that owns the original Dependency Property.
/// Required. ///
public global::System.Type? FromType { get; } /// /// The dependency property xml documentation.
/// Default - "<summary></summary>". ///
public string XmlDocumentation { get; set; } = string.Empty; /// /// The property getter xml documentation.
/// Default - "<summary></summary>". ///
public string GetterXmlDocumentation { get; set; } = string.Empty; /// /// The property setter xml documentation.
/// Default - "<summary></summary>". ///
public string SetterXmlDocumentation { get; set; } = string.Empty; /// /// For values other than default(type), will bind/rebind/remove the /// On{Name}Changed_{EventName}(object sender, Args args) handler for the specified event.
/// It is recommended to specify as nameof(Control.SomeEvent) or another Avalonia event name.
/// Default - string.Empty. ///
public string BindEvent { get; set; } = string.Empty; /// /// For values other than default(type), will bind/rebind/remove the /// On{Name}Changed_{EventName}(object sender, Args args) handler for the specified event.
/// It is recommended to specify as nameof(Control.SomeEvent) or another Avalonia event name.
/// Default - . ///
public string[]? BindEvents { get; set; } /// /// Allows to set a custom name for the OnChanged method call, allowing this method to be non-partial. /// public string OnChanged { get; set; } = string.Empty; /// /// Avalonia: The values of this property are inherited by child elements. /// public bool Inherits { get; set; } /// /// Avalonia: Default BindingMode.
/// Default - . ///
public DefaultBindingMode DefaultBindingMode { get; set; } = DefaultBindingMode.Default; /// /// Avalonia: partial method for coerce callback will be created for styled or attached properties. /// public bool Coerce { get; set; } /// /// Avalonia: partial method for validate callback will be created for styled or attached properties. /// public bool Validate { get; set; } /// /// /// /// /// public AddOwnerAttribute( string name) { Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); Type = typeof(T); FromType = typeof(TFromType); } }