Repository navigation
fix: Give late VisualState setters the DataContext - #26260
Merged
ramezgerges merged 1 commit intoNov 11, 2026
Merged
ramezgerges merged 1 commit into
ramezgerges merged 1 commit into
Conversation
A non-FrameworkElement store keeps its inherited DataContext outside
the property table, so a child registering after it arrived (the
second and later Setters of a lazily-built VisualState) never received
it and their {Binding} values resolved to null.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Contributor
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
Contributor
|
The build 244903 found UI Test snapshots differences: Details
|
Contributor
|
This pull request is merged. |
Xiaoy312
approved these changes
Nov 11, 2026
Xiaoy312
left a comment
Contributor
There was a problem hiding this comment.
had to sanity-check {Binding} on VSG setters
i remembered they were frown upon, but indeed winappsdk supports it
3 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GitHub Issue: closes unoplatform/uno.hotdesign#8404
PR Type:
🐞 Bugfix
What changed? 🚀
Since 7.0 a non-FrameworkElement
DependencyObjecthas no DataContext of its own: it keeps the inherited one cached and forwards it to its children. That push happens once, so a child that registers after the DataContext arrived never got it.VisualState setters hit this: they are built lazily, the first
Settergets the DataContext, but the second and later ones resolve{Binding}tonull. In Hot Design this leftColumnDefinition.Widthsetters at*, which made the GridSplitter collapse the panels.PropagateInheritedProperties(childStore)now also hands a newly registered child the cached DataContext of a non-FE store (it only covered properties in the property table). This mirrors WinUI, whereCDependencyObjectCollection::ChildEnterraises an inheritance-context change so a late child's binding resolves its mentor.BindingTests.When_Binding_Setter_Values_In_VisualState(fails on master, passes with the fix).Visual states / VisualState_Setter_Bindingsshowing PASS/FAIL per setter (Opacity, TranslateTransform.X, ColumnDefinition.Width).BindingTests+Given_VisualStateManagerall pass; Hot Design with a locally builtUno.UI.dllno longer collapses the panels.PR Checklist ✅
Screenshots Compare Test Runresults.🤖 Generated with Claude Code