Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ranstar74 opened this issue Aug 31, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ranstar74
Copy link

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 ranstar74 added the bug Something isn't working label Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant