Skip to main content

DiagramControl.AddingNewItem Event

Fires each time a new item is added to the diagram by the end-user (e.g., dropped from the toolbox, drawn using a tool).

Namespace: DevExpress.Xpf.Diagram

Assembly: DevExpress.Xpf.Diagram.v22.1.dll

NuGet Package: DevExpress.Wpf.Diagram


public event EventHandler<DiagramAddingNewItemEventArgs> AddingNewItem

Event Data

The AddingNewItem event's data class is DevExpress.Xpf.Diagram.DiagramAddingNewItemEventArgs.


Set the event parameter’s DiagramAddingNewItemEventArgs.Cancel property to true to prevent adding an item to the diagram.

See Also