Raised when the user clicks the [±] button of an Expandable node.
Namespace: MindFusion.Diagramming.Wpf
Assembly: MindFusion.Diagramming.Wpf
SyntaxC#
Copy Code
|
|---|
public event EventHandler<NodeEventArgs> ExpandButtonClicked |
Visual Basic
Copy Code
|
|---|
Public Event ExpandButtonClicked As EventHandler(Of NodeEventArgs) |
Event DataExpandButtonClicked 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. |
RemarksThis 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.
ExampleThe 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 |
See Also