Open svetovid opened 2 weeks ago
I have the same question. I am migrating my WPF Blazor Hybrid application to Photino, but in Blazor Hybrid running on Windows it is possible to make the screen transparent using the environment variable:
Environment.SetEnvironmentVariable("WEBVIEW2_DEFAULT_BACKGROUND_COLOR", "0");
However, this did not have the same effect in Photino, and I am looking for an alternative.
You may want to try setting the BrowserControlInitParameters using --cast-app-background-color. This type of setting is browser control dependent, so it will be different on each OS. Here are some links https://peter.sh/experiments/chromium-command-line-switches/
https://www.chromium.org/developers/how-tos/run-chromium-with-flags/
I tried using the 2 commands below, but I was unsuccessful
app.MainWindow.SetBrowserControlInitParameters("--cast-app-background-color=00000000");
app.MainWindow.SetBrowserControlInitParameters("--default-background-color=00000000");
I also used other commands to test, but apparently none of them affected WebView. I'm not sure if I used the commands correctly.
During application startup before
index.html
loaded, the window is just white. It would be nice to change its color, or even set a splashscreen.On my Windows 10 computer, I have Dark theme enabled
But, while I'm waiting for the web content (presumably, waiting for WebView2 to be loaded), the window is white
When index.html downloaded, the Dark theme is applied
Please, advise how to make the window black or set a splashscreen, because I didn't find anything useful in the library API