Skip to main content

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

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