Resource update issues in rc1
See original GitHub issueDescribe the bug In my FluentAvalonia demo app, a custom accent color can be set for the app, and not everything is updating in response to the color change:
In the screenshot, the list box and custom color button show the green color selected, and the preview grid correctly shows all 7 accent colors updated to follow the green. But the checkbox and the settings icon are still showing under the previous accent color. Triggering any sort of rendering (like moving the pointer over the control) will get them to update to the correct colors.
The preview area in the screenshot is bound directly to the color resources, whereas controls typically are binding to a brush or StaticResource alias of a brush, which has the color DynamicResource set to the SystemAccentColor variant. I’ve also had the checkbox fill background update correctly, but the border around it (which is the same color as the fill) remains the old color.
For context, FATheme sets a custom accent color by injecting a ResourceDictionary with all 7 variants into the MergedDictionaries of itself (FATheme is a Styles object): -> FATheme ---->Resources -------->Non-themed resources -------->MergedDictionaries ---------->Fluentv2 colors & brushes ---------->AccentColor dictionary
I don’t have a repro at the moment. The version of my demo app in master in my repo has this code turned off right now, and the new version of the demo app (that the screenshot comes from) isn’t available yet. If I get a chance I’ll try to see if I can get a simple repro here.
This is a new issue in rc1, preview8 worked fine.
Also, just for testing, I added a border with its background set to the AccentColor brush and it updates completely fine.
<Border Background="{DynamicResource AccentFillColorDefaultBrush}"
Width="100" Height="100" />
The Checkbox and settings icon in the screenshot have their fills set in ControlTemplate and Style, respectively, so it might be related to that
Issue Analytics
- State:
- Created 4 months ago
- Reactions:1
- Comments:14 (7 by maintainers)
Top GitHub Comments
@danipen the message was not for you but for @cyraid . Somehow I think a full crash is not related to what we see here? Also Icons should not disappear in this issue?!
@amwx this issue should be resolved in nightly. Let me know if it’s still reproducible.