Table of Contents

Class TextRun

Namespace
nanoFramework.Presentation.Controls
Assembly
nanoFramework.Graphics.dll

Represents a text run with a specific font and color.

public class TextRun
Inheritance
TextRun
Inherited Members
Extension Methods

Constructors

TextRun(string, Font, Color)

Initializes a new instance of the TextRun class with the specified text, font, and foreground color.

public TextRun(string text, Font font, Color foreColor)

Parameters

text string

The text of the text run.

font Font

The font of the text run.

foreColor Color

The foreground color of the text run.

Fields

Font

Gets the font of the current text run.

public readonly Font Font

Field Value

Font

ForeColor

Gets the foreground color of the current text run.

public readonly Color ForeColor

Field Value

Color

Text

Gets the text of the current text run.

public readonly string Text

Field Value

string

_height

Gets or sets the height.

protected int _height

Field Value

int

_width

Gets or sets the width.

protected int _width

Field Value

int

Properties

EndOfLine

Gets a text run that represents the end of a line.

public static TextRun EndOfLine { get; }

Property Value

TextRun

Methods

GetSize(out int, out int)

Gets the size of the current text run.

public void GetSize(out int width, out int height)

Parameters

width int

When this method returns, contains the width of the text run.

height int

When this method returns, contains the height of the text run.