I searched the forums, but I only found it for ElectronJS. I need to change the size of the window and leave it with a fixed size using Electron.NET
Hi @GuiFerrari,
do you can set the window size with two ways:
1. On create a new window with BrowserWindowOptions
var browserWindowOptions = new BrowserWindowOptions
{
Width = 800,
Height = 600
};
await Electron.WindowManager.CreateWindowAsync(browserWindowOptions);
2. On runtime with the instance of the BrowserWindow
var browserWindow = Electron.WindowManager.BrowserWindows.First();
browserWindow.SetSize(800, 600);
I hope my answer helps you.
Most helpful comment
Hi @GuiFerrari,
do you can set the window size with two ways:
1. On create a new window with BrowserWindowOptions
var browserWindowOptions = new BrowserWindowOptions { Width = 800, Height = 600 }; await Electron.WindowManager.CreateWindowAsync(browserWindowOptions);2. On runtime with the instance of the BrowserWindow
var browserWindow = Electron.WindowManager.BrowserWindows.First(); browserWindow.SetSize(800, 600);I hope my answer helps you.