Skip to main content

WinExplorerView.CustomDrawItem Event

Allows you to manually repaint a WinExplorerView item.

Namespace: DevExpress.XtraGrid.Views.WinExplorer

Assembly: DevExpress.XtraGrid.v22.2.dll

NuGet Package: DevExpress.Win.Grid


public event WinExplorerViewCustomDrawItemEventHandler CustomDrawItem

Event Data

The CustomDrawItem event's data class is DevExpress.XtraGrid.Views.WinExplorer.WinExplorerViewCustomDrawItemEventArgs.


Handle the CustomDrawItem event and use its e.Graphics and e.Cache methods to re-paint individual WinExplorerView items.

The sample below illustrates how to draw a colored triangle in the top right corner of WinExplorerView items.


Color triangleColor = Color.DodgerBlue;
private void WinExplorerView1_CustomDrawItem(object sender, WinExplorerViewCustomDrawItemEventArgs e)
    List<Point> cornerTriangle = new List<Point>();
    int tempLength = 50;
    cornerTriangle.Add(new Point(e.Bounds.Width + e.Bounds.X - tempLength, e.Bounds.Y));
    cornerTriangle.Add(new Point(e.Bounds.Width + e.Bounds.X, e.Bounds.Y));
    cornerTriangle.Add(new Point(e.Bounds.Width + e.Bounds.X, tempLength + e.Bounds.Y));
    e.Cache.FillPolygon(cornerTriangle.ToArray(), triangleColor);
    e.Handled = true;
See Also