Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DiagramControl.ItemDrawing Event

Fires repeatedly as the end-user is drawing a shape using a drawing tool (Rectangle, Ellipse, Right Triangle or Hexagon).

Namespace: DevExpress.XtraDiagram

Assembly: DevExpress.XtraDiagram.v24.2.dll

NuGet Package: DevExpress.Win.Diagram

#Declaration

[DiagramCategory(DiagramCategory.DiagramItems)]
public event EventHandler<DiagramItemDrawingEventArgs> ItemDrawing

#Event Data

The ItemDrawing event's data class is DiagramItemDrawingEventArgs. The following properties provide information specific to this event:

Property Description
Cancel Gets or sets a value indicating whether the event should be canceled. Inherited from CancelEventArgs.
EndPosition Specifies the current ending point of the drawing operation on the canvas.
Item Returns the diagram item that is being drawn.
Stage Indicates whether the drawing operation has just started, is continuing or has been finished or canceled.
StartPosition Indicates the point on the canvas where the end-user initiated the drawing operation by clicking and dragging with a drawing tool selected.
Tool Returns the drawing tool that the end-user is using.

#Remarks

The Tool property returns the drawing tool that the end-user is using. The Stage property indicates whether the drawing operation has just started, is continuing or has been finished or canceled. The StartPosition indicates the point on the canvas where the end-user initiated the drawing operation by clicking and dragging with a drawing tool selected. The EndPosition specifies the current ending point.

See Also