mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-03 21:25:13 +00:00
Menu Bar #136
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 @ramin0011 on GitHub (Apr 1, 2018).
Originally assigned to: @GregorBiswanger on GitHub.
When i start the app it loads defined menus in my code but after a moment ( usually a few seconds ) it will change to the defualt electron.net menu

i tryed to set the menu everywhere in the code (in events: OnReadyToShow, OnShow , also before and after the events ) but it didnt help me
Electron.Menu.SetApplicationMenu(menuItems); window.OnReadyToShow += () => { window.Show(); window.SetTitle("myapp"); Electron.Menu.SetApplicationMenu(menuItems); }; window.SetTitle("myapp"); window.OnShow += () => { window.SetTitle("myapp"); Electron.Menu.SetApplicationMenu(menuItems); }; Electron.Menu.SetApplicationMenu(menuItems);@GregorBiswanger commented on GitHub (Apr 14, 2018):
Hi @ramin0011
set your own menu outside of the events please.
The best way is after you create a window.
I think you get a exception from your defined menu call logic and electron switch to his own menu.
See in the console from the developer tools (Ctrl+I)
I hope my answer helps you.
@ramin0011 commented on GitHub (Apr 22, 2018):
i do not get any exception from developer console ...
@srameh commented on GitHub (Jul 31, 2018):
@ramin0011 please try the solution in this page. It worked like a charm for me.
https://elanderson.net/2018/05/electron-net-custom-application-menus/