// internal sealed class OverrideMetadataAttribute : global::System.Attribute // ... 省略 [global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = true)] [global::System.Diagnostics.Conditional("DEPENDENCY_PROPERTY_GENERATOR_ATTRIBUTES")] internal sealed class OverrideMetadataAttribute : 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 object? 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; } /// /// 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: 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; } /// /// /// /// /// public OverrideMetadataAttribute( string name) { Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); Type = typeof(T); } }