Skip to main content
All docs
V24.2

TileCustomDrawEventArgs.DrawHoveredOverlay() Method

Draws the overlay for the hovered state in its default appearance.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v24.2.dll

Declaration

public virtual void DrawHoveredOverlay()

Remarks

Call the DrawHoveredOverlay method at the TileViewItemCustomDrawProcess.DrawTile stage to draw the default hovered overlay. The e.ShouldDrawHoveredOverlay property returns whether the tile should display a hovered overlay.

The following code snippet demonstrates the default drawing algorithm:

void tileView1_CustomDrawTile(object sender, TileViewItemCustomDrawEventArgs e) {
    switch (e.DrawingProcess) {
        case TileViewItemCustomDrawProcess.DrawTile:
            if (e.ShouldDrawBackground)
                e.DrawBackground();
            if (e.ShouldDrawContent)
                e.DrawContent();
            if (e.ShouldDrawHoveredOverlay)
                e.DrawHoveredOverlay();
            if (e.ShouldDrawDisabledOverlay)
                e.DrawDisabledOverlay();
            if (e.ShouldDrawBorder)
                e.DrawBorder();
            if (e.ShouldDrawCheckMark)
                e.DrawCheckMark();
            break;
        case TileViewItemCustomDrawProcess.DrawCheckMark:
            e.DefaultDraw();
            break;
        case TileViewItemCustomDrawProcess.DrawSelection:
            e.DefaultDraw();
            break;
    }
    e.Handled = true;
}
See Also