microsoft / microsoft-ui-xaml

Windows UI Library: the latest Windows 10 native controls and Fluent styles for your applications
MIT License
6.34k stars 677 forks source link

Resizing window with full client rect Xaml Island draws window background first #759

Open MarkIngramUK opened 5 years ago

MarkIngramUK commented 5 years ago

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:

  1. Set the Xaml Island HWND size to be the full client rect of main window as a result of WM_SIZE (or WM_SIZING)
  2. Resize the main window with the mouse
  3. Example available at https://github.com/MarkIngramUK/XamlIslands

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. Resize

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.

marb2000 commented 5 years ago

This is a known limitation of XAML Islands v1 that should be addressed in WinUI 3 Islands.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 5 days.

rpjohnst commented 1 year ago

Not stale.