LinkButton
Text link button with optional OS-level URI opening.
LinkButton uses BaseButton behavior and draws underlined text. Defaults are Underline = Always, TextOverrunBehavior = NoTrimming and empty Uri. For ordinary Tab navigation, explicitly set FocusMode = All: the constructor uses Accessibility.
Text is the visible label and Uri is a separate target. Assigning Uri neither opens it nor changes Text. Activation passes nonempty Uri to the OS through shell_open, including programmatic Press. This is neither an embedded browser nor a website router. Pressed handlers run after the built-in action and do not cancel it. For custom navigation or a dialog, leave Uri empty and handle Pressed yourself.
Long text normally contributes to minimum width. To trim it, set TextOverrunBehavior and constrain width through parent layout. EllipsisChar selects one Unicode character instead of the default ellipsis; longer strings warn and truncate to the first character. Trimming does not modify Text or Uri. LinkButton uses single-line display rather than Button wrapping.
Language selects text-processing language and TextDirection selects direction; neither translates the source string by itself. StructuredTextBidiOverride chooses structured-text processing, such as URI or email, so mixed LTR/RTL fragments follow their structure. It processes the label rather than validating or opening Uri.
StructuredTextBidiOverrideOptions shares its Array on get/set. Editing the returned array changes stored options without triggering reshaping. For predictable updates, first create an independent Array, edit it and assign it back. Nested mutable values can remain shared with a shallow copy.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
LinkButtonConstructor
public LinkButton();Creates a text link: empty Uri, Underline = Always, FocusMode = Accessibility, PointingHand cursor. Set FocusMode = All for ordinary Tab navigation.
Properties9
EllipsisCharProperty
public string EllipsisChar { get; set; }Trimming character, default …. Use one Unicode character: longer strings warn and retain the first. Does not change selected TextOverrunBehavior.
LanguageProperty
public string Language { get; set; }Shaping language; empty uses Control locale. Does not switch application locale or replace source Text with a translation.
StructuredTextBidiOverrideProperty
public TextServer.StructuredTextParser StructuredTextBidiOverride { get; set; }Label-structure BiDi parser, default Default. URI/Email/File and other modes process mixed-direction text rather than opening targets or translating the label.
StructuredTextBidiOverrideOptionsProperty
public Reckfell.Collections.Array StructuredTextBidiOverrideOptions { get; set; }Shared Array of structured BiDi parser options. Get/set share the array; alias edits do not trigger reshaping. Edit an independent copy and assign it back to refresh.
TextProperty
public string Text { get; set; }Source label, empty by default. Getter returns text before translation/trimming. Does not automatically set Uri.
TextDirectionProperty
public Control.TextDirection TextDirection { get; set; }Text direction, default Auto. Inherited uses Control LayoutDirection. Does not validate Uri direction or correctness.
TextOverrunBehaviorProperty
public TextServer.OverrunBehavior TextOverrunBehavior { get; set; }Single-line label trimming when width is insufficient, default NoTrimming. Enabling removes natural text minimum width; parent layout constrains the area. Text/Uri stay unchanged.
UnderlineProperty
public LinkButton.UnderlineMode Underline { get; set; }Always, OnHover or Never, default Always. OnHover also underlines pressed states. Controls drawing rather than clickability.
UriProperty
public string Uri { get; set; }OS-opening target, empty by default. Setter only stores it; activation with nonempty Uri invokes shell_open, including Press. Leave empty for custom actions; Pressed does not cancel built-in opening.
Methods18
GetEllipsisCharstring
public string GetEllipsisChar();Trimming character, default …. Use one Unicode character: longer strings warn and retain the first. Does not change selected TextOverrunBehavior.
stringStored trimming-character string.
GetLanguagestring
public string GetLanguage();Shaping language; empty uses Control locale. Does not switch application locale or replace source Text with a translation.
stringStored language code, or empty for Control locale.
GetStructuredTextBidiOverrideTextServer.StructuredTextParser
public TextServer.StructuredTextParser GetStructuredTextBidiOverride();Label-structure BiDi parser, default Default. URI/Email/File and other modes process mixed-direction text rather than opening targets or translating the label.
TextServer.StructuredTextParserSelected TextServer.StructuredTextParser.
GetStructuredTextBidiOverrideOptionsReckfell.Collections.Array
public Reckfell.Collections.Array GetStructuredTextBidiOverrideOptions();Shared Array of structured BiDi parser options. Get/set share the array; alias edits do not trigger reshaping. Edit an independent copy and assign it back to refresh.
Reckfell.Collections.ArrayShared options Array; editing changes the stored array.
GetTextstring
public string GetText();Source label, empty by default. Getter returns text before translation/trimming. Does not automatically set Uri.
stringSource label before translation and trimming.
GetTextDirectionControl.TextDirection
public Control.TextDirection GetTextDirection();Text direction, default Auto. Inherited uses Control LayoutDirection. Does not validate Uri direction or correctness.
Control.TextDirectionStored Control.TextDirection.
GetTextOverrunBehaviorTextServer.OverrunBehavior
public TextServer.OverrunBehavior GetTextOverrunBehavior();Single-line label trimming when width is insufficient, default NoTrimming. Enabling removes natural text minimum width; parent layout constrains the area. Text/Uri stay unchanged.
TextServer.OverrunBehaviorSelected TextServer.OverrunBehavior.
GetUnderlineModeLinkButton.UnderlineMode
public LinkButton.UnderlineMode GetUnderlineMode();Always, OnHover or Never, default Always. OnHover also underlines pressed states. Controls drawing rather than clickability.
LinkButton.UnderlineModeSelected LinkButton.UnderlineMode.
GetUristring
public string GetUri();OS-opening target, empty by default. Setter only stores it; activation with nonempty Uri invokes shell_open, including Press. Leave empty for custom actions; Pressed does not cancel built-in opening.
stringStored opening target, or empty string.
SetEllipsisCharvoid
public void SetEllipsisChar(string @char);Trimming character, default …. Use one Unicode character: longer strings warn and retain the first. Does not change selected TextOverrunBehavior.
| Name | Type | Default |
|---|---|---|
char | string | — |
charTrimming character, default …. Use one Unicode character: longer strings warn and retain the first. Does not change selected TextOverrunBehavior.
SetLanguagevoid
public void SetLanguage(string language);Shaping language; empty uses Control locale. Does not switch application locale or replace source Text with a translation.
| Name | Type | Default |
|---|---|---|
language | string | — |
languageShaping language; empty uses Control locale. Does not switch application locale or replace source Text with a translation.
SetStructuredTextBidiOverridevoid
public void SetStructuredTextBidiOverride(TextServer.StructuredTextParser parser);Label-structure BiDi parser, default Default. URI/Email/File and other modes process mixed-direction text rather than opening targets or translating the label.
| Name | Type | Default |
|---|---|---|
parser | TextServer.StructuredTextParser | — |
parserLabel-structure BiDi parser, default Default. URI/Email/File and other modes process mixed-direction text rather than opening targets or translating the label.
SetStructuredTextBidiOverrideOptionsvoid
public void SetStructuredTextBidiOverrideOptions(Reckfell.Collections.Array args);Shared Array of structured BiDi parser options. Get/set share the array; alias edits do not trigger reshaping. Edit an independent copy and assign it back to refresh.
| Name | Type | Default |
|---|---|---|
args | Reckfell.Collections.Array | — |
argsShared Array of structured BiDi parser options. Get/set share the array; alias edits do not trigger reshaping. Edit an independent copy and assign it back to refresh.
SetTextvoid
public void SetText(string text);Source label, empty by default. Getter returns text before translation/trimming. Does not automatically set Uri.
| Name | Type | Default |
|---|---|---|
text | string | — |
textSource label, empty by default. Getter returns text before translation/trimming. Does not automatically set Uri.
SetTextDirectionvoid
public void SetTextDirection(Control.TextDirection direction);Text direction, default Auto. Inherited uses Control LayoutDirection. Does not validate Uri direction or correctness.
| Name | Type | Default |
|---|---|---|
direction | Control.TextDirection | — |
directionText direction, default Auto. Inherited uses Control LayoutDirection. Does not validate Uri direction or correctness.
SetTextOverrunBehaviorvoid
public void SetTextOverrunBehavior(TextServer.OverrunBehavior overrunBehavior);Single-line label trimming when width is insufficient, default NoTrimming. Enabling removes natural text minimum width; parent layout constrains the area. Text/Uri stay unchanged.
| Name | Type | Default |
|---|---|---|
overrunBehavior | TextServer.OverrunBehavior | — |
overrunBehaviorSingle-line label trimming when width is insufficient, default NoTrimming. Enabling removes natural text minimum width; parent layout constrains the area. Text/Uri stay unchanged.
SetUnderlineModevoid
public void SetUnderlineMode(LinkButton.UnderlineMode underlineMode);Always, OnHover or Never, default Always. OnHover also underlines pressed states. Controls drawing rather than clickability.
| Name | Type | Default |
|---|---|---|
underlineMode | LinkButton.UnderlineMode | — |
underlineModeAlways, OnHover or Never, default Always. OnHover also underlines pressed states. Controls drawing rather than clickability.
SetUrivoid
public void SetUri(string uri);OS-opening target, empty by default. Setter only stores it; activation with nonempty Uri invokes shell_open, including Press. Leave empty for custom actions; Pressed does not cancel built-in opening.
| Name | Type | Default |
|---|---|---|
uri | string | — |
uriOS-opening target, empty by default. Setter only stores it; activation with nonempty Uri invokes shell_open, including Press. Leave empty for custom actions; Pressed does not cancel built-in opening.
LinkButton.UnderlineMode
| Value | Description |
|---|---|
Always = 0 | The LinkButton will always show an underline at the bottom of its text. |
Never = 2 | The LinkButton will never show an underline at the bottom of its text. |
OnHover = 1 | The LinkButton will show an underline at the bottom of its text when the mouse cursor is over it. |
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(0.875, 0.875, 0.875, 1) |
font_disabled_colorColor | Text Color(0, 0, 0, 1) |
font_focus_colorColor | Text Color(0.95, 0.95, 0.95, 1) |
font_hover_colorColor | Text Color(0.95, 0.95, 0.95, 1) |
font_hover_pressed_colorColor | Text Color(0, 0, 0, 1) |
font_outline_colorColor | The tint of text outline of the Color(0, 0, 0, 1) |
font_pressed_colorColor | Text Color(1, 1, 1, 1) |
outline_sizeint | The size of the text outline.
Note: If using a font with 0 |
underline_spacingint | The vertical space between the baseline of text and the underline. Default:2 |
fontFont |
|
font_sizeint | Font size of the |
focusStyleBox |
|