Back to Devexpress

CustomDrawHeaderEventArgsBase.Font Property

windowsforms-devexpress-dot-xtraspreadsheet-dot-customdrawheadereventargsbase-c9c9b753.md

latest2.5 KB
Original Source

CustomDrawHeaderEventArgsBase.Font Property

Gets the font used to paint the header caption.

Namespace : DevExpress.XtraSpreadsheet

Assembly : DevExpress.XtraSpreadsheet.v25.2.dll

NuGet Package : DevExpress.Win.Spreadsheet

Declaration

csharp
public Font Font { get; }
vb
Public ReadOnly Property Font As Font

Property Value

TypeDescription
Font

A System.Drawing.Font object specifying font options (font name, size, color and etc.).

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Font property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-spreadsheet-custom-draw-example/CS/WindowsFormsApp1/Form1.cs#L207

csharp
// Draw row header text.
e.Graphics.DrawString(text, e.Font,
    e.Cache.GetSolidBrush(Color.FromArgb(91, 155, 213)), textBounds, format);

winforms-spreadsheet-custom-draw-example/VB/CustomDrawExample/Form1.vb#L99

vb
' Draw row header text.
    e.Graphics.DrawString(text, e.Font,
e.Cache.GetSolidBrush(Color.FromArgb(91, 155, 213)), textBounds, format)

See Also

CustomDrawHeaderEventArgsBase Class

CustomDrawHeaderEventArgsBase Members

DevExpress.XtraSpreadsheet Namespace