Represents a diagram node that can contain other nodes.
Namespace: MindFusion.Diagramming
Assembly: MindFusion.Diagramming
C# Copy Code |
---|
public class ContainerNode : DiagramNode, Scrollable |
Visual Basic Copy Code |
---|
Public Class ContainerNode |
Users can drag nodes into a container interactively. When a dragged node is over a container, the container frame is painted using the HighlightPen property to indicate that the node would be added to the container.
Call the Add method to add a node to container programmatically, and the Remove method to remove a node from the container. Child nodes of a container are stored in its Children collection. The Container property of child nodes returns their parent ContainerNode.
AutoShrink specifies whether the size of a container should shrink when a node is removed from it. The container node will not shrink to a size smaller than MinimumSize, even if it does not contain any items. Adding child nodes to a container will automatically grow its size, unless AutoGrow is set to false. Enable the Scrollable property to let users scroll container's content if it overflows.
A container node can be folded and unfolded, either interactively or programmatically, as specified through the Foldable and Folded properties. When a container is folded, it occupies a minimal area and its child nodes are hidden. You can get the original size of a folded container using the UnfoldedSize property.
The Caption property specifies the caption text of a container node, and CaptionBrush specifies its color. Use the CaptionFormat property to define the alignment and position of the caption text. The height of the caption bar can be set using the CaptionHeight property.
System.Object
MindFusion.Diagramming.DiagramItem
MindFusion.Diagramming.DiagramNode
MindFusion.Diagramming.ContainerNode