mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-03 21:25:13 +00:00
Update Context Menu Item for tray app on-the-fly. #337
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 @Tum4ik on GitHub (Jun 1, 2019).
Originally assigned to: @GregorBiswanger on GitHub.
In my case it is related to the application localization, but it could be also useful for some other scenarios (like change item visibility or enable/disable item).
Currently I have this Desktoper class to bring the app to the desktop.
The
Desktopizemethod is called from StartupConfiguremethod.The public
UpdateCulturemethod is called from the settings controller when the culture is changed.So I do this trick: destroy tray and then create it again with updated menu items. I guess it will be very useful to have such functionality, for example
Thanks!
@GregorBiswanger commented on GitHub (May 11, 2020):
It is now possible to simply change the existing menu. To do this, the existing menu must be set again. Available in Electron.NET 8.31.2.
@GregorBiswanger commented on GitHub (May 11, 2020):
For the tray menu: