I noticed that there is an event called WindowContextMenuEvent in the help documentation, but not sure how to use it.
Can someone show an example of this in code?
Thanks,
Scott
I noticed that there is an event called WindowContextMenuEvent in the help documentation, but not sure how to use it.
Can someone show an example of this in code?
Thanks,
Scott
Hi Scott,
The main Features demo handles the WindowContextMenu event and displays the context menu's source location in the Output tool window. From within that event you could modify the e.ContextMenu however appropriate to suit your needs (add/remove items, etc.).
If I wanted to execute code after one of the following menu items are selected:
New Horizontal Tab Group, New Vertical Tab Group, Move to Next Tab Group, or Move to Previous Tab Group.
I would need to override the command from the WindowContextMenu event to execute the method (i.e. MoveToNewHorizontalContainer(),...) and then execute my code.
Is this correct?
It would be nice to have an event that gets called before and after a context menu command so that a developer could run custom code.
Thanks,
Scott
[Modified 12 years ago]
Hi Scott,
Well for that sort of thing you could just remove our Command that is set on the MenuItem and add your own event handler instead. Then in your handler, execute the command that would have been executed on the CommandTarget. You could put your custom code before or after the command call in that case.
Please log in to a validated account to post comments.