Search
AnchorPattern Constructor (AnchorPoint[])
See Also
 





Initializes a new instance of the AnchorPattern class with the specified anchor points.

Namespace: MindFusion.Diagramming
Assembly: MindFusion.Diagramming

 Syntax

C#  Copy Code

public AnchorPattern (
    AnchorPoint[] points
)

Visual Basic  Copy Code

Public New ( _
    points() As AnchorPoint _
)

 Parameters

points
Contains the initial set of AnchorPoint instances for the new pattern.

 Example

The following code creates a decision node with two incoming anchors at the top and the left, and two outgoing at the bottom and the right vertices.

C#  Copy Code

AnchorPattern decision2In2Out =
    new AnchorPattern(new AnchorPoint[] {
        new AnchorPoint(50, 0, true, false, MarkStyle.Circle, Color.Blue),
        new AnchorPoint(0, 50, true, false, MarkStyle.Circle, Color.Blue),
        new AnchorPoint(50, 100, false, true, MarkStyle.Rectangle, Color.Green),
        new AnchorPoint(100, 50, false, true, MarkStyle.Rectangle, Color.Red)
    });

ShapeNode decisionNode = diagram.Factory.CreateShapeNode(10, 10, 50, 35);
decisionNode.AnchorPattern = decision2In2Out;

Visual Basic  Copy Code

Dim decision2In2Out As AnchorPattern = _
    New AnchorPattern(New AnchorPoint() { _
        New AnchorPoint(50, 0, True, False, MarkStyle.Circle, Color.Blue), _
        New AnchorPoint(0, 50, True, False, MarkStyle.Circle, Color.Blue), _
        New AnchorPoint(50, 100, False, True, MarkStyle.Rectangle, Color.Green), _
        New AnchorPoint(100, 50, False, True, MarkStyle.Rectangle, Color.Red) _
    })

Dim decisionNode As ShapeNode = Diagram.Factory.CreateShapeNode(10, 10, 50, 35)
decisionNode.AnchorPattern = decision2In2Out

 See Also