Fires each time an item is added or removed from the diagram.
public event EventHandler<DiagramItemsChangedEventArgs> ItemsChanged
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.|
|Handled||Gets or sets a value that indicates the present state of the event handling for a routed event as it travels the route. Inherited from RoutedEventArgs.|
|Item||Returns the diagram item that is being added or removed from the diagram.|
|OriginalSource||Gets the original reporting source as determined by pure hit testing, before any possible Source adjustment by a parent class. Inherited from RoutedEventArgs.|
|RoutedEvent||Gets or sets the RoutedEvent associated with this RoutedEventArgs instance. Inherited from RoutedEventArgs.|
|Source||Gets or sets a reference to the object that raised the event. Inherited from RoutedEventArgs.|
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.