This document specifies the current behavior and design of the Link control as implemented.
For end-user usage and examples, see Link.
Markup or build Link explicitly).1).Text : string? (display text)Uri : string? (hyperlink target)Trimming : TextTrimming (currently only EndEllipsis has special handling)Opened (bubbling routed event), args: LinkOpenedEventArgs.UriFocusable = true.Text is null/empty, the rendered text falls back to Uri.src/XenoAtom.Terminal.UI/Controls/Link.cssrc/XenoAtom.Terminal.UI/Styling/LinkStyle.cssrc/XenoAtom.Terminal.UI.Tests/LinkTests.cs (OSC 8 emission)samples/ControlsDemo/Demos/LinkDemo.csText ?? Uri ?? "".TerminalTextUtility.GetWidth(...) and height is always 1.SizeHints.Fixed.Uri is non-empty, the renderer calls buffer.RegisterHyperlink(uri) and passes the returned token to WriteText/SetCell.Uri is null/empty, no hyperlink token is used (the link renders as text only).Whether OSC 8 escapes are emitted depends on the terminal backend and its capabilities.
Trimming = TextTrimming.EndEllipsis, the link renders a prefix plus an ellipsis glyph (U+2026) so the result fits.LinkStyle resolves a Style based on:
enabled (disabled uses a dimmed style and theme.Disabled foreground when available)focused / hovered (defaults to underline + accent foreground, with bold for focus/hover)By default, links are underlined and use theme.Accent as foreground when available.
Opened if the pointer is released inside the bounds.Enter or Space triggers Opened when enabled.The control does not perform navigation; it only raises an event containing the URI.
LinkTests.Write_Emits_Osc8_When_Supported verifies OSC 8 escape sequences are present in output when writing a link.LinkDemo demonstrates trimming and reminds users that OSC 8 support depends on the terminal.