Raised when the user clicks the [±] button of an Expandable node.
Namespace: MindFusion.Diagramming
Package: MindFusion.Diagramming
C# Copy Code |
---|
public event EventHandler<NodeEventArgs> ExpandButtonClicked |
Visual Basic Copy Code |
---|
Public Event ExpandButtonClicked As EventHandler(Of NodeEventArgs) |
ExpandButtonClicked event handlers receive an argument of type NodeEventArgs. The following NodeEventArgs members provide information relevant to the event:
Member name | Description |
---|---|
The DiagramNode whose [±] button has been clicked. |
This event is raised only if ExpandButtonAction is set to RaiseEvents. Otherwise either the TreeCollapsed or TreeExpanded event is raised, depending on the state of the node.
The following sample code hides or shows all subordinated nodes in a group when the master node's [±] button is clicked:
C# Copy Code |
---|
void diagram_ExpandButtonClicked(object sender, NodeEventArgs e) { if (e.Node.SubordinateGroup != null) { foreach (DiagramItem item in e.Node.SubordinateGroup.AttachedNodes) item.Visible = e.Node.Expanded; } } |
Visual Basic Copy Code |
---|
Sub diagram_ExpandButtonClicked(ByVal sender As Object, ByVal e As NodeEventArgs) Handles diagram.ExpandButtonClicked |