mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-03 21:25:13 +00:00
Transparent window has white background #855
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Yuvix25 on GitHub (Mar 29, 2023).
Originally assigned to: @GregorBiswanger on GitHub.
I have created a window like so:
Expecting the background the be transparent, but instead it is white. (The page itself only contains one
<p>element, nothing more)I tried adding some delay before calling
CreateWindowAsync, as I saw it solved the issue for some people using normal Electron, but that did not help either.Any idea how can I fix this?
@IgorVolod commented on GitHub (Mar 29, 2023):
The white background on startup was the first issue I had to deal with since my app loads in the "dark" theme by default. Try this option. My white canvas has disappeared ... completely ...
@GregorBiswanger commented on GitHub (Mar 29, 2023):
I built a Blazor server app and it works without any problems. See the screenshot.
For this I changed the
site.cssin thewwwroot/cssdirectory:This is my Electron.NET startup code:
did you make it?
@Yuvix25 commented on GitHub (Mar 29, 2023):
@GregorBiswanger Yes! That's it.
Your solution works perfectly 👌🏻
@Yuvix25 commented on GitHub (Mar 29, 2023):
While we're at it, do you know if it is possible to allow mouse clicks/keystrokes to go through the transparent bits and on to a background app?
So that it is still possible to interact with non-transparent elements, but you can also interact with whatever is running behind the app?
Alternatively, if that's not possible, is it possible to make my window completely ignore any sort of interaction, and let the background app have everything?
@FlorianRappl commented on GitHub (Mar 29, 2023):
That is not (directly) possible (see https://github.com/electron/electron/issues/1335). You can, however, use one of the workarounds in the linked issue to fake this behavior.
@Yuvix25 commented on GitHub (Mar 29, 2023):
Ok, there are a few good solution there indeed, thanks!