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 degreesIf 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.