ListViewItem.BackColor Property

Definition

Gets or sets the background color of the item's text.

public System.Drawing.Color BackColor { get; set; }

Property Value

A Color that represents the background color of the item's text.

Remarks

You can use the BackColor property to change the color displayed behind the item text. This property can be used if you want to use different background and foreground color combinations (using the ForeColor property to set the foreground color) to differentiate one item from another. For example, you could set the BackColor property to Red to identify items that have failed validation or are missing subitem information.

If you want to use the same background color for all subitems of an item, set the UseItemStyleForSubItems property to true. This will cause the colors and fonts specified for the item to be used for all subitem text.

Applies to

Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

See also