HavenDV / H.NotifyIcon

TrayIcon for WPF/WinUI/Uno/MAUI
MIT License
572 stars 46 forks source link

Add before popup event for context menu #105

Open madnik7 opened 1 year ago

madnik7 commented 1 year ago

What would you like to be added:

I need to update items' status, like disable/enable, through an update pattern before the context menu shows. Currently, I use TrayIconWithContextMenu and MoveMove event, which is not the best practice. Would you add something like on_before_popup event? I think we used WM_INITMENUPOPUP inwin32.

Why is this needed:

For which Platform:

Anything else we need to know?

HavenDV commented 1 year ago

My time is very limited for now, and I just implemented handling of this event. You can access this via TrayIconWithContextMenu.MessageWindow.InitMenuPopup

madnik7 commented 1 year ago

Thank you, but I don't know why it doesn't do anything. I expected it to raise before the menu appeared.

HavenDV commented 1 year ago

It's a shame it didn't work. Unfortunately, I now have big problems with free time and don’t have access to a Windows machine, so I’m leaving this open