GoXam for WPF v3
FindTargetPort Method
Northwoods.GoXam.Tool Namespace > LinkingBaseTool Class : FindTargetPort Method
true if looking for a "to" port
Find a port with which the user could complete a valid link.
Syntax
protected virtual FrameworkElement FindTargetPort( 
   bool toend
)

Parameters

toend
true if looking for a "to" port

Return Value

a FrameworkElement representing a valid port, or null if no such port is near the current mouse point (within PortGravity distance)
Remarks

This finds elements near to the current mouse point for which a valid link connection is possible. For example, when toend is true, this looks for elements (i.e. "ports") in nodes that have Northwoods.GoXam.Node.GetLinkableTo return true and for which IsValidTo is true.

For each port element found, this calls IsValidLink to find out if a link between the original node/port and the found node/port would be valid. The result is saved in the ValidPortsCache for faster decisions later during the operation of this tool. The closest valid port is returned.

See Also

Reference

LinkingBaseTool Class
LinkingBaseTool Members