RichTextString.Runs Property
Namespace: DevExpress.Spreadsheet
Assembly: DevExpress.Spreadsheet.v19.1.Core.dll
Declaration
Property Value
Type | Description |
---|---|
IEnumerable<RichTextRun> | A IEnumerable<T><RichTextRun,> collection. |
Remarks
A worksheet cell may contain a rich formatted text that represents a cell text divided into separate regions - text runs, each with its own set of font characteristics. Each run is defined by the RichTextRun object and is stored in the Runs collection. To view a run’s text and font settings, use the RichTextRun.Text and RichTextRun.Font properties, respectively.
To apply rich formatting to the cell text, do one of the following:
- Explicitly add text runs with the specified font settings to the rich text string using the RichTextString.AddTextRun method.
- Use the RichTextString.Characters method overloads to format specific characters within the cell text. This method returns the RichTextRange object that represents the specified text subset and allows you to set its font characteristics using the RichTextRange.Font property or RichTextRange.SetFont method.
Call the Range.SetRichText method to assign the rich formatted text to a cell.
For details on how to apply different fonts to specific regions of the cell text, refer to the How to: Apply Rich Formatting to Cell Text document.