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
VisualState setter equal to the inherited value is not stored, so later inherited changes win #24600
A VisualState Setter (or animation value) whose value is the same object as the property's current effective value (for example an inherited brush) is not stored at animation precedence. BindingPath.Value skips the write when the new value equals the effective value. A later lower-precedence change, such as an inherited Foreground or a RequestedTheme switch, then wins over what the setter should hold.
Concrete case: an editable ComboBox in a Dark-themed app goes Focused → Normal → Focused. On re-entering Focused, the Focused Foreground setter's brush is the same instance as the inherited Dark brush, so it isn't stored. The next setter in the state, RequestedTheme=Light, then freezes the Light default brush, and the text renders dark on dark (#E4000000).
On WebAssembly with accessibility enabled, focusing the TextBox bounces focus (Focused → Normal → Focused within one call), so this happens on every focus. That makes Given_ElementTheme.When_Editable_ComboBox_Focused_In_Dark_Theme_Text_Is_Light and …Without_Theme_Walk_Text_Is_Light fail whenever an earlier test in the shard has enabled accessibility (12 of the last 30 master builds; they pass on the retry).
Expected behavior 🎯
As in WinUI (VisualStateSetterHelper → SetAnimatedValue, which always stores the value and clears the "local value is newer" flag), setter and animation values always take their precedence slot, even when they equal the current effective value.
How to reproduce it (as minimally and precisely as possible) 🔬
A VisualState with a Setter Foreground= pointing to the same brush instance the element currently inherits. Enter the state, then change the inherited brush (e.g. the parent's Foreground). The element follows the parent instead of keeping the setter's value.
Workaround 🛠️
None.
Renderer 🎨
Skia
Native
Affected platforms 📱💻🖥️
WebAssembly, Android, iOS, Windows (Skia Desktop), macOS, Linux
QA: closing out without a manual pass. The fix in #24601 ships with automated tests (Given_ElementTheme.cs, Given_VisualStateManager.cs, Given_Storyboard.cs) that exercise the change.
If you still see this behaviour on a build that includes that PR, please reopen or comment here.
Activity
test(binding): Tag the new regression tests with #24600
Jen-Uno commentedon Sep 30, 2026
QA: closing out without a manual pass. The fix in #24601 ships with automated tests (
Given_ElementTheme.cs,Given_VisualStateManager.cs,Given_Storyboard.cs) that exercise the change.If you still see this behaviour on a build that includes that PR, please reopen or comment here.