MindFusion.Wpf Pack Programmer's Guide
AnchorPattern Constructor (AnchorPoint[])
See Also
 





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

Namespace: MindFusion.Diagramming.Wpf
Assembly: MindFusion.Diagramming.Wpf

 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, Brushes.Blue),
        new AnchorPoint(0, 50, true, false, MarkStyle.Circle, Brushes.Blue),
        new AnchorPoint(50, 100, false, true, MarkStyle.Rectangle, Brushes.Green),
        new AnchorPoint(100, 50, false, true, MarkStyle.Rectangle, Brushes.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, Brushes.Blue), _
        New AnchorPoint(0, 50, True, False, MarkStyle.Circle, Brushes.Blue), _
        New AnchorPoint(50, 100, False, True, MarkStyle.Rectangle, Brushes.Green), _
        New AnchorPoint(100, 50, False, True, MarkStyle.Rectangle, Brushes.Red) _
    })

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

 See Also

AnchorPattern Constructor Overload List
AnchorPattern Class
MindFusion.Diagramming.Wpf Namespace