Browse Source
* test(grid): reproduce shared size group shrink failure Shared auto columns expand when grouped content becomes visible but keep the expanded width after that content is hidden. Cover the full zero, expanded, and shrunk layout sequence so the stale shared minimum cannot regress unnoticed. * fix(grid): allow shared size groups to shrink Shared auto definitions reused the previous group minimum while recomputing the next group minimum, so an expanded width became self-sustaining after content shrank. Aggregate each definition's intrinsic measured minimum instead, preserving the shared-size invariant and matching the canonical WPF algorithm. * test(grid): reproduce shared size group stuck on cyclic measure path A grid mixing an auto-column/star-row cell with a star-column/auto-row cell measures through Grid's cyclic dependency path, which saves and restores definition min sizes around the repeated measure. The saved value is the effective min size, so the group minimum is folded into the definition's own contribution and the group can never shrink below it. * fix(grid): restore raw min sizes on the cyclic measure path Grid.CacheMinSizes read DefinitionBase.MinSize, which already includes the shared group's minimum, but ApplyCachedMinSizes writes it back through SetMinSize, which assigns the definition's own _minSize. A short-pole definition therefore adopted the group minimum as its own intrinsic minimum, which reclassified it as a long pole on the next validation. Long poles with a valid measure are never remeasured, so the fabricated minimum became unreachable and pinned the group open. Add DefinitionBase.RawMinSize, the read counterpart of SetMinSize, and cache that instead so the save/restore pair round-trips the definition's own contribution. Matches the WPF fix in dotnet/wpf#2270.pull/21857/head
committed by
GitHub
3 changed files with 111 additions and 3 deletions
Loading…
Reference in new issue