For the complete documentation index, see llms.txt. This page is also available as Markdown.

TextElement

This element will display a text. It is drawn directly instead of through a TextBlock, which allows it to be trimmed, scaled down and aligned on the decimal point.

Either set Text, or set Firstname and Lastname and let NameFormat combine the two. Text wins when both are set.

Properties

Name
Type
Description

Text

String

The text to display. It is also the content property, so it can be written between the tags.

Firstname

String

Used together with Lastname when Text is empty.

Lastname

String

Used together with Firstname when Text is empty.

NameFormat

String

How the two are combined, with {0} for Firstname and {1} for Lastname. Default {0} {1}.

TextAlignment

Enum

Left, Right, Center or DecimalPoint. Default Left.

DecimalPointPadding

Double

Distance kept between the decimal point and the right edge when TextAlignment is DecimalPoint. Default 20.

TextTrimming

Enum

What happens when the text is wider than the element. Default NoTrimming.

StrikeThrough

Boolean

Draws a line through the text. Default false.

LineHeight

Double

Line height used for multi-line text. Unset by default, which uses the height of the font.

Casing

Enum

AsIs, Lowercase or Uppercase. Default AsIs.

Trimming

TextTrimming decides what happens to a text that does not fit into the element:

Value
Description

NoTrimming

The text is drawn as it is and is cut off at the edge.

Trim

The text is cut at the last character that still fits and ends with a dot.

TrimLastWord

The text is cut at the last whole word that still fits.

TrimFirstname

Firstname is shortened to its initial, and the result is scaled down if it still does not fit.

Scale

The font size is reduced until the text fits.

Multiple lines

A Text containing a line break is drawn line by line, and every line is aligned on its own according to TextAlignment.

Example