Label
Plain text with wrapping, trimming and controlled reveal.
Label displays plain text; use RichTextLabel for BBCode markup and embedded effects. Defaults are Left/Top alignment, wrapping Off, VisibleCharacters = -1 and MouseFilter = Ignore. Text stores the source string; display can be translated and uppercased while GetText returns the source.
For multiline text, set AutowrapMode and constrain width through layout; provide positive CustomMinimumSize.X or a maximum-width constraint. WordSmart wraps words and breaks oversized fragments. Avoid fixed heights without accounting for longer translations. ClipText permits area clipping; TextOverrunBehavior selects trimming/ellipsis — these are separate settings.
ParagraphSeparator defines paragraph splitting with escape-sequence processing; the default \n string means newline. GetLineCount counts laid-out lines after wrapping rather than separators; outside the tree it returns placeholder 1. MaxLinesVisible caps the line window and LinesSkipped skips initial lines without deleting Text. For current measurements, first call GetLineCount or GetMinimumSize, then GetVisibleLineCount/GetLineHeight/GetRenderedFontSize: some getters read already prepared data. GetVisibleLineCount describes fitting lines rather than counting actually painted letters.
For gradual reveal, set Text first, then VisibleCharacters or VisibleRatio. GetTotalCharacterCount counts translated-string Unicode codepoints, including newlines; it is neither C# string.Length, grapheme count nor glyph count. For example, A😀é has 4 codepoints, 5 UTF-16 units and 3 user-perceived text elements. Do not slice a C# string directly using that index.
CharsBeforeShaping is the default: input is cut before shaping, so wrapping and letter joining can change. CharsAfterShaping preserves full prepared layout and limits display by character positions. GlyphsAuto/Ltr/Rtl reveal directional glyphs rather than guaranteeing one whole emoji or composed character per step. Choose the mode and verify the relevant font for complex scripts.
Use VisibleCharacters = -1 for all text or a count from 0 through GetTotalCharacterCount. Excess counts are not clamped and can produce VisibleRatio > 1. Reassigning that same Ratio does not normalize the state; explicitly set 1 to show all. Ratios between 0 and 1 round position counts down while retaining the fraction. Replacing Text retains a partial fraction and recalculates position count — reset reveal explicitly for a new dialog line.
LabelSettings is a shared styling resource overriding corresponding theme settings; an absent resource font can fall back to the theme. Editing the shared resource affects every Label using it. ResizeFontToFit chooses a size within the Control area between MinimumFontSize and MaximumFontSize. Supply 1 ≤ minimum ≤ maximum; setters do not enforce this themselves. Even minimum size can fail to fit: fitting does not guarantee untrimmed text. GetRenderedFontSize reports the last calculated size without modifying the font resource.
GetCharacterBounds returns a local cluster-advance rectangle rather than a tight box of painted pixels. Several ligature positions can share a rectangle; missing/skipped positions return empty Rect2. With translations and Uppercase, indices refer to processed text.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
LabelConstructor
public Label();Creates a plain label: empty Text, Left/Top, AutowrapMode = Off, VisibleCharacters = -1, MouseFilter = Ignore, vertical SizeFlags ShrinkCenter.
Properties25
AutowrapModeProperty
public TextServer.AutowrapMode AutowrapMode { get; set; }Wrapping, default Off. WordSmart wraps words and breaks oversized fragments; Arbitrary uses grapheme boundaries. Requires bounded width; configure positive minimum or maximum width for stable layout.
AutowrapTrimFlagsProperty
public TextServer.LineBreakFlag AutowrapTrimFlags { get; set; }Line-edge space trimming, default TrimStartEdgeSpaces | TrimEndEdgeSpaces. Other LineBreakFlag bits are discarded rather than configuring wrapping.
ClipTextProperty
public bool ClipText { get; set; }Area clipping, default false. Releases natural text minimum width without automatically enabling ellipsis or removing CustomMinimumSize/style margins.
EllipsisCharProperty
public string EllipsisChar { get; set; }Trimming character, default …. Use one Unicode character; longer strings warn and truncate to the first. Does not automatically enable TextOverrunBehavior.
HorizontalAlignmentProperty
public HorizontalAlignment HorizontalAlignment { get; set; }Left/Center/Right/Fill text alignment inside the area, default Left. Left/Right respect RTL LayoutDirection; Fill uses JustificationFlags. Does not move the Control itself.
JustificationFlagsProperty
public TextServer.JustificationFlag JustificationFlags { get; set; }Text justification flags for HorizontalAlignment = Fill, including word boundaries, kashida and last-line rules. Do not enable Fill by themselves.
LabelSettingsProperty
public LabelSettings LabelSettings { get; set; }Shared styling resource overriding corresponding theme values; null returns styling to the theme. Resource changes invalidate shaping for Labels using it. Missing resource Font can fall back to theme font.
LanguageProperty
public string Language { get; set; }Text-shaping language for this Label. Does not change the global TranslationServer locale or select another translation catalog. Check message selection and glyph processing separately.
LinesSkippedProperty
public int LinesSkipped { get; set; }Nonnegative number of skipped lines, default 0. Does not remove Text characters; affects drawing window and CharacterBounds.
MaxLinesVisibleProperty
public int MaxLinesVisible { get; set; }Displayed-line cap, -1 for unlimited. Not GetLineCount and does not delete Text. Available height can further limit the result.
MaximumFontSizeProperty
public int MaximumFontSize { get; set; }Fitting upper bound, default 60. Does not cap ordinary theme/LabelSettings size while ResizeFontToFit is off. Supply positive maximum ≥ minimum.
MinimumFontSizeProperty
public int MinimumFontSize { get; set; }Fitting lower bound and minimum vertical-size basis, default 10. Validate 1 ≤ minimum ≤ maximum yourself: the setter does not constrain the number.
ParagraphSeparatorProperty
public string ParagraphSeparator { get; set; }Paragraph delimiter with c_unescape processing; default \n string means newline. Neither a regular expression nor paragraph spacing.
ResizeFontToFitProperty
public bool ResizeFontToFit { get; set; }Fit font size between MinimumFontSize/MaximumFontSize to area width/height, default false. Can grow or shrink. Trimming remains possible when even minimum size does not fit.
StructuredTextBidiOverrideProperty
public TextServer.StructuredTextParser StructuredTextBidiOverride { get; set; }Structured BiDi parser for URIs, file paths and other mixed-direction text. Processes text without opening targets or translating it.
StructuredTextBidiOverrideOptionsProperty
public Reckfell.Collections.Array StructuredTextBidiOverrideOptions { get; set; }Shared BiDi parser options Array. Alias edits do not invalidate shaping; reassigning the same array can also do nothing. Copy before editing and assign the new version.
TabStopsProperty
public float[] TabStops { get; set; }Pixel tab-stop positions. C# float[] is copied on get/set; edit a copy and assign it back. Neither space count nor container column sizes.
TextProperty
public string Text { get; set; }Source text or automatic-translation key. Label retains this source value while its internal display text changes with locale and context. Disable automatic translation for player-supplied text. Assigning the same value does not force translation lookup again.
TextDirectionProperty
public Control.TextDirection TextDirection { get; set; }Text-processing direction, default Auto. Inherited uses Control layout direction. Does not replace LayoutDirection for line placement or GlyphsAuto.
TextOverrunBehaviorProperty
public TextServer.OverrunBehavior TextOverrunBehavior { get; set; }Trimming when space is insufficient, default NoTrimming. Choose TrimChar/TrimWord or an Ellipsis mode. Does not change source Text; result depends on wrapping, area and visible-line limits.
UppercaseProperty
public bool Uppercase { get; set; }Uppercase display, default false. Text remains source. Conversion depends on language and can change displayed codepoint count.
VerticalAlignmentProperty
public VerticalAlignment VerticalAlignment { get; set; }Top/Center/Bottom/Fill inside the area, default Top. Does not replace LinesSkipped or change parent Control layout.
VisibleCharactersProperty
public int VisibleCharacters { get; set; }Reveal position count: -1 for all, otherwise use 0…GetTotalCharacterCount. Not C# char or grapheme count; interpretation depends on VisibleCharactersBehavior. Excess counts are not clamped and can put VisibleRatio above 1.
VisibleCharactersBehaviorProperty
public TextServer.VisibleCharactersBehavior VisibleCharactersBehavior { get; set; }Default CharsBeforeShaping cuts input before preparation; CharsAfterShaping keeps full layout. GlyphsAuto/Ltr/Rtl reveal directional glyphs rather than whole user-perceived text elements.
VisibleRatioProperty
public float VisibleRatio { get; set; }Reveal fraction, default 1. A changed fraction ≥1 shows all, negative gives 0, intermediate fractions floor position count. If VisibleCharacters already produced the same out-of-range ratio, reassignment does not normalize it. Supply finite 0…1 values.
Methods57
GetAutowrapModeTextServer.AutowrapMode
public TextServer.AutowrapMode GetAutowrapMode();Wrapping, default Off. WordSmart wraps words and breaks oversized fragments; Arbitrary uses grapheme boundaries. Requires bounded width; configure positive minimum or maximum width for stable layout.
TextServer.AutowrapModeStored AutowrapMode setting.
GetAutowrapTrimFlagsTextServer.LineBreakFlag
public TextServer.LineBreakFlag GetAutowrapTrimFlags();Line-edge space trimming, default TrimStartEdgeSpaces | TrimEndEdgeSpaces. Other LineBreakFlag bits are discarded rather than configuring wrapping.
TextServer.LineBreakFlagStored AutowrapTrimFlags setting.
GetCharacterBoundsRect2
public Rect2 GetCharacterBounds(int pos);Local cluster-advance rectangle for a codepoint position. Accounts for layout and skipped lines; multiple positions can share a box. Empty Rect2 means no corresponding box rather than necessarily an error. Not tight pixel bounds.
| Name | Type | Default |
|---|---|---|
pos | int | — |
posCodepoint position in processed text rather than a C# UTF-16 index.
Rect2Local cluster Rect2, or empty Rect2.
GetEllipsisCharstring
public string GetEllipsisChar();Trimming character, default …. Use one Unicode character; longer strings warn and truncate to the first. Does not automatically enable TextOverrunBehavior.
stringStored EllipsisChar setting.
GetHorizontalAlignmentHorizontalAlignment
public HorizontalAlignment GetHorizontalAlignment();Left/Center/Right/Fill text alignment inside the area, default Left. Left/Right respect RTL LayoutDirection; Fill uses JustificationFlags. Does not move the Control itself.
HorizontalAlignmentStored HorizontalAlignment setting.
GetJustificationFlagsTextServer.JustificationFlag
public TextServer.JustificationFlag GetJustificationFlags();Text justification flags for HorizontalAlignment = Fill, including word boundaries, kashida and last-line rules. Do not enable Fill by themselves.
TextServer.JustificationFlagStored JustificationFlags setting.
GetLabelSettingsLabelSettings
public LabelSettings GetLabelSettings();Shared styling resource overriding corresponding theme values; null returns styling to the theme. Resource changes invalidate shaping for Labels using it. Missing resource Font can fall back to theme font.
LabelSettingsShared LabelSettings, or null.
GetLanguagestring
public string GetLanguage();Shaping/case-conversion language; empty uses Control locale. Does not switch application locale or make GetText return translation.
stringStored language code, or empty for Control locale.
GetLineCountint
public int GetLineCount();Shapes text if needed and returns total wrapped-line count. Returns 1 outside the tree. Before-shaping reveal affects it; it is not the visible-on-screen line count.
intPrepared text line count; 1 outside the tree.
GetLineHeightint
public int GetLineHeight(int line = -1);Prepared line height in pixels. -1 or an out-of-range index returns maximum line/font height rather than an error. Prepare layout through GetLineCount before measuring.
| Name | Type | Default |
|---|---|---|
line | int | -1 |
linePrepared-line index; default -1 returns maximum height.
intLine height, or maximum height for -1/out-of-range indices.
GetLinesSkippedint
public int GetLinesSkipped();Nonnegative number of skipped lines, default 0. Does not remove Text characters; affects drawing window and CharacterBounds.
intSkipped-line count.
GetMaxLinesVisibleint
public int GetMaxLinesVisible();Displayed-line cap, -1 for unlimited. Not GetLineCount and does not delete Text. Available height can further limit the result.
intLine cap; -1 means unlimited.
GetMaximumFontSizeint
public int GetMaximumFontSize();Fitting upper bound, default 60. Does not cap ordinary theme/LabelSettings size while ResizeFontToFit is off. Supply positive maximum ≥ minimum.
intStored upper fitting-size bound.
GetMinimumFontSizeint
public int GetMinimumFontSize();Fitting lower bound and minimum vertical-size basis, default 10. Validate 1 ≤ minimum ≤ maximum yourself: the setter does not constrain the number.
intStored lower fitting-size bound.
GetParagraphSeparatorstring
public string GetParagraphSeparator();Paragraph delimiter with c_unescape processing; default \n string means newline. Neither a regular expression nor paragraph spacing.
stringStored separator string before c_unescape.
GetRenderedFontSizeint
public int GetRenderedFontSize();Last calculated font size or base size. Getter does not run new fitting: call GetLineCount/GetMinimumSize after area/setting changes first.
intCurrent cached or base font size.
GetStructuredTextBidiOverrideTextServer.StructuredTextParser
public TextServer.StructuredTextParser GetStructuredTextBidiOverride();Structured BiDi parser for URIs, file paths and other mixed-direction text. Processes text without opening targets or translating it.
TextServer.StructuredTextParserStored StructuredTextBidiOverride setting.
GetStructuredTextBidiOverrideOptionsReckfell.Collections.Array
public Reckfell.Collections.Array GetStructuredTextBidiOverrideOptions();Shared BiDi parser options Array. Alias edits do not invalidate shaping; reassigning the same array can also do nothing. Copy before editing and assign the new version.
Reckfell.Collections.ArrayShared options Array rather than an independent copy.
GetTabStopsfloat[]
public float[] GetTabStops();Pixel tab-stop positions. C# float[] is copied on get/set; edit a copy and assign it back. Neither space count nor container column sizes.
float[]C# float[] copy of tab-stop positions.
GetTextstring
public string GetText();Source plain text rather than BBCode. Getter returns source while character counts use translated text. Replacing text with partial VisibleRatio recalculates VisibleCharacters from that fraction.
stringSource string before translation/Uppercase/reveal.
GetTextDirectionControl.TextDirection
public Control.TextDirection GetTextDirection();Text-processing direction, default Auto. Inherited uses Control layout direction. Does not replace LayoutDirection for line placement or GlyphsAuto.
Control.TextDirectionStored TextDirection setting.
GetTextOverrunBehaviorTextServer.OverrunBehavior
public TextServer.OverrunBehavior GetTextOverrunBehavior();Trimming when space is insufficient, default NoTrimming. Choose TrimChar/TrimWord or an Ellipsis mode. Does not change source Text; result depends on wrapping, area and visible-line limits.
TextServer.OverrunBehaviorStored TextOverrunBehavior setting.
GetTotalCharacterCountint
public int GetTotalCharacterCount();Returns the length of the Label’s internal translated text. Can differ from the length of Text, which retains the source key. This is not a rendered glyph count or a test for clipping.
intLength of the internal text after automatic translation, not the source-key length or the number of visible lines.
GetVerticalAlignmentVerticalAlignment
public VerticalAlignment GetVerticalAlignment();Top/Center/Bottom/Fill inside the area, default Top. Does not replace LinesSkipped or change parent Control layout.
VerticalAlignmentStored VerticalAlignment setting.
GetVisibleCharactersint
public int GetVisibleCharacters();Reveal position count: -1 for all, otherwise use 0…GetTotalCharacterCount. Not C# char or grapheme count; interpretation depends on VisibleCharactersBehavior. Excess counts are not clamped and can put VisibleRatio above 1.
intStored position count; -1 means all.
GetVisibleCharactersBehaviorTextServer.VisibleCharactersBehavior
public TextServer.VisibleCharactersBehavior GetVisibleCharactersBehavior();Default CharsBeforeShaping cuts input before preparation; CharsAfterShaping keeps full layout. GlyphsAuto/Ltr/Rtl reveal directional glyphs rather than whole user-perceived text elements.
TextServer.VisibleCharactersBehaviorStored VisibleCharactersBehavior setting.
GetVisibleLineCountint
public int GetVisibleLineCount();Counts fitting prepared-layout lines subject to LinesSkipped/MaxLinesVisible and height. Does not itself shape: call GetLineCount/GetMinimumSize after changes first. Not a count of actually revealed glyphs.
intFitting line count from current prepared layout.
GetVisibleRatiofloat
public float GetVisibleRatio();Reveal fraction, default 1. A changed fraction ≥1 shows all, negative gives 0, intermediate fractions floor position count. If VisibleCharacters already produced the same out-of-range ratio, reassignment does not normalize it. Supply finite 0…1 values.
floatStored fraction; VisibleCharacters assignment can put it outside 0…1.
IsClippingTextbool
public bool IsClippingText();Area clipping, default false. Releases natural text minimum width without automatically enabling ellipsis or removing CustomMinimumSize/style margins.
boolStored ClipText setting.
IsResizeFontToFitEnabledbool
public bool IsResizeFontToFitEnabled();Fit font size between MinimumFontSize/MaximumFontSize to area width/height, default false. Can grow or shrink. Trimming remains possible when even minimum size does not fit.
boolStored ResizeFontToFit setting.
IsUppercasebool
public bool IsUppercase();Uppercase display, default false. Text remains source. Conversion depends on language and can change displayed codepoint count.
boolStored Uppercase setting.
SetAutowrapModevoid
public void SetAutowrapMode(TextServer.AutowrapMode autowrapMode);Wrapping, default Off. WordSmart wraps words and breaks oversized fragments; Arbitrary uses grapheme boundaries. Requires bounded width; configure positive minimum or maximum width for stable layout.
| Name | Type | Default |
|---|---|---|
autowrapMode | TextServer.AutowrapMode | — |
autowrapModeWrapping, default Off. WordSmart wraps words and breaks oversized fragments; Arbitrary uses grapheme boundaries. Requires bounded width; configure positive minimum or maximum width for stable layout.
SetAutowrapTrimFlagsvoid
public void SetAutowrapTrimFlags(TextServer.LineBreakFlag autowrapTrimFlags);Line-edge space trimming, default TrimStartEdgeSpaces | TrimEndEdgeSpaces. Other LineBreakFlag bits are discarded rather than configuring wrapping.
| Name | Type | Default |
|---|---|---|
autowrapTrimFlags | TextServer.LineBreakFlag | — |
autowrapTrimFlagsLine-edge space trimming, default TrimStartEdgeSpaces | TrimEndEdgeSpaces. Other LineBreakFlag bits are discarded rather than configuring wrapping.
SetClipTextvoid
public void SetClipText(bool enable);Area clipping, default false. Releases natural text minimum width without automatically enabling ellipsis or removing CustomMinimumSize/style margins.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
enableArea clipping, default false. Releases natural text minimum width without automatically enabling ellipsis or removing CustomMinimumSize/style margins.
SetEllipsisCharvoid
public void SetEllipsisChar(string @char);Trimming character, default …. Use one Unicode character; longer strings warn and truncate to the first. Does not automatically enable TextOverrunBehavior.
| Name | Type | Default |
|---|---|---|
char | string | — |
charTrimming character, default …. Use one Unicode character; longer strings warn and truncate to the first. Does not automatically enable TextOverrunBehavior.
SetHorizontalAlignmentvoid
public void SetHorizontalAlignment(HorizontalAlignment alignment);Left/Center/Right/Fill text alignment inside the area, default Left. Left/Right respect RTL LayoutDirection; Fill uses JustificationFlags. Does not move the Control itself.
| Name | Type | Default |
|---|---|---|
alignment | HorizontalAlignment | — |
alignmentLeft/Center/Right/Fill text alignment inside the area, default Left. Left/Right respect RTL LayoutDirection; Fill uses JustificationFlags. Does not move the Control itself.
SetJustificationFlagsvoid
public void SetJustificationFlags(TextServer.JustificationFlag justificationFlags);Text justification flags for HorizontalAlignment = Fill, including word boundaries, kashida and last-line rules. Do not enable Fill by themselves.
| Name | Type | Default |
|---|---|---|
justificationFlags | TextServer.JustificationFlag | — |
justificationFlagsText justification flags for HorizontalAlignment = Fill, including word boundaries, kashida and last-line rules. Do not enable Fill by themselves.
SetLabelSettingsvoid
public void SetLabelSettings(LabelSettings settings);Shared styling resource overriding corresponding theme values; null returns styling to the theme. Resource changes invalidate shaping for Labels using it. Missing resource Font can fall back to theme font.
| Name | Type | Default |
|---|---|---|
settings | LabelSettings | — |
settingsShared styling resource overriding corresponding theme values; null returns styling to the theme. Resource changes invalidate shaping for Labels using it. Missing resource Font can fall back to theme font.
SetLanguagevoid
public void SetLanguage(string language);Shaping/case-conversion language; empty uses Control locale. Does not switch application locale or make GetText return translation.
| Name | Type | Default |
|---|---|---|
language | string | — |
languageShaping/case-conversion language; empty uses Control locale. Does not switch application locale or make GetText return translation.
SetLinesSkippedvoid
public void SetLinesSkipped(int linesSkipped);Nonnegative number of skipped lines, default 0. Does not remove Text characters; affects drawing window and CharacterBounds.
| Name | Type | Default |
|---|---|---|
linesSkipped | int | — |
linesSkippedNonnegative number of skipped lines, default 0. Does not remove Text characters; affects drawing window and CharacterBounds.
SetMaxLinesVisiblevoid
public void SetMaxLinesVisible(int linesVisible);Displayed-line cap, -1 for unlimited. Not GetLineCount and does not delete Text. Available height can further limit the result.
| Name | Type | Default |
|---|---|---|
linesVisible | int | — |
linesVisibleDisplayed-line cap, -1 for unlimited. Not GetLineCount and does not delete Text. Available height can further limit the result.
SetMaximumFontSizevoid
public void SetMaximumFontSize(int size);Fitting upper bound, default 60. Does not cap ordinary theme/LabelSettings size while ResizeFontToFit is off. Supply positive maximum ≥ minimum.
| Name | Type | Default |
|---|---|---|
size | int | — |
sizeFitting upper bound, default 60. Does not cap ordinary theme/LabelSettings size while ResizeFontToFit is off. Supply positive maximum ≥ minimum.
SetMinimumFontSizevoid
public void SetMinimumFontSize(int size);Fitting lower bound and minimum vertical-size basis, default 10. Validate 1 ≤ minimum ≤ maximum yourself: the setter does not constrain the number.
| Name | Type | Default |
|---|---|---|
size | int | — |
sizeFitting lower bound and minimum vertical-size basis, default 10. Validate 1 ≤ minimum ≤ maximum yourself: the setter does not constrain the number.
SetParagraphSeparatorvoid
public void SetParagraphSeparator(string paragraphSeparator);Paragraph delimiter with c_unescape processing; default \n string means newline. Neither a regular expression nor paragraph spacing.
| Name | Type | Default |
|---|---|---|
paragraphSeparator | string | — |
paragraphSeparatorParagraph delimiter with c_unescape processing; default \n string means newline. Neither a regular expression nor paragraph spacing.
SetResizeFontToFitvoid
public void SetResizeFontToFit(bool enabled);Fit font size between MinimumFontSize/MaximumFontSize to area width/height, default false. Can grow or shrink. Trimming remains possible when even minimum size does not fit.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledFit font size between MinimumFontSize/MaximumFontSize to area width/height, default false. Can grow or shrink. Trimming remains possible when even minimum size does not fit.
SetStructuredTextBidiOverridevoid
public void SetStructuredTextBidiOverride(TextServer.StructuredTextParser parser);Structured BiDi parser for URIs, file paths and other mixed-direction text. Processes text without opening targets or translating it.
| Name | Type | Default |
|---|---|---|
parser | TextServer.StructuredTextParser | — |
parserStructured BiDi parser for URIs, file paths and other mixed-direction text. Processes text without opening targets or translating it.
SetStructuredTextBidiOverrideOptionsvoid
public void SetStructuredTextBidiOverrideOptions(Reckfell.Collections.Array args);Shared BiDi parser options Array. Alias edits do not invalidate shaping; reassigning the same array can also do nothing. Copy before editing and assign the new version.
| Name | Type | Default |
|---|---|---|
args | Reckfell.Collections.Array | — |
argsShared BiDi parser options Array. Alias edits do not invalidate shaping; reassigning the same array can also do nothing. Copy before editing and assign the new version.
SetTabStops2 overloads
public void SetTabStops(ReadOnlySpan<float> tabStops);Pixel tab-stop positions. C# float[] is copied on get/set; edit a copy and assign it back. Neither space count nor container column sizes.
| Name | Type | Default |
|---|---|---|
tabStops | ReadOnlySpan<float> | — |
tabStopsPixel tab-stop positions. C# float[] is copied on get/set; edit a copy and assign it back. Neither space count nor container column sizes.
public void SetTabStops(float[] tabStops);Pixel tab-stop positions. C# float[] is copied on get/set; edit a copy and assign it back. Neither space count nor container column sizes.
| Name | Type | Default |
|---|---|---|
tabStops | float[] | — |
tabStopsPixel tab-stop positions. C# float[] is copied on get/set; edit a copy and assign it back. Neither space count nor container column sizes.
SetTextvoid
public void SetText(string text);Source plain text rather than BBCode. Getter returns source while character counts use translated text. Replacing text with partial VisibleRatio recalculates VisibleCharacters from that fraction.
| Name | Type | Default |
|---|---|---|
text | string | — |
textSource plain text rather than BBCode. Getter returns source while character counts use translated text. Replacing text with partial VisibleRatio recalculates VisibleCharacters from that fraction.
SetTextDirectionvoid
public void SetTextDirection(Control.TextDirection direction);Text-processing direction, default Auto. Inherited uses Control layout direction. Does not replace LayoutDirection for line placement or GlyphsAuto.
| Name | Type | Default |
|---|---|---|
direction | Control.TextDirection | — |
directionText-processing direction, default Auto. Inherited uses Control layout direction. Does not replace LayoutDirection for line placement or GlyphsAuto.
SetTextOverrunBehaviorvoid
public void SetTextOverrunBehavior(TextServer.OverrunBehavior overrunBehavior);Trimming when space is insufficient, default NoTrimming. Choose TrimChar/TrimWord or an Ellipsis mode. Does not change source Text; result depends on wrapping, area and visible-line limits.
| Name | Type | Default |
|---|---|---|
overrunBehavior | TextServer.OverrunBehavior | — |
overrunBehaviorTrimming when space is insufficient, default NoTrimming. Choose TrimChar/TrimWord or an Ellipsis mode. Does not change source Text; result depends on wrapping, area and visible-line limits.
SetUppercasevoid
public void SetUppercase(bool enable);Uppercase display, default false. Text remains source. Conversion depends on language and can change displayed codepoint count.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
enableUppercase display, default false. Text remains source. Conversion depends on language and can change displayed codepoint count.
SetVerticalAlignmentvoid
public void SetVerticalAlignment(VerticalAlignment alignment);Top/Center/Bottom/Fill inside the area, default Top. Does not replace LinesSkipped or change parent Control layout.
| Name | Type | Default |
|---|---|---|
alignment | VerticalAlignment | — |
alignmentTop/Center/Bottom/Fill inside the area, default Top. Does not replace LinesSkipped or change parent Control layout.
SetVisibleCharactersvoid
public void SetVisibleCharacters(int amount);Reveal position count: -1 for all, otherwise use 0…GetTotalCharacterCount. Not C# char or grapheme count; interpretation depends on VisibleCharactersBehavior. Excess counts are not clamped and can put VisibleRatio above 1.
| Name | Type | Default |
|---|---|---|
amount | int | — |
amountReveal position count: -1 for all, otherwise use 0…GetTotalCharacterCount. Not C# char or grapheme count; interpretation depends on VisibleCharactersBehavior. Excess counts are not clamped and can put VisibleRatio above 1.
SetVisibleCharactersBehaviorvoid
public void SetVisibleCharactersBehavior(TextServer.VisibleCharactersBehavior behavior);Default CharsBeforeShaping cuts input before preparation; CharsAfterShaping keeps full layout. GlyphsAuto/Ltr/Rtl reveal directional glyphs rather than whole user-perceived text elements.
| Name | Type | Default |
|---|---|---|
behavior | TextServer.VisibleCharactersBehavior | — |
behaviorDefault CharsBeforeShaping cuts input before preparation; CharsAfterShaping keeps full layout. GlyphsAuto/Ltr/Rtl reveal directional glyphs rather than whole user-perceived text elements.
SetVisibleRatiovoid
public void SetVisibleRatio(float ratio);Reveal fraction, default 1. A changed fraction ≥1 shows all, negative gives 0, intermediate fractions floor position count. If VisibleCharacters already produced the same out-of-range ratio, reassignment does not normalize it. Supply finite 0…1 values.
| Name | Type | Default |
|---|---|---|
ratio | float | — |
ratioReveal fraction, default 1. A changed fraction ≥1 shows all, negative gives 0, intermediate fractions floor position count. If VisibleCharacters already produced the same out-of-range ratio, reassignment does not normalize it. Supply finite 0…1 values.
Theme properties
These are Theme resource keys, not C# properties. Use the matching Control GetTheme…() and AddTheme…Override() methods for each value type.
| Key and type | Description |
|---|---|
font_colorColor | Default text Color(1, 1, 1, 1) |
font_outline_colorColor | The color of text outline. Default:Color(0, 0, 0, 1) |
font_shadow_colorColor |
Color(0, 0, 0, 0) |
line_spacingint | Additional vertical spacing between lines (in pixels), spacing is added to line descent. This value can be negative. Default:3 |
outline_sizeint | Text outline size.
Note: If using a font with 0 |
paragraph_spacingint | Vertical space between paragraphs. Added on top of 0 |
shadow_offset_xint | The horizontal offset of the text's shadow. Default:1 |
shadow_offset_yint | The vertical offset of the text's shadow. Default:1 |
shadow_outline_sizeint | The size of the shadow outline. Default:1 |
fontFont | |
font_sizeint | Font size of the |
focusStyleBox |
|
normalStyleBox |