mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-03 21:25:13 +00:00
SetMenu error, menuItems are undefined.... #188
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 @nvrnight on GitHub (Jun 25, 2018).
Originally assigned to: @GregorBiswanger on GitHub.
Getting an error trying to set the menu items. menuItems is undefined in browserWindows.js when executing.
window.SetMenu(new[] {
new MenuItem()
{
Role = MenuRole.reload
}
});
@GregorBiswanger commented on GitHub (Sep 25, 2018):
Hello @nvrnight
Use Electron.Menu.SetApplicationMenu.
See on our example:
https://github.com/ElectronNET/electron.net-api-demos/blob/master/ElectronNET-API-Demos/Controllers/MenusController.cs
Best,
Gregor