Class RichTextRun
Describes a contiguous range of characters within a rich-text string that share font, style, size, and/or foreground brush overrides. Used with RichTextOptions.
Inherited Members
Namespace: DRIT.Drawing.Text
Assembly: DRIT.Drawing.dll
Syntax
public sealed class RichTextRun
Constructors
RichTextRun(int, int)
Initializes a new RichTextRun for the specified range.
Declaration
public RichTextRun(int start, int length)
Parameters
| Type | Name | Description |
|---|---|---|
| int | start | Zero-based start index within the text. |
| int | length | Number of characters in the run. |
Properties
Brush
Foreground brush override for this run, or null to use the
defaultBrush passed to Graphics.DrawRichText.
Declaration
public Brush? Brush { get; set; }
Property Value
| Type | Description |
|---|---|
| Brush |
EmSize
Em size override for this run (in the unit specified by Unit), or null to use the default size.
Declaration
public float? EmSize { get; set; }
Property Value
| Type | Description |
|---|---|
| float? |
FontFamily
Font family override for this run, or null to use the default family from RichTextOptions.
Declaration
public FontFamily? FontFamily { get; set; }
Property Value
| Type | Description |
|---|---|
| FontFamily |
FontStyle
Font style override for this run, or null to use the default style.
Declaration
public FontStyle? FontStyle { get; set; }
Property Value
| Type | Description |
|---|---|
| FontStyle? |
Length
Number of characters in the run.
Declaration
public int Length { get; }
Property Value
| Type | Description |
|---|---|
| int |
Start
Zero-based start index within the text.
Declaration
public int Start { get; }
Property Value
| Type | Description |
|---|---|
| int |