How to add menu to an app? #315

Open
opened 2026-01-29 16:36:17 +00:00 by claunia · 0 comments
Owner

Originally created by @win32nipuh on GitHub (May 15, 2019).

Originally assigned to: @GregorBiswanger on GitHub.

How to add yet another menu to the app?
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, sipmle :
var menu = new MenuItem[]
{
new MenuItem
{
Label = "Tools",
Click = async () =>
{
await Electron.Dialog.ShowMessageBoxAsync("Go-go Pockemon!");
}
}
};
Electron.Menu.SetApplicationMenu(menu);

it replaces entire application menu.

Originally created by @win32nipuh on GitHub (May 15, 2019). Originally assigned to: @GregorBiswanger on GitHub. How to add yet another menu to the app? 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, sipmle : [ var menu = new MenuItem[] { new MenuItem { Label = "Tools", Click = async () => { await Electron.Dialog.ShowMessageBoxAsync("Go-go Pockemon!"); } } }; Electron.Menu.SetApplicationMenu(menu); ](url) it replaces entire application menu.
claunia added the question label 2026-01-29 16:36:17 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#315