Syncfusion.Grid.Windows


The System.Drawing.Graphics context of the canvas.
The Rectangle
The GridStyleInfo object that holds cell information.
True if background needs to be redrawn.

DrawBackground Method (GridCellRendererBase)

Checks if the background for a cell needs drawing and optionally calls OnDrawCellBackground and also draws the frame for the cell as specified in the style object.
Syntax
'Declaration
 
Protected Overridable Sub DrawBackground( _
   ByVal g As Graphics, _
   ByVal rect As Rectangle, _
   ByVal style As GridStyleInfo, _
   ByVal fillBackground As Boolean _
) 
'Usage
 
Dim instance As GridCellRendererBase
Dim g As Graphics
Dim rect As Rectangle
Dim style As GridStyleInfo
Dim fillBackground As Boolean
 
instance.DrawBackground(g, rect, style, fillBackground)
protected virtual void DrawBackground( 
   Graphics g,
   Rectangle rect,
   GridStyleInfo style,
   bool fillBackground
)

Parameters

g
The System.Drawing.Graphics context of the canvas.
rect
The Rectangle
style
The GridStyleInfo object that holds cell information.
fillBackground
True if background needs to be redrawn.
Remarks
The method will call OnDrawCellBackground for covered cells and bannered cells. For regular cells, you can force OnDrawCellBackground to be called by assigning BrushInfo.Empty to the Interior property of a GridStyleInfo. You can do this in OnPrepareViewStyleInfo, for example.

Otherwise OnDrawCellBackground will not be called for regular cells because of internal drawing optimizations within the grid. By default the grid optimizes drawing such that the background of neighboring cells with the same color is drawn in one operation.

After the background of a cell has been drawn (either by a call to OnDrawCellBackground or because of earlier drawing inside the grid) the cells frame is drawn as specified with CellAppearance by calling DrawCellAppearance.

AssemblyVersion

Syncfusion.Grid.Windows: 18.2460.0.44

See Also