Skip to content

XAML Islands - Empty DesktopWindowXamlSource window visible on task bar #6490

Closed

Description

Describe the bug

When running a XAML Islands Win32 Desktop app using Win UI 2.6.1 Preview, a blank window with title DesktopWindowXamlSource appears on the task bar.

When the user opens a valid XAML Islands window, the content for DesktopWindowXamlSource is set and it is attached to an HWND. At this point the 'blank' DesktopWindowXamlSource window disappears. As soon as the user closes the XAML Islands window, however, the blank DesktopWindowXamlSource window reappears.

Also notable: closing this blank window will also cause the entire process to exit.

Our app usually does not show any window until the user explicitly opens one through a systray icon, so most of the time the content for DesktopWindowXamlSource is expected to be empty and its HWND should be invisible to the user.

We have found that this issue only repros in the Windows 10 Insider build 19044.1348.

I have also confirmed that this issue persists in Win UI 2.8.0 Preview.

Steps to reproduce the bug

I was able to repro the issue using the xaml-islands Playground found in this repo: https://github.com/asklar/xaml-islands/tree/main/Playground

  1. Clone the xaml-islands repo above.
  2. Comment out lines 172-251 in Playground\WindowsProject1.cpp to ensure that the DesktopWindowXamlSource hwnd content does not get set on startup.
  3. Build the Playground solution and launch the executable in Windows 10 build 19044 (I can help validate changes on this build of windows if needed)
  4. Observe that an empty DesktopWindowXamlSource window appears in the task bar.

Expected behavior

When using XAML Islands with WinUI 2X preview, the blank DesktopWindowXamlSource HWND should not be visible at all to the user when it is not actively hosting any content.

Screenshots

image
image

NuGet package versions

Microsoft.UI.Xaml.2.6.1-prerelease.210709001
Microsoft.UI.Xaml.2.7.0-prerelease.210913003
Microsoft.UI.Xaml.2.8.0-prerelease.210927001

Windows app type

  • UWP
  • Win32

Device form factor

Desktop

Windows version

Insider Build (19044)

Additional context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions