Move a goView Node

I am am trying to create a magnifier that displays an enlarged view of the area contained with the GoBasicNode which the user clicks on (or move with the mouse).

The problem I am having is that i don’t know how find out if the user dragging a node and if so what node are the actually dragging

Many thanks,

If you want to update your magnifier view after the move is done, implement a GoView.SelectionMoved event handler.

If you want to update the magnifier view during the drag, replace the GoToolDragging tool with your own that overrides the DoDragging method, calling the base method first. This assumes that GoView.DragsRealtime is true, of course.

I was thinking about doing this a slightly different way. I was thinking of just using the windows MouseMove event to get the co-ordinates of the mouse. Then in this method I check if a node is selected and if so I get the co-ordinates of the node and update the magnifier.

So it is possibe to find out if a node is selected and get the co-ordinates of this node?

MouseMove is a little too low level here. You’ll be better off hooking the go methods as Walter suggests.

You can get to the selection through the view.

During a drag there won’t be any Control.MouseMove events because there’s a modal drag-and-drop in progress.

GoView.Selection is the collection of selected GoObjects. If you just care about the first selected object, it's common to use GoView.Selection.Primary.
Sorry if I am being a pest but I just don't know how to replace

the GoToolDragging tool with my own. I looked up the help and I seen that GoToolDraggin is a class. So does that mean I have to create a class of the same name which orrides the orginal class? Any pointers/help would be great.

TreeApp, SubgraphApp & MoveableLinkApp in the samples are places to check for GoToolDragging overrides.

public class CustomDraggingTool : GoToolDragging {
public CustomDraggingTool(GoView view) : base(view) {}
public override void DoDragging(GoInputState evttype) {
GoObject node = this.View.Selection.Primary as CustomNode;
if (node != null) {

Install your custom tool by:
goView1.ReplaceMouseTool(typeof(GoToolDragging), new CustomDraggingTool(goView1));