I have a context menu which is shared between a TreeView and ListView
control (both controls show the same information, similar to how
Windows Explorer works, so it makes sense to use the same menu on both
views).
What i'm struggling to do when the menuItem_Click event is fired, is
to detect the TreeNode or ListViewItem that was originally right
clicked when the context menu was opened.
I can't just look at the selected item, because I don't even know in
which control the context menu was initiated. Can anyone offer any
clues?
I could easily store a copy of the TreeNode or ListViewItem in the
menu tag, but the _Click event doesn't seem to provide a means of
accessing the menu via the sender variable.
Regards,
Bry