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
Smooth launch: synchronize showing a Xaml Window with its first rendered frame.
Summary
A WinUI 3 Window becomes visible before Xaml has rendered anything into it, so the frame animates in empty and the content pops in after. Xaml should hold the window back until the first frame is ready, the way UWP Xaml used to.
Rationale
Every WinUI 3 app flickers on launch today, and it is the very first thing users see.
UWP Xaml did not have this problem, so this is a regression for anyone moving to WinUI 3. Some of the plumbing is still in the tree (JupiterWindowActivationState, CJupiterWindow::NotifyFirstFramePending and NotifyFirstFrameDrawn), but NotifyFirstFrameDrawn early returns when there is no CoreWindow, so only UWP ever got the deferred activation.
Title
Smooth launch: synchronize showing a Xaml
Windowwith its first rendered frame.Summary
A WinUI 3
Windowbecomes visible before Xaml has rendered anything into it, so the frame animates in empty and the content pops in after. Xaml should hold the window back until the first frame is ready, the way UWP Xaml used to.Rationale
JupiterWindowActivationState,CJupiterWindow::NotifyFirstFramePendingandNotifyFirstFrameDrawn), butNotifyFirstFrameDrawnearly returns when there is noCoreWindow, so only UWP ever got the deferred activation.XamlChangeId.SkipWindowRedirectionSurfaceto skip the window's GDI redirection surface #11587). Skipping the redirection surface also removes the themedWM_ERASEBKGNDfill that was partly covering the gap, so the flicker becomes more obvious. The flicker is there either way, that change just stops hiding it.Scope
Windowonly becomes visible after its first frame has been renderedImportant Notes
Videos are from #11587 (comment).
With the GDI redirection surface (today's default), the themed
WM_ERASEBKGNDfill partly covers the gap:Without it, the empty window frame animating in is plainly visible:
Related: #11523, #11587, #7892.
Open Questions
XamlChangeIdopt-in?Window.Activateenough, or does this also need to cover theMicrosoft.UI.WindowingAppWindow.Showpaths?