System.Windows.Forms.DrawListViewSubItemEventArgs.DrawBackground Method

Draws the background of the System.Windows.Forms.ListViewItem.ListViewSubItem using its current background color.

Syntax

public void DrawBackground ()

Remarks

Use this method to draw a standard background that uses the current value of the System.Windows.Forms.ListViewItem.ListViewSubItem.BackColor property. The background is drawn to fill the area specified by the DrawListViewItemEventArgs.Bounds property.

Note:

The ListViewItem.UseItemStyleForSubItems property of the parent System.Windows.Forms.ListViewItem must be set to false to prevent the ListViewItem.BackColor value of the parent item from overriding the subitem value.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0