Class ColorSpan
A markup node that specifies the color with which its contents are printed.
public sealed class ColorSpan : InlineContainer
- Inheritance
-
ColorSpan
- Inherited Members
Constructors
ColorSpan(Inline, Color)
Creates a color span from the given contents and foreground color.
public ColorSpan(Inline contents, Color foregroundColor)
Parameters
contentsInlineThe contents to print.
foregroundColorColorThe foreground color to print the contents with.
ColorSpan(Inline, Color, Color)
Creates a color span from the given contents, foreground color and background color.
public ColorSpan(Inline contents, Color foregroundColor, Color backgroundColor)
Parameters
contentsInlineThe contents to print.
foregroundColorColorThe foreground color to print the contents with.
backgroundColorColorThe background color to print the contents with.
Properties
BackgroundColor
Gets the background color that is applied to this span's contents.
public Color BackgroundColor { get; }
Property Value
- Color
The background color.
ForegroundColor
Gets the foreground color that is applied to this span's contents.
public Color ForegroundColor { get; }
Property Value
- Color
The foreground color.
Methods
Lower()
Attempts to express this inline node in simpler semantic markup.
public override Inline Lower()
Returns
WithContents(Inline)
Creates a copy of this node with new contents.
public override InlineContainer WithContents(Inline newContents)
Parameters
newContentsInline