Skip to content

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

@MarkIngramUK

Description

@MarkIngramUK

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-IslandsXaml Islands featurebugSomething isn't workingteam-ReachIssue for the Reach team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions