Proposal: Window Transparency support
See original GitHub issueIt’d be nice to see support for window transparency which will allow us to draw our own desktop overlay. Currently we are able to do just that in WPF by declaring the following properties on a Window <Window WindowStyle="None" AllowsTransparency="True" Background="Transparent" />
however if we were to implement WindowsXAMLHost in a WPF application to host modern controls, it is currently not supported with the transparent regions showing through as black. We should just truly embrace support for Window transparency by adding support for it in WinUI for the desktop.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Window transparency in Windows 11 - Microsoft Q&A
Hi, I had a working example on windows 8 of a transparent window, I don't remember exactly if it used UpdateLayeredWindow or AlphaBlend, ......
Read more >Is window opacity for Mono forms supported?
Mono's Winform implementation supports transparency on its windows as long as the underlying windowing system has support for it. For Unix/X11 ...
Read more >Setting the Transparency for Floating Windows
To specify the transparency value, select File > Preferences > Global, and select the Display tab. In the Tool Windows section, specify the...
Read more >Transparent window possible with integrated graphics only
I wanted to get transparency working because it's a major part of my project. I made the clear color alpha value 0.0, ...
Read more >How to turn off transparency in Windows 10
Open the Ease of Access settings by pressing the Windows logo key + U. Alternatively, select the Start Menu, then Settings, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
While this might have been true in olden times when transparency was just overpainting, these days composition is out of process by a separate compositor, so I don’t think capturing a windows content will reveal underlying windows if the compositor doesn’t want to go out of its way to implement that. Also the legacy GDI transparency is still supported, just expensive and awkward to use with modern DirectX/Composition rendering because you have to loop GPU resources back to CPU through GDI every frame just to have desktop composition reupload to GPU.
[edit] on a side note regarding security, theres the option of marking a window to be excluded from composition readback via SetWindowDisplayAffinity so the compositor is already able to recognize content that should not be copied.
HostBackdrop is one of those features that is disabled in WinUI 3.0 right now, as the team tries to find a way to implement it once decoupled from the OS.