Fires each time an item is added or removed from the diagram.
[DiagramCategory(DiagramCategory.DiagramItems)] public event EventHandler<DiagramItemsChangedEventArgs> ItemsChanged
<DiagramCategory(DiagramCategory.DiagramItems)> Public Event ItemsChanged As EventHandler(Of DiagramItemsChangedEventArgs)
The ItemsChanged event's data class is DiagramItemsChangedEventArgs. The following properties provide information specific to this event:
|Action||Indicates whether the item is being added or removed.|
|Item||Returns the item that is being added or removed from the diagram.|
The ItemsChanged event fires whenever the DiagramControl.Items collection is modified (a document is loaded, a user performs the Undo/Redo actions, etc.).
The event parameter's DiagramItemsChangedEventArgs.Action property indicates whether the item has been added or removed.