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
{{ message }}
Repository navigation
ProgressRing keeps its old colour when the brush assigned to Foreground changes colour #24555
A ProgressRing hands its colours to its animated visual only when the Foreground or Backgrounddependency property itself changes, plus once when its template is applied. If the property keeps pointing at the same SolidColorBrush and that brush's Color changes, the ring goes on painting the old colour indefinitely.
This shows up in themed apps: a brush resource whose Color is re-evaluated at runtime is mutated in place rather than replaced, so every other control repaints and the ring does not.
The animation is not involved — a determinate ring that has never animated behaves the same way.
Expected behavior
The ring repaints in the brush's new colour, like every other control drawn with the same brush.
How to reproduce
No theming needed:
varbrush=newSolidColorBrush(Colors.Red);varring=newProgressRing{Foreground=brush,IsActive=true,IsIndeterminate=false,Value=70,Width=80,Height=80,};// put it in the tree and let it render -> the ring paints redbrush.Color=Colors.Lime;// -> the ring still paints red
Measured by rasterising the ring with RenderTargetBitmap and reading the pixels back:
step
rendered
baseline, brush is red
red
brush.Color = Colors.Lime
still red
IsIndeterminate toggled true then false
lime
Foreground set to null and back to the same brush
lime
the ring replaced by a new instance
lime
Workaround
Force the property to change. Toggling IsIndeterminate and putting it straight back makes the ring build its animated visual again and read the brush as it then is.
Environment
Uno Platform 6.8.0-dev.112, net9.0-desktop (Skia), .NET 9. Not checked on other targets.
Notes
ProgressRing registers property-changed callbacks on Foreground and Background and pushes the colour into the animated visual from there, plus once in OnApplyTemplate. Nothing observes the brush's own changes, so a brush mutated in place never reaches the ring.
Activity
test(progressring): Cover brush colour mutation
fix(progressring): Follow the brush, not just the property
Jen-Uno commentedon Sep 30, 2026
QA: closing out without a manual pass. The fix in #24613 ships with automated tests (
Given_ProgressRing.cs) that exercise the change.If you still see this behaviour on a build that includes that PR, please reopen or comment here.
test(progressring): Cover brush colour mutation
fix(progressring): Follow the brush, not just the property