Back to Devexpress

RichTextRunFont.FontStyle Property

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

latest3.7 KB
Original Source

RichTextRunFont.FontStyle Property

Gets or sets the font style (bold, italic, etc.) applied to the current text run.

Namespace : DevExpress.Spreadsheet

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

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
public SpreadsheetFontStyle FontStyle { get; set; }
vb
Public Property FontStyle As SpreadsheetFontStyle

Property Value

TypeDescription
SpreadsheetFontStyle

A SpreadsheetFontStyle enumeration member.

|

Available values:

NameDescription
Regular

Specifies that the text is regular.

| | Italic |

Specifies that the text is italic.

| | Bold |

Specifies that the text is bold.

| | BoldItalic |

Specifies that the text is bold and italic.

|

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).

You can do one of the following to apply rich formatting to a portion of the cell text:

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

FontStyle

See Also

AddTextRun(String, RichTextRunFont)

Font

How to: Apply Rich Formatting to Cell Text

RichTextRunFont Class

RichTextRunFont Members

DevExpress.Spreadsheet Namespace