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
ContentPresenter implicit Content binding only applies on Loaded, so the first frame renders empty (WinUI applies it during measure) #25920
A ContentPresenter inside a ContentControl template that has no explicit Content/ContentTemplate bindings (e.g. a bare <ContentPresenter/>) only hooks up its implicit bindings to the templated parent in OnApplyTemplate, which Uno runs on Loaded. The first layout pass therefore measures it as empty. For example, a ListViewItem (bare ListViewItemPresenter) renders its first frame with empty 40px items and realizes more containers than WinUI.
Expected behavior 🎯
WinUI sets these bindings in CContentPresenter::ApplyTemplate, which runs from measure, so the first layout already presents the content.
How to reproduce it (as minimally and precisely as possible) 🔬
Create a ContentControl with Template = <ControlTemplate TargetType="ContentControl"><ContentPresenter/></ControlTemplate> and Content = new Border { Width = 40, Height = 50 }.
Call Measure(new Size(200, 200)) before it is loaded.
Is this by any chance the bug that causes SettingsCard-s (from the Toolkit) to visible resize when displayed, because the icon on the left first renders as empty, then it loads, and takes the right size and shifts the text right? I can see this for a split second when loading pages 🤔
Activity
Sergio0694 commentedon Nov 4, 2026
Is this by any chance the bug that causes
SettingsCard-s (from the Toolkit) to visible resize when displayed, because the icon on the left first renders as empty, then it loads, and takes the right size and shifts the text right? I can see this for a split second when loading pages 🤔