Class ColorSpan

Namespace
Pixie.Markup
Assembly
Pixie.dll

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

contents Inline

The contents to print.

foregroundColor Color

The 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

contents Inline

The contents to print.

foregroundColor Color

The foreground color to print the contents with.

backgroundColor Color

The 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

Inline

WithContents(Inline)

Creates a copy of this node with new contents.

public override InlineContainer WithContents(Inline newContents)

Parameters

newContents Inline

Returns

InlineContainer