Describe the bug
When resizing the main window, the result of WM_ERASEBKGND
is drawn before the Xaml Island.
Steps to reproduce the bug
Steps to reproduce the behavior:
WM_SIZE
(or WM_SIZING
)Expected behavior
To not see the result of WM_ERASEBKGND
(i.e. WndClassExW.hbrBackground) before the Xaml Island renders.
Screenshots
The red is from wc.hbrBackground = CreateSolidBrush(RGB(255, 0, 0));
, the blue is from the Xaml Island root content.
Version Info
1903
NuGet package version:
N/A
| Windows 10 version | Saw the problem? |
| :--------------------------------- | :-------------------- |
| Insider Build (xxxxx) | |
| May 2019 Update (18362) | Yes |
| October 2018 Update (17763) | Yes |
| April 2018 Update (17134) | |
| Fall Creators Update (16299) | |
| Creators Update (15063) | |
| Anniversary Update (14393) | |
| Device form factor | Saw the problem? |
| :-------------------- | :------------------- |
| Desktop | Yes |
| Mobile | |
| Xbox | |
| Surface Hub | |
| IoT | |
Additional context
You can largely hide the issue by specifying WS_EX_NOREDIRECTIONBITMAP
on the main window, but it would be good if the Xaml Island rendered on resize, as it would make the resize seem smoother.
This is a known limitation of XAML Islands v1 that should be addressed in WinUI 3 Islands.
Most helpful comment
This is a known limitation of XAML Islands v1 that should be addressed in WinUI 3 Islands.