Represents a diagram node.
Namespace: MindFusion.Diagramming.Wpf
Assembly: MindFusion.Diagramming.Wpf
C# Copy Code |
---|
public abstract class DiagramNode : DiagramItem, IAnimationItem |
Visual Basic Copy Code |
---|
Public MustInherit Class DiagramNode |
DiagramNode instances can represent graph vertices, nodes in organizational or flow diagrams, entities in ER diagrams, and so on. DiagramNode is an abstract class and cannot be used directly. Instead, create objects from derived specific classes such as ShapeNode and TableNode. 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 TextAlignment. 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 specifies whether incoming links can be drawn to a node. The AllowOutgoingLinks property enables drawing of 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.
System.Object
System.Windows.Threading.DispatcherObject
System.Windows.DependencyObject
System.Windows.Media.Visual
System.Windows.UIElement
System.Windows.FrameworkElement
MindFusion.Diagramming.Wpf.DiagramItem
MindFusion.Diagramming.Wpf.DiagramNode
MindFusion.Diagramming.Wpf.BarcodeNode
MindFusion.Diagramming.Wpf.ContainerNode
MindFusion.Diagramming.Wpf.ControlNode
MindFusion.Diagramming.Wpf.DummyNode
MindFusion.Diagramming.Wpf.FreeFormNode
MindFusion.Diagramming.Wpf.ShapeNode
MindFusion.Diagramming.Wpf.TableNode
MindFusion.Diagramming.Wpf.TemplatedNode
MindFusion.Diagramming.Wpf.TreeViewNode
MindFusion.Diagramming.Wpf.VisioNode