SpreadsheetFont.SchemeStyle Property
Gets or sets the font scheme for the current font.
Namespace: DevExpress.Spreadsheet
Assembly: DevExpress.Spreadsheet.v24.1.Core.dll
NuGet Package: DevExpress.Spreadsheet.Core
Declaration
Property Value
Type | Description |
---|---|
FontSchemeStyles | One of the FontSchemeStyles enumeration members. |
Available values:
Name | Description |
---|---|
None | Specifies that the given font is not a theme font. |
Minor | Specifies the minor font of the document theme. |
Major | Specifies the major font of the document theme. |
Remarks
The SchemeStyle property allows you to use a major or minor font of the current theme specified in the document. Major fonts are usually used for titles and headings, and minor fonts are used for the body text of a worksheet cell. When a document theme is changed, the theme fonts are updated to use the new major and minor fonts specified for the selected theme. For a user-defined font, the SchemeStyle property is FontSchemeStyles.None.
To specify all other font characteristics, use the SpreadsheetFont object properties such as SpreadsheetFont.Color, SpreadsheetFont.Size, SpreadsheetFont.Bold, SpreadsheetFont.Italic, etc. Access this object from the Formatting.Font property.
- To specify the font of an individual cell, access the SpreadsheetFont object using the cell’s Formatting.Font property directly.
- To specify the font of a cell range, modify the SpreadsheetFont object within the CellRange.BeginUpdateFormatting - CellRange.EndUpdateFormatting method pair.
- To share the same font settings between multiple cells in one step, apply the style with the specified font to the required cells. To specify the cell style font, access the Style object from the IWorkbook.Styles collection and use this style’s Formatting.Font property within the Formatting.BeginUpdate-Formatting.EndUpdate paired methods to access and modify the SpreadsheetFont object.
For examples on how to specify the format for an individual cell and cell range or modify a style, refer to the How to: Format a Cell or Range of Cells or How to: Create or Modify a Style document, respectively.