Back to Devexpress

DiagramControl.ItemDrawing Event

windowsforms-devexpress-dot-xtradiagram-dot-diagramcontrol-d9e564cd.md

latest2.9 KB
Original Source

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.v25.2.dll

NuGet Package : DevExpress.Win.Diagram

Declaration

csharp
[DiagramCategory(DiagramCategory.DiagramItems)]
public event EventHandler<DiagramItemDrawingEventArgs> ItemDrawing
vb
<DiagramCategory(DiagramCategory.DiagramItems)>
Public Event ItemDrawing As EventHandler(Of DiagramItemDrawingEventArgs)

Event Data

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

PropertyDescription
CancelGets or sets a value indicating whether the event should be canceled. Inherited from CancelEventArgs.
EndPositionSpecifies the current ending point of the drawing operation on the canvas.
ItemReturns the diagram item that is being drawn.
StageIndicates whether the drawing operation has just started, is continuing or has been finished or canceled.
StartPositionIndicates the point on the canvas where the end-user initiated the drawing operation by clicking and dragging with a drawing tool selected.
ToolReturns 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

DiagramControl Class

DiagramControl Members

DevExpress.XtraDiagram Namespace