Back to Devexpress

RichTextRunFont.SchemeStyle Property

officefileapi-devexpress-dot-spreadsheet-dot-richtextrunfont.md

latest4.2 KB
Original Source

RichTextRunFont.SchemeStyle Property

Gets or sets the scheme of the font applied to the current text run.

Namespace : DevExpress.Spreadsheet

Assembly : DevExpress.Spreadsheet.v25.2.Core.dll

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
public FontSchemeStyles SchemeStyle { get; set; }
vb
Public Property SchemeStyle As FontSchemeStyles

Property Value

TypeDescription
FontSchemeStyles

A FontSchemeStyles enumeration member.

|

Available values:

NameDescription
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 RichTextRunFont object’s properties allow you to specify font settings for individual regions of the cell text (so-called text runs defined by the RichTextRun objects). 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 custom font, the SchemeStyle property is FontSchemeStyles.None.

To apply rich formatting to a portion of the cell text, do one of the following:

Call the CellRange.SetRichText method to assign the rich formatted text to a cell.

To view font settings applied to an existing run, use the run’s RichTextRun.Font property.

Refer to the How to: Apply Rich Formatting to Cell Text document for examples on how to apply different fonts to specific regions of the cell text.

Implements

SchemeStyle

See Also

AddTextRun(String, RichTextRunFont)

Font

How to: Apply Rich Formatting to Cell Text

RichTextRunFont Class

RichTextRunFont Members

DevExpress.Spreadsheet Namespace