0

For example: the default menu is File, Edit, View, Window, Help

I’d like to add my menu item + subitems File, Edit, View, Tools (Options, Customize), Window, Help

How to do it? When I do as in example:

var menu = new MenuItem[]
{
new MenuItem
{
Label = “Tools”,
Click = async () =>
{
await Electron.Dialog.ShowMessageBoxAsync(“Hello, Tools!”);
}
}
};
Electron.Menu.SetApplicationMenu(menu);

It replaces existing menu with my menu Tools, but I need to add it to the existing.

ZedZip
  • 5,794
  • 15
  • 66
  • 119

1 Answers1

1

The native Electron has a default development menu. If you add your own menu, this will be used. You can not use the development menu and your own menu together..

Gregor Biswanger
  • 529
  • 3
  • 16
  • 1
    Thanks. Ok, even not something like this: get existing menu, insert my item(s), assign back to the app menu? – ZedZip May 16 '19 at 10:57