Class RichText
- Namespace
- SheetStream
- Assembly
- SheetStream.dll
One formatted run of text inside a rich-text cell. Unset properties inherit the cell's font.
public sealed class RichText
- Inheritance
-
RichText
- Inherited Members
Examples
sheet.Row().WriteRichText(new RichText("Status: "), new RichText("LATE") { Bold = true, Color = "#C00000" });
Constructors
RichText(string)
Creates a run with the given text.
public RichText(string text)
Parameters
textstring
Properties
Bold
Bold run.
public bool Bold { get; set; }
Property Value
Color
Text colour as hex, or null to inherit. Validated on assignment.
public string? Color { get; set; }
Property Value
FontName
Font name, or null to inherit.
public string? FontName { get; set; }
Property Value
Italic
Italic run.
public bool Italic { get; set; }
Property Value
Size
Font size in points, or null to inherit.
public double? Size { get; set; }
Property Value
Strikethrough
Struck-through run.
public bool Strikethrough { get; set; }
Property Value
Text
The run's text.
public string Text { get; }
Property Value
Underline
Underlined run.
public bool Underline { get; set; }
Property Value
Operators
implicit operator RichText(string)
Implicit conversion so plain strings can be mixed with formatted runs.
public static implicit operator RichText(string text)
Parameters
textstring