Select Multiple Nodes, Right Click

I am attempting to implement a solution where I select multiple nodes in a graph and then right click on the GoView "background" in order to perform an operation on all nodes within the GoView1.Selection collection. In this particular instance, I would like to iterate over all of the selected nodes and change their color. Here's the problem I am having. When I select a group of nodes, I can see that the GoView.Selection contains all of the selected nodes (from a breakpoint within the OnSelectionFinished event as well as the visual selection indicator on the graph). However, when I subsequently right click on the GoView background, a breakpoint at the same event (OnSelectionFinished) shows that the GoView.Selection is empty? I looked in the reference manual and found that there is a property called "ContextClickSingleSelection". GoView1.ContextClickSingleSelection = false; I tried setting this to false in hopes that the right click (ContextClick) would not change the selection, but could not get it to work. Whenever I right click on the GoView background, the selection is cleared. I know I am missing something or doing something wrong, but can't figure out what it is... Thanks for any help.

FYI, I moved this topic from the JGo forum to the GoDiagram forum.
ContextClickSingleSelection just affects the behavior when there is a context click on a selected object. The default behavior is to make the context clicked object the only selected object. The modified behavior is to leave the selection alone.
In either case a context click in the background will clear the selection. In fact if the context click is on an object that is not one of the selected objects, it will clear the selection and just select that new object.
If you would like to change this behavior, I suggest you replace the standard GoToolContext tool with your own that implements the selection behavior you want. You just need to override DoSelect – maybe a no-op is what you want, but I don’t know. You’ll need to consider what the current selection is, whether the Control and/or Shift key is modifying the click, and where the click is happening.
Here is some untested code you can try:
[Serializable]
public class CustomContextTool : GoToolContext {
public CustomContextTool(GoView view) : base(view) {}
public override void DoSelect(GoInputEventArgs evt) {}
}
To replace the standard context click tool:
goView1.ReplaceMouseTool(typeof(GoToolContext), new CustomContextTool(goView1));

Walter, your untested code worked beautifully. That’s exactly the behavior I was after. Thank you! Now when I context click in the GoView background, the selection remains unchanged and I can iterate over the previously selected items.
I’m not sure what else this context click behavior will effect, but will keep playing with it. I’m subclassing a goview and using it within our app as a component. As part of that, the subclassed goview will be responsible for handling it’s own context menu. Iterating over a selection of nodes is part of that. Thanks again.