Visual Basic (Declaration) | |
---|---|
Protected Overridable Function FindTargetPort( _ ByVal toend As Boolean _ ) As FrameworkElement |
C# | |
---|---|
protected virtual FrameworkElement FindTargetPort( bool toend ) |
Parameters
- toend
- true if looking for a "to" port
Return Value
aFrameworkElement
representing a valid port, or null if no such port is near the current mouse point (within PortGravity distance)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.