Back to Devexpress

CustomDrawItemEventArgs.DefaultDraw(CustomDrawItemMode) Method

windowsforms-devexpress-dot-xtradiagram-dot-customdrawitemeventargs-dot-defaultdraw-x28-devexpress-dot-xtradiagram-dot-customdrawitemmode-x29.md

latest3.1 KB
Original Source

CustomDrawItemEventArgs.DefaultDraw(CustomDrawItemMode) Method

Allows you to define which elements of the default painting should be painted.

Namespace : DevExpress.XtraDiagram

Assembly : DevExpress.XtraDiagram.v25.2.dll

NuGet Package : DevExpress.Win.Diagram

Declaration

csharp
public void DefaultDraw(
    CustomDrawItemMode drawMode = CustomDrawItemMode.All
)
vb
Public Sub DefaultDraw(
    drawMode As CustomDrawItemMode = CustomDrawItemMode.All
)

Optional Parameters

NameTypeDefaultDescription
drawModeCustomDrawItemModeAll

A CustomDrawItemMode value that determines which elements of the default painting should be painted.

|

Remarks

This method is not in effect if the event’s Handled parameter is set to false.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the DefaultDraw(CustomDrawItemMode) method.

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#L40

csharp
return;
e.DefaultDraw();
var imagePath = shape.Status == Status.Active ? "images/actions/apply_16x16.png" : "images/actions/cancel_16x16.png";

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

vb
If shape Is Nothing Then Return
e.DefaultDraw()
Dim imagePath = If(shape.Status = Status.Active, "images/actions/apply_16x16.png", "images/actions/cancel_16x16.png")

See Also

CustomDrawItemEventArgs Class

CustomDrawItemEventArgs Members

DevExpress.XtraDiagram Namespace