Font Property

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)

member Font : Font with 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.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show:
© 2016 Microsoft