Hi. I am building on top of the Workflow Designer sample and am trying to add context menus to the activities on the design surface. I have been able to use ISelectionService to get close to the intended effect but did not find a way to determine when a right-click raises the event and when a left-click raises the event. I think that maybe ISelectionService is not the correct approach, but am having trouble figuring out where and how to create and bubble up the event.
Thanks in advance!

Context Menu - Workflow Designer Sample
hunb
Look at the WorkflowDesignerMessageFilter class in the docs. The docs will point you to a sample in the SDK.
This class has a method, OnShowContextMenu, that will signal you to show your context menu. You can then either override some of the other methods in the class to keep track of which activity was clicked on, or you can use the ISelection service to see which activity is selected.
You'll create a class derived from the WorkflowDesignerMessageFilter and then add it to the workflowview.
Matt