dotnet / dotnet/dotnet-api-docs

HWNDs do not render if WPF Window's AllowsTransparency is true

Open
#3,517 0 comments 0 reactions 0 assignees View on GitHub
.net/prod area-WPF Pri2 untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

Wasted days on this, but if your main WPF Window sets AllowsTransparency, the HWND you create and use under this class will never render anything. Deserves a warning either here, or in the linked "WPF and Win32 Interop" article.

---
#### Document Details

⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*

* ID: 98ca0b90-9c25-12ff-4fa3-49a35ed32d61
* Version Independent ID: 678f7e0d-ce5a-5400-e7db-ef6d1de8592e
* Content: [HwndHost Class (System.Windows.Interop)](https://docs.microsoft.com/en-us/dotnet/api/system.windows.interop.hwndhost?view=netframework-4.7.1)
* Content Source: [xml/System.Windows.Interop/HwndHost.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System.Windows.Interop/HwndHost.xml)
* Product: **.net**
* GitHub Login: @dotnet-bot
* Microsoft Alias: **dotnetcontent**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.