Northwoods.GoWPF 2.2.4 Assembly
GetLinkDirection Method

the FrameworkElement representing a port on the node
a Spot value describing where the link should connect
true if the link is coming out of the port; false if going to the port
whether the link should have orthogonal segments
the node at the other end of the link
the FrameworkElement port at the other end of the link
Compute the direction in which a link should go from a given point.
Syntax
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
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 FromEndSegmentDirection or ToEndSegmentDirection is LinkEndSegmentDirection.RotatedNode or LinkEndSegmentDirection.RotatedNodeOrthogonal, these values are rotated according to the RotationAngle, unless the spot is Spot.None.

Requirements
See Also

Reference

Route Class
Route Members

 

 


© Northwoods Software 2017. All Rights Reserved.

Send Feedback