Skip to main content

XlFont.BodyFont() Method

Returns the XlFont object corresponding to the body font used in the current document theme.

Namespace: DevExpress.Export.Xl

Assembly: DevExpress.Printing.v24.1.Core.dll

NuGet Package: DevExpress.Printing.Core

Declaration

public static XlFont BodyFont()

Returns

Type Description
XlFont

An XlFont class instance that represents the theme body font.

Remarks

The document theme includes a pair of theme fonts: the heading font used for the titles, and the body font that is the default font available for worksheet cells. By default, a workbook uses Office themes where the body font is set to Calibri, 11. The XlDocumentTheme enumeration lists the available document themes. To change the theme of a workbook, use the IXlDocument.Theme property.

To apply the theme heading font to cell content, call the XlFont.HeadingsFont method. To specify a custom non-theme font of the specified name, size and/or color, use the XlFont.CustomFont method overloads. For more information on how to specify font settings for an individual cell, refer to the How to: Configure Cell Font Settings article.

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

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.

See Also