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
TextBlock re-shapes its text when only the measure constraint changes #25410
TextBlock.MeasureOverride should keep its current text layout when the TextBlock is measured again only because its parent offers a different constraint, and that layout can't depend on the constraint. This is the case for a single unwrapped, untrimmed line. Arrange already does this check (UnicodeText.IsLayoutValidFor); measure always re-parses and re-shapes the text.
Why is this needed? 🤔
Multi-pass layouts measure TextBlocks several times under different constraints: Grid star sizing, panels that re-measure, constraint flips between states. Each of those measures shapes the text again.
In the ListViewItemPresenter chrome adopted by #25389, the multi-select check box's border thickness changes on every selection. That gives its check glyph a different available size each time (113x17 vs 116x20), so the glyph is re-shaped in measure and again in its centered arrange at every toggle.
For which platforms 📱💻🖥️
Skia (all heads)
Anything else we need to know? 💬
Found while profiling GridView multi-select for #25389.
Activity