Back to Devexpress

CustomDrawItemEventArgs.Item Property

windowsforms-devexpress-dot-xtradiagram-dot-customdrawitemeventargs-cd163b40.md

latest2.6 KB
Original Source

CustomDrawItemEventArgs.Item Property

Gets the processed diagram item.

Namespace : DevExpress.XtraDiagram

Assembly : DevExpress.XtraDiagram.v25.2.dll

NuGet Package : DevExpress.Win.Diagram

Declaration

csharp
public DiagramItem Item { get; }
vb
Public ReadOnly Property Item As DiagramItem

Property Value

TypeDescription
DiagramItem

A DiagramItem object.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Item property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

how-to-use-the-customdrawitem-event-to-draw-custom-icons-inside-diagram-items-t441104/CS/XtraDiagram.CustomDraw/Form1.cs#L37

csharp
private void diagramControl1_CustomDrawItem(object sender, CustomDrawItemEventArgs e) {
    var shape = e.Item as DiagramShapeEx;
    if (shape == null)

how-to-use-the-customdrawitem-event-to-draw-custom-icons-inside-diagram-items-t441104/VB/XtraDiagram.CustomDraw/Form1.vb#L34

vb
Private Sub diagramControl1_CustomDrawItem(ByVal sender As Object, ByVal e As CustomDrawItemEventArgs)
    Dim shape = TryCast(e.Item, DiagramShapeEx)
    If shape Is Nothing Then Return

See Also

CustomDrawItemEventArgs Class

CustomDrawItemEventArgs Members

DevExpress.XtraDiagram Namespace