Back to Devexpress

TileViewItemCustomDrawEventArgs.DrawingProcess Property

windowsforms-devexpress-dot-xtragrid-dot-views-dot-tile-dot-tileviewitemcustomdraweventargs.md

latest3.6 KB
Original Source

TileViewItemCustomDrawEventArgs.DrawingProcess Property

Gets the stage of the drawing process.

Namespace : DevExpress.XtraGrid.Views.Tile

Assembly : DevExpress.XtraGrid.v25.2.dll

NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation

Declaration

csharp
public TileViewItemCustomDrawProcess DrawingProcess { get; }
vb
Public ReadOnly Property DrawingProcess As TileViewItemCustomDrawProcess

Property Value

TypeDescription
TileViewItemCustomDrawProcess

The stage of the drawing process.

|

Available values:

NameDescription
DrawTile

Draws the entire tile except for the focus/selection borders.

| | DrawCheckMark |

Draws the check mark after an animation frame (for example, a hover animation).

| | DrawSelection |

Draws focus and selection borders.

|

Remarks

The following code snippet demonstrates the default drawing algorithm:

csharp
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;
}
vb
Private Sub tileView1_CustomDrawTile(ByVal sender As Object, ByVal e As TileViewItemCustomDrawEventArgs)
    Select Case e.DrawingProcess
        Case TileViewItemCustomDrawProcess.DrawTile
            If e.ShouldDrawBackground Then e.DrawBackground()
            If e.ShouldDrawContent Then e.DrawContent()
            If e.ShouldDrawHoveredOverlay Then e.DrawHoveredOverlay()
            If e.ShouldDrawDisabledOverlay Then e.DrawDisabledOverlay()
            If e.ShouldDrawBorder Then e.DrawBorder()
            If e.ShouldDrawCheckMark Then e.DrawCheckMark()
        Case TileViewItemCustomDrawProcess.DrawCheckMark
            e.DefaultDraw()
        Case TileViewItemCustomDrawProcess.DrawSelection
            e.DefaultDraw()
    End Select

    e.Handled = True
End Sub

See Also

TileViewItemCustomDrawEventArgs Class

TileViewItemCustomDrawEventArgs Members

DevExpress.XtraGrid.Views.Tile Namespace