Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SharedSizeGroup loop #2270

wants to merge 1 commit into
base: release/3.1


Copy link

SamBent commented Dec 2, 2019

Ask Mode Template:


After every layout pass, a SharedSizeGroup re-evaluates its shared size and updates the state of its constituent ColumnDefinitions.  The goal is to mark the "long-pole" definitions (the largest ones in the group), and to identify Grids that need to be remeasured.  The logic for this is flawed in several ways;  both goals can fail in either direction (false positive or false negative).   These flaws usually result in redundant layout work - the Grids get measured twice, with the mistakes in the second pass cancelling those in in the first - but correct layout results.  But in some cases they lead to an infinite cycle of re-layout;  the app hangs.   In the customer's scenario this happens when 
a. the Grids are within the scope of a ScrollViewer with VerticalScrollbarVisibility="Auto" 
b. there are more than 157 Grids (the threshold for coalescing pending measure tasks into one task at the root) 
c. the minimum width of a non-long-pole Grid increases, away from the shared column

Customer Impact



No. (Port of servicing fix for .NET 4.5.2 - 4.8)



Fixes #2222
Hang during layout when using SharedSizeGroup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.