GoXam for WPF v3
SnapTo Method
Northwoods.GoXam.Tool Namespace > DraggingTool Class : SnapTo Method
the Northwoods.GoXam.Node being dragged
the Point in model coordinates to which the node is being dragged
the Northwoods.GoXam.Node, typically a grid, which is controlling the drag snapping
a Dictionary of Northwoods.GoXam.Parts being dragged
Compute the new location for a node, given another node that is controlling its movement.
Syntax

Parameters

moving
the Northwoods.GoXam.Node being dragged
pt
the Point in model coordinates to which the node is being dragged
snapper
the Northwoods.GoXam.Node, typically a grid, which is controlling the drag snapping
draggedparts
a Dictionary of Northwoods.GoXam.Parts being dragged

Return Value

a new node location, in model coordinates
Remarks

This is called by ComputeMove.

When there is a snapper, if the snapper's Northwoods.GoXam.Part.DragOverSnapEnabled property is false, this method just returns the unmodified pt value. Otherwise this uses the Northwoods.GoXam.Part.DragOverSnapCellSize and Northwoods.GoXam.Part.DragOverSnapCellSpot to compute the nearest grid point that should be the location of the moving node.

If there is no snapper, this uses the Northwoods.GoXam.Diagram's Northwoods.GoXam.Diagram.GridSnapCellSize, Northwoods.GoXam.Diagram.GridSnapCellSpot, and Northwoods.GoXam.Diagram.GridSnapOrigin properties to calculate and return the nearest grid point.

See Also

Reference

DraggingTool Class
DraggingTool Members