You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm unsure if this is a bug or not as I've been unable to reproduce with a cut down project. So I'm looking for guidance on were to investigate to figure out if it is or not.
I'm building again version 11.2.1 of Avalonia and 2.1.0 of FluentAvalonia .
Problem
I have a grid in my application:
You can see that the one of the cells in the message column is being rendered with black text. This shouldn't happen as I don't colour this text explicitly, e.g. it should inherit from the theme as all the other cells in that column are doing.
If I investigate in the DevTools, the property it thinks the text is white. Going further if I override the OnPropertyChanged on an inherited TextBlock and use that in the grid, I can see that as it adds new / updates existing text block's, the foreground colour is being assigned as white.
If I override the CreateTextLayout method I can see that the Foreground is never black when the text layout is created. I have also converted the brushes to immutable to ensure the colour within the foreground is never changed once the text layout is created.
So any ideas on how to figure out what is causing it would be appreciated.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm unsure if this is a bug or not as I've been unable to reproduce with a cut down project. So I'm looking for guidance on were to investigate to figure out if it is or not.
Background
I'm using https://github.com/amwx/FluentAvalonia/tree/master/src/FluentAvalonia for styling and have built my own styles on top of it for various column types. I have both a dark and light themes, this only looks to happen when in the dark theme.
I'm building again version 11.2.1 of Avalonia and 2.1.0 of FluentAvalonia .
Problem
I have a grid in my application:
You can see that the one of the cells in the message column is being rendered with black text. This shouldn't happen as I don't colour this text explicitly, e.g. it should inherit from the theme as all the other cells in that column are doing.
If I investigate in the DevTools, the property it thinks the text is white. Going further if I override the OnPropertyChanged on an inherited TextBlock and use that in the grid, I can see that as it adds new / updates existing text block's, the foreground colour is being assigned as white.
If I override the CreateTextLayout method I can see that the Foreground is never black when the text layout is created. I have also converted the brushes to immutable to ensure the colour within the foreground is never changed once the text layout is created.
So any ideas on how to figure out what is causing it would be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions