Invoked when a user presses the left mouse button inside the diagram drawing area.
Namespace: MindFusion.Diagramming.WinForms.Behaviors
Assembly: MindFusion.Diagramming.WinForms
C# Copy Code |
---|
public abstract InteractionState StartDraw ( |
Visual Basic Copy Code |
---|
Public MustOverride Function StartDraw( _ |
An instance of the InteractionState class, which specifies whether dragging the mouse should create or modify an item.
To start creating an item, pass a new instance of a DiagramItem derived class to the InteractionState constructor and set the constructor's action argument to Action.Create. Do not use methods such as Nodes.Add or CreateShapeNode to add the new item to the diagram; the item will be added automatically when the user completes drawing it. If creating a link, use the DiagramLink constructor that takes a single DiagramNode argument, specifying the origin node.
To start modifying an item, provide a reference to an existing item as argument of the InteractionState constructor and set the action argument to Action.Modify.
This StartDraw implementation allows only moving existing nodes or creating new nodes using the mouse:
C# Copy Code |
---|
public override InteractionState StartDraw(PointF point) |
Visual Basic Copy Code |
---|
Public Overrides Function StartDraw(ByVal point As PointF) As InteractionState |