[PR #528] Issue/527 #1206

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

Original Pull Request: https://github.com/ElectronNET/Electron.NET/pull/528

State: closed
Merged: Yes


This PR contains a couple different things separated out int different commits.

  • Extension Method for adding the Electron static class members to the standard MS DI Containers, this is a QOL issue only.
  • Documentation fix for #500 as it was right there in my face
  • SetMenu completed for the Dock (MacOS)
  • On and Once implementations for the App and Tray to cover the plethora of events that are not mapped explicitly in those two modules.
  • Adding the EnableRemoteModule property to the WebPreferences object. As of Electron 10, this property defaulted to false and without it exposed you can't use the remote module within a window.

Example for the Dock Menu

Electron.Dock.SetMenu(new [] {
   new MenuItem {
      Label = "Dock Menu Item",
      Click = () => {
         // do something
      }
   },
});

Example for consuming the activate event (MacOs only)

Electron.App.On("activate", obj => {
   var hasWindows = (bool)obj;
   // do something
});

fix #500
fix #527

**Original Pull Request:** https://github.com/ElectronNET/Electron.NET/pull/528 **State:** closed **Merged:** Yes --- This PR contains a couple different things separated out int different commits. * Extension Method for adding the Electron static class members to the standard MS DI Containers, this is a QOL issue only. * Documentation fix for #500 as it was right there in my face * SetMenu completed for the Dock (MacOS) * On and Once implementations for the App and Tray to cover the plethora of events that are not mapped explicitly in those two modules. * Adding the `EnableRemoteModule` property to the WebPreferences object. As of Electron 10, this property defaulted to false and without it exposed you can't use the remote module within a window. Example for the Dock Menu ```csharp Electron.Dock.SetMenu(new [] { new MenuItem { Label = "Dock Menu Item", Click = () => { // do something } }, }); ``` Example for consuming the `activate` event (MacOs only) ```csharp Electron.App.On("activate", obj => { var hasWindows = (bool)obj; // do something }); ``` fix #500 fix #527
claunia added the pull-request label 2026-01-29 16:58:24 +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#1206