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

Brushes ignore changes to Transform's changed event #15097

Open
BAndysc opened this issue Mar 24, 2024 · 0 comments · May be fixed by #15098
Open

Brushes ignore changes to Transform's changed event #15097

BAndysc opened this issue Mar 24, 2024 · 0 comments · May be fixed by #15098
Labels

Comments

@BAndysc
Copy link
Contributor

BAndysc commented Mar 24, 2024

Describe the bug

Brushes are not invalidated when their bound Transform is changed (not the property, but the inner matrix).

To Reproduce

public Window1()
{
    InitializeComponent();
    var transform = new TranslateTransform();
    Background = new DrawingBrush()
    {
        TileMode = TileMode.Tile,
        DestinationRect = new RelativeRect(0, 0, 15, 15, RelativeUnit.Absolute),
        Drawing = new GeometryDrawing()
        {
            Geometry = Geometry.Parse("M0,0 L0,1 0.03,1 0.03,0.03 1,0.03 1,0 Z"), Brush = Brushes.Red
        },
        Transform = transform
    };
    DispatcherTimer.Run(() =>
    {
        transform.Y++;
        return true;
    }, TimeSpan.FromMilliseconds(32));
}

See the background is not moving despite updating the transform.

Expected behavior

Brushes should be invalidated when transform's Changed event is fired

Avalonia version

11.1-beta1

OS

No response

Additional context

No response

@BAndysc BAndysc added the bug label Mar 24, 2024
@BAndysc BAndysc linked a pull request Mar 24, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant