Northwoods.GoSilverlight 1.2.2 Assembly
GetLinkDirection Method
See Also  Send Feedback
Northwoods.GoXam Namespace > Route Class : GetLinkDirection Method

node
port
the FrameworkElement representing a port on the node
linkpoint
spot
a Spot value describing where the link should connect
from
true if the link is coming out of the port; false if going to the port
ortho
whether the link should have orthogonal segments
othernode
the node at the other end of the link
otherport
the FrameworkElement port at the other end of the link
Compute the direction in which a link should go from a given point.

Syntax

Visual Basic (Declaration) 
Protected Overridable Function GetLinkDirection( _
   ByVal node As Node, _
   ByVal port As FrameworkElement, _
   ByVal linkpoint As Point, _
   ByVal spot As Spot, _
   ByVal from As Boolean, _
   ByVal ortho As Boolean, _
   ByVal othernode As Node, _
   ByVal otherport As FrameworkElement _
) As Double
C# 
protected virtual double GetLinkDirection( 
   Node node,
   FrameworkElement port,
   Point linkpoint,
   Spot spot,
   bool from,
   bool ortho,
   Node othernode,
   FrameworkElement otherport
)

Parameters

node
port
the FrameworkElement representing a port on the node
linkpoint
spot
a Spot value describing where the link should connect
from
true if the link is coming out of the port; false if going to the port
ortho
whether the link should have orthogonal segments
othernode
the node at the other end of the link
otherport
the FrameworkElement port at the other end of the link

Return Value

an angle in degrees

Remarks

If the spot is a specific spot or is a side, this will return the corresponding multiple of 90 degrees. For example, the spot Spot.MiddleLeft will return 180 and a spot near the bottom will return 90. For spots that are exactly toward the corners, this will return a multiple of 45 degrees. For example, the spot Spot.BottomLeft will return 135.

If Route.FromEndSegmentDirection or Route.ToEndSegmentDirection is LinkEndSegmentDirection.RotatedNode or LinkEndSegmentDirection.RotatedNodeOrthogonal, these values are rotated according to the Node.RotationAngle.

Requirements

See Also

© 2010 All Rights Reserved.