Link

A tappable run of text inside a TextView's TextView.Spans.

It renders like a Span but fires Command when tapped and shows ContextMenu as a native hold-to-peek menu.

Inside a plain Label it is styled text only: the command and menu are ignored, since a Label is not interactive.

public sealed class Link : Span

Constructors

Creates a link.

public Link(
  string text)
ParameterSummary
string textThe run's text.

Properties

Command

The command run when the link is tapped.

Type: ICommand?

public ICommand? Command { get; set; }

CommandParameter

The parameter passed to Command.

Type: object?

public object? CommandParameter { get; set; }

ContextMenu

Entries shown in the link's long-press peek menu, or empty for a plain tappable link.

Type: IList<MenuAction>

public IList<MenuAction> ContextMenu { get; }