Represents a diagram node.
Namespace: MindFusion.Diagramming
Package: MindFusion.Diagramming
C# Copy Code |
---|
public abstract class DiagramNode : DiagramItem, IAnimationItem |
Visual Basic Copy Code |
---|
Public MustInherit Class DiagramNode |
DiagramNode objects can represent graph vertices, nodes in organizational or flow diagrams, entities in ER diagrams, and so on. DiagramNode is an abstract class. You cannot instantiate it directly, but instead use objects from specific classes such as ShapeNode, TableNode, ContainerNode, CompositeNode. You can also create your own node class by deriving from DiagramNode or its descendants.
Use the Bounds property to get or change the location and size of a node. To move a node without changing its size, call the Move method. To change only the size of a node, invoke the Resize method.
The main textual content of a node is set using its Text property and can be customized by setting Font and TextFormat. Supplementary labels can be created by calling AddLabel.
Constraints upon how users are allowed to modify a node are set through the Constraints and EnabledHandles properties. The former specifies constraints on move direction and node size. The latter enables or disables specific manipulation handles of a node.
Relations between nodes are indicated by connecting the nodes with DiagramLink instances. Links are considered directed graph edges, so each node has two collections referring to links: IncomingLinks and OutgoingLinks. AnchorPattern defines to which points of a node incoming or outgoing links can be connected. The AllowIncomingLinks property lets you specify whether incoming links can be drawn to a node. The AllowOutgoingLinks property lets you do that for outgoing links.
A user is allowed to expand or collapse the tree starting from a node if Expandable is set to true. The Expanded property gets or sets whether the subtree starting from a node is expanded or not.
Nodes can be attached to other items, and be used as simple labels, image-holders or other kinds of UI elements. The AttachTo method creates a Group instance if necessary, and calls the group's appropriate AttachTo* method.
Nodes can be rotated, either interactively using the rotation handle above the node, or programmatically using the RotationAngle property.
System.Object
MindFusion.Diagramming.DiagramItem
MindFusion.Diagramming.DiagramNode
MindFusion.Diagramming.BarcodeNode
MindFusion.Diagramming.CompositeNode
MindFusion.Diagramming.ContainerNode
MindFusion.Diagramming.DummyNode
MindFusion.Diagramming.FreeFormNode
MindFusion.Diagramming.MapNode
MindFusion.Diagramming.ShapeNode
MindFusion.Diagramming.TableNode
MindFusion.Diagramming.TreeViewNode
MindFusion.Diagramming.VideoNode
MindFusion.Diagramming.VisioNode
MindFusion.Diagramming.WebForms.ControlNode
MindFusion.Diagramming.CompositeNode
MindFusion.Diagramming.ContainerNode
MindFusion.Diagramming.ControlNode
MindFusion.Diagramming.DummyNode
MindFusion.Diagramming.FreeFormNode
MindFusion.Diagramming.ShapeNode
MindFusion.Diagramming.TableNode
MindFusion.Diagramming.TreeViewNode
MindFusion.Diagramming.VideoNode