Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ListViewItem.Font Property

Gets or sets the font of the text displayed by the item.

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

public Font Font { get; set; }

Property Value

Type: System.Drawing.Font
The Font to apply to the text displayed by the control. The default is the value of the DefaultFont property if the ListViewItem is not associated with a ListView control; otherwise, the font specified in the Font property for the ListView control is used.

You can use this method to change the font styles applied to the text of the item. Because a Font is immutable (you cannot adjust any of its properties), you can only assign the Font property a new Font. However, you can base the new font on the existing font.

The following code example shows how to adjust the existing font to make it bold.

listViewItem1.Font = new Font(listViewItem1.Font, 
    listViewItem1.Font.Style | FontStyle.Bold);

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft