DependencyPropertyGenerator icon indicating copy to clipboard operation
DependencyPropertyGenerator copied to clipboard

No code is generated for AffectsRender/AffectsMeasure/AffectsArrange in Avalonia

Open ranstar74 opened this issue 1 year ago • 0 comments

Describe the bug

Such properties in Avalonia must be declared in static constructor:

static MyControl()
{
    AffectsRender<MyControl>(MyProperty);
    AffectsMeasure<MyControl>(MyProperty);
    AffectsArrange<MyControl>(MyProperty);
}

Steps to reproduce the bug

Declare class with following attribute:

[DependencyProperty("Fill", typeof(IBrush), AffectsRender = true)]

Expected behavior

Generated static constructor with following code:

static MyControl()
{
    AffectsRender<MyControl>(FillProperty);
}

Screenshots

No response

NuGet package version

1.5.0-beta.2

IDE

Visual Studio 2022

Additional context

No response

ranstar74 avatar Aug 31 '24 14:08 ranstar74