-
-
Notifications
You must be signed in to change notification settings - Fork 740
Closed
Description
ElectronNET version: 7.30.2
.NET Core 3.0.1 (produces the same issue with v3.1.0)
(project that reproduces the behavior is attached)
Create an ElectronNET based Blazor project with the standard steps
mkdir BlazorOnReadyIssuecd BlazorOnReadyIssuedotnet new blazorserver --no-httpsdotnet add package ElectronNET.APIdotnet new tool-manifestdotnet tool install ElectronNET.CLIdotnet electronize init- Set up
Program.cs:
// ...
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder
.UseStartup<Startup>()
.UseElectron(args); // --- Added this
});
// ...- Set up
Startup.cs:
// --- At the end of Configure
// ...
Task.Run(async () =>
{
var browserWindow = await Electron.WindowManager.CreateWindowAsync(
new BrowserWindowOptions
{
Title = "OnReadyToShow",
Width = 1152,
Height = 864,
Show = false // --- When set to true, project works properly
});
browserWindow.OnReadyToShow += () => browserWindow.Show();
});- Run the project (either with Ctrl+F5 or
electronize start)
Expected behavior: The Electron Shell window is displayed with the Blazor App.
Issue: The Electron Shell window does not display.
Whenever I change the Show property of BrowserWindopOptions to true, the project works fine, but, of course, for a few seconds an empty page is displayed according to the normal behavior.

