H.NotifyIcon icon indicating copy to clipboard operation
H.NotifyIcon copied to clipboard

Add before popup event for context menu

Open madnik7 opened this issue 9 months ago • 3 comments

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:

  • [x] All
  • [ ] WPF
  • [ ] WinUI
  • [ ] Uno
  • [ ] Core

Anything else we need to know?

madnik7 avatar Sep 06 '23 18:09 madnik7

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

HavenDV avatar Sep 07 '23 02:09 HavenDV

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

madnik7 avatar Sep 07 '23 18:09 madnik7

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

HavenDV avatar Sep 13 '23 20:09 HavenDV