Electron.NET icon indicating copy to clipboard operation
Electron.NET copied to clipboard

How to hide standard Electron Menu ?

Open ZedZipDev opened this issue 3 years ago • 1 comments

How to hide the standard Menu : File, Edit, View .... ? I do in Startup:

var window = await Electron.WindowManager.CreateWindowAsync();
window.RemoveMenu(); // <-------------
window.OnClosed += () => {
Electron.App.Quit();
};

```It works but: the app starts, the menu appears(!) for 2-3 secs and then disappeared. Is it possible to hide it at all?

ZedZipDev avatar Jun 04 '22 08:06 ZedZipDev

Resume

You can try passing as a parameter to the window manager the configuration to hide it automatically. I attach an example.

Code

            var browserWindowOptions = new BrowserWindowOptions
            {
                AutoHideMenuBar = true
            };

            var browserWindow = await Electron.WindowManager.CreateWindowAsync(browserWindowOptions);

ggomarighetti avatar Jun 09 '22 06:06 ggomarighetti