MindFusion.Wpf Pack Programmer's Guide
ContainerNode Class
Remarks See Also
 





Implements nodes that can contain other nodes.

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

 Syntax

C#  Copy Code

public class ContainerNode : DiagramNode, VisualContainer

Visual Basic  Copy Code

Public Class ContainerNode
    Inherits DiagramNode
    Implements VisualContainer

 Remarks

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 brush. Use the CaptionFormat property to define the alignment and position of the caption text. The height of the caption area of a container can be set using the CaptionHeight property. The caption area can be optionally filled in a different color by setting CaptionBackBrush.

 Inheritance Hierarchy

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.ContainerNode

 See Also

ContainerNode Members
MindFusion.Diagramming.Wpf Namespace