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.XtraDiagram

Assembly: DevExpress.XtraDiagram.v20.1.dll

Declaration

[DiagramCategory(DiagramCategory.DiagramItems)]
public event EventHandler<DiagramAddingNewItemEventArgs> AddingNewItem
<DiagramCategory(DiagramCategory.DiagramItems)>
Public Event AddingNewItem As EventHandler(Of DiagramAddingNewItemEventArgs)

Event Data

The AddingNewItem event's data class is DevExpress.XtraDiagram.DiagramAddingNewItemEventArgs.

Remarks

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

See Also