Northwoods.GoSilverlight 1.3.5 Assembly
FindTargetPort Method
See Also  Send Feedback
Northwoods.GoXam.Tool Namespace > LinkingBaseTool Class : FindTargetPort Method

toend
true if looking for a "to" port
Find a port with which the user could complete a valid link.

Syntax

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

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.

Requirements

See Also

© 2012 All Rights Reserved.