App.OpenFile never called
Cedric-LE opened this issue · comments
Using electron net 23.6.1
.NET core 7.0.203 and node v16.20.2
- Target: Windows 10
I want to perform an action when launching the application by double-clicking on a file from the explorer.
I've added a callback to the OpenFile event on the App to obtain the path to the file passed as an exe argument. The callback is never called.
I did something like that.
ElectronNET.API.Electron.App.OpenFile += Console.WriteLine;
// await window
var window = await ElectronNET.API.Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions
{
Title = "My App",
AutoHideMenuBar = true,
Width = 1200,
Height = 800,
});