Skip to main content
A newer version of this page is available. .

DiagramControl Events

Provides a canvas where you or your end-users can display, create and edit various diagrams.
Name Description
AddingNewItem 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).
AutoSizeChanged This event is not relevant for this class. Inherited from Control.
BackColorChanged This member is not supported.
BackgroundImageChanged Occurs when the value of the BackgroundImage property changes. Inherited from Control.
BackgroundImageLayoutChanged Occurs when the BackgroundImageLayout property changes. Inherited from Control.
BeforeItemsMoving Raises each time the end-user attempts to move a diagram item.
BeforeItemsResizing Raises each time the end-user attempts to resize a diagram item.
BeforeItemsRotating Raises each time the end-user attempts to rotate a diagram item.
BindingContextChanged Occurs when the value of the BindingContext property changes. Inherited from Control.
CanRedoChanged Fires each time the value of the DiagramControl.CanRedo property is changed.
CanUndoChanged Fires each time the value of the DiagramControl.CanUndo property is changed.
CanvasBoundsChanged Occurs when the size of the canvas is changed.
CausesValidationChanged Occurs when the value of the CausesValidation property changes. Inherited from Control.
ChangeUICues Occurs when the focus or keyboard user interface (UI) cues change. Inherited from Control.
Click Occurs when the control is clicked. Inherited from Control.
ClientSizeChanged Occurs when the value of the ClientSize property changes. Inherited from Control.
ClosedEditor Fires after the end-user closes the diagram item’s text editor.
ConnectionChanged Occurs after the connection has been changed by the end-user.
ConnectionChanging Occurs when the connection is about to be changed by the end-user.
ContainerIsCollapsedChanged
ContainerIsCollapsedChanging
ContextMenuChanged Occurs when the value of the ContextMenu property changes. Inherited from Control.
ContextMenuStripChanged Occurs when the value of the ContextMenuStrip property changes. Inherited from Control.
ControlAdded Occurs when a new control is added to the Control.ControlCollection. Inherited from Control.
ControlRemoved Occurs when a control is removed from the Control.ControlCollection. Inherited from Control.
CursorChanged Occurs when the value of the Cursor property changes. Inherited from Control.
CustomCursor Occurs when the mouse cursor enters the diagram control.
CustomDrawBackground Occurs before the Canvas background is rendered.
CustomDrawItem Provides the ability to customize the appearance of diagram items.
CustomGetEditableItemProperties Allows you to modify the list of diagram item properties that can be edited by end-users in the Properties Panel.
CustomGetEditableItemPropertiesCacheKey Allows you to update the set of properties displayed by the property grid.
CustomGetSerializableItemProperties Allows you to modify the list of serializable properties of diagram items.
CustomHitTest Occurs each time the cursor moves while hovering over a diagram item.
CustomItemDrag Occurs when an end-user starts dragging a diagram item.
CustomItemDragResult Occurs before a drag and drop operation is completed.
CustomItemGiveFeedback Occurs while diagram items are dragged.
CustomItemQueryContinueDrag Occurs during a drag-and-drop operation.
CustomLoadDocument Fires after an end-user selects a file in the ‘Open File’ dialog, or after a document load is initiated by setting the DiagramControl.DocumentSource property in code.
CustomLoadImage Fires after an end-user selects a file in the ‘Insert Picture’ dialog.
CustomSaveDocument Fires when the diagram is about to be saved (when an end-user uses Save actions in the Diagram’s Ribbon menu, or when the DiagramControl.SaveFile/DiagramControl.SaveFileAs method is called). The event allows you to implement custom saving logic.
DeletingItems Fires when the end-user removes items from the diagram canvas. Obsoleted. Use the DiagramControl.ItemsDeleting event instead.
Disposed Occurs when the component is disposed by a call to the Dispose() method. Inherited from Component.
DockChanged Occurs when the value of the Dock property changes. Inherited from Control.
DocumentLoaded Occurs after a document is loaded into the DiagramControl.
DoubleClick Occurs when the control is double-clicked. Inherited from Control.
DpiChangedAfterParent Occurs when the DPI setting for a control is changed programmatically after the DPI of its parent control or form has changed. Inherited from Control.
DpiChangedBeforeParent Occurs when the DPI setting for a control is changed programmatically before a DPI change event for its parent control or form has occurred. Inherited from Control.
DragDrop Occurs when a drag-and-drop operation is completed. Inherited from Control.
DragEnter Occurs when an object is dragged into the control’s bounds. Inherited from Control.
DragLeave Occurs when an object is dragged out of the control’s bounds. Inherited from Control.
DragOver Occurs when an object is dragged over the control’s bounds. Inherited from Control.
EnabledChanged Occurs when the Enabled property value has changed. Inherited from Control.
Enter Occurs when the control is entered. Inherited from Control.
ExceptionMessage Allows you to handle exceptions that may raise during various actions on the Diagram Control.
FontChanged This member is not supported by the DiagramControl class.
ForeColorChanged This member is not supported by the DiagramControl class.
GiveFeedback Occurs during a drag operation. Inherited from Control.
GotFocus Occurs when the control receives focus. Inherited from Control.
HandleCreated Occurs when a handle is created for the control. Inherited from Control.
HandleDestroyed Occurs when the control’s handle is in the process of being destroyed. Inherited from Control.
HasChangesChanged Fires each time the value of the DiagramControl.HasChanges property is changed.
HelpRequested Occurs when the user requests help for a control. Inherited from Control.
ImeModeChanged Occurs when the ImeMode property has changed. Inherited from Control.
Invalidated Occurs when a control’s display requires redrawing. Inherited from Control.
IsTextEditModeChanged Fires each time the value of the DiagramControl.IsTextEditMode property is changed.
ItemBoundsChanged Fires each time an item’s bounds are changed.
ItemContentChanged Fires each time the end-user changes the item’s text.
ItemCreating Occurs when the DiagramControl creates a diagram item.
ItemDrawing Fires repeatedly as the end-user is drawing a shape using a drawing tool (Rectangle, Ellipse, Right Triangle or Hexagon).
ItemInitializing Fires each time an item is created via the DevExpress.Diagram.Core.ItemTool.
ItemsChanged Fires each time an item is added or removed from the diagram.
ItemsDeleting Fires each time diagram items have been removed from the canvas.
ItemsMoving Fires as the end-user is moving diagram items.
ItemsPasting Fires as the end-user pastes the diagram items from the clipboard onto the canvas.
ItemsResizing Fires when a diagram item is resized by the end-user or programmatically.
ItemsRotating Fires when the end-user attempts to rotate a diagram item.
KeyDown Occurs when a key is pressed while the control has focus. Inherited from Control.
KeyPress Occurs when a character. space or backspace key is pressed while the control has focus. Inherited from Control.
KeyUp Occurs when a key is released while the control has focus. Inherited from Control.
Layout Occurs when a control should reposition its child controls. Inherited from Control.
Leave Occurs when the input focus leaves the control. Inherited from Control.
LocationChanged Occurs when the Location property value has changed. Inherited from Control.
LostFocus Occurs when the control loses focus. Inherited from Control.
MarginChanged Occurs when the control’s margin changes. Inherited from Control.
MouseCaptureChanged Occurs when the control loses mouse capture. Inherited from Control.
MouseClick Occurs when the control is clicked by the mouse. Inherited from Control.
MouseDoubleClick Occurs when the control is double clicked by the mouse. Inherited from Control.
MouseDown Occurs when the mouse pointer is over the control and a mouse button is pressed. Inherited from Control.
MouseEnter Occurs when the mouse pointer enters the control. Inherited from Control.
MouseHover Occurs when the mouse pointer rests on the control. Inherited from Control.
MouseLeave Occurs when the mouse pointer leaves the control. Inherited from Control.
MouseMove Occurs when the mouse pointer is moved over the control. Inherited from Control.
MouseUp Occurs when the mouse pointer is over the control and a mouse button is released. Inherited from Control.
MouseWheel Occurs when the mouse wheel moves while the control has focus. Inherited from Control.
Move Occurs when the control is moved. Inherited from Control.
PaddingChanged Occurs when the control’s padding changes. Inherited from Control.
Paint Occurs when the control is redrawn. Inherited from Control.
ParentChanged Occurs when the Parent property value changes. Inherited from Control.
PreviewKeyDown Occurs before the KeyDown event when a key is pressed while focus is on this control. Inherited from Control.
QueryAccessibilityHelp Occurs when AccessibleObject is providing help to accessibility applications. Inherited from Control.
QueryConnectionPoints Fires each time the end-user moves the cursor with the active Connector Tool near shapes or their connection points.
QueryContinueDrag Occurs during a drag-and-drop operation and enables the drag source to determine whether the drag-and-drop operation should be canceled. Inherited from Control.
QueryItemDrawAction Fires repeatedly as the end-user hovers over the diagram canvas while a drawing tool (Rectangle, Ellipse, Right Triangle or Hexagon) is selected.
QueryItemEditAction Fires each time the end-user attempts to initiate text editing to edit the text within a diagram item.
QueryItemsAction Fires each time the end-user attempts to perform an action on a diagram item.
QueryItemSnapping Fires repeatedly as the end-user triggers snapping while dragging or resizing a diagram shape.
RegionChanged Occurs when the value of the Region property changes. Inherited from Control.
RelayoutItemsCompleted Occurs immediately after an Automatic Layout algorithm is completed.
Resize Occurs when the control is resized. Inherited from Control.
RightToLeftChanged Occurs when the RightToLeft property value changes. Inherited from Control.
SelectionChanged Fires when the selection changes (new items are selected, or currently selected items are deselected).
ShowingEditor Enables you to prevent an end-user from activating the editors of individual diagram items.
ShowingOpenDialog Fires before showing an ‘Open File’ dialog, and allows it to be customized or replaced.
ShowingOpenImageDialog Fires before showing an ‘Insert Picture’ dialog, and allows it to be customized.
ShowingSaveDialog Fires before showing a ‘Save File As’ dialog, and allows it to be customized or replaced.
SizeChanged Occurs when the Size property value changes. Inherited from Control.
StyleChanged Occurs when the control style changes. Inherited from Control.
SubordinatesHidden Occurs after a DiagramItem‘s subordinates are hidden.
SubordinatesHiding Occurs before a DiagramItem‘s subordinates are hidden.
SubordinatesShowing Occurs before a DiagramItem‘s subordinates are shown.
SubordinatesShown Occurs after a DiagramItem‘s subordinates are shown.
SystemColorsChanged Occurs when the system colors change. Inherited from Control.
TabIndexChanged Occurs when the TabIndex property value changes. Inherited from Control.
TabStopChanged Occurs when the TabStop property value changes. Inherited from Control.
TextChanged Occurs when the Text property value changes. Inherited from Control.
TitleChanged Fires each time the value of the DiagramControl.Title property is changed.
Validated Occurs when the control is finished validating. Inherited from Control.
Validating Occurs when the control is validating. Inherited from Control.
VisibleChanged Occurs when the Visible property value changes. Inherited from Control.
ZoomFactorChanged Raises each time the current diagram zoom factor is changed.
See Also