Skip to main content
All docs
V24.1

TileCustomDrawEventArgs.ShouldDrawHoveredOverlay Property

Gets whether the tile should display a hovered overlay.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

public virtual bool ShouldDrawHoveredOverlay { get; }

Property Value

Type Description
Boolean

true if the tile should display a hovered overlay; otherwise, false.

Remarks

When the ShouldDrawHoveredOverlay property returns true, you can draw your custom overlay for the hovered state or use the e.DrawHoveredOverlay method to draw the default overlay.

Note

The ShouldDrawHoveredOverlay property returns true when the TileViewItemOptions.AllowItemHover property is set to true and the Appearance.ItemHovered.BackColor property is not specified.

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