Table of Contents

Property Url

Namespace
Terminal.Gui.Views
Assembly
Terminal.Gui.dll

Gets or sets the URL (hyperlink target) associated with this Link.

public string Url { get; set; }

Property Value

string

Any string value is accepted. URL validation occurs at draw time: if the value is not a well-formed absolute URI (per IsWellFormedUriString(string, UriKind)), the link renders with the Disabled style and no OSC 8 hyperlink sequence is emitted.

When Text is empty, Url is used as the display text.

Setting this property follows the Cancellable Workflow Pattern: OnUrlChanging(ValueChangingEventArgs<string>) and UrlChanging fire before the change and can cancel it; OnUrlChanged(ValueChangedEventArgs<string>) and UrlChanged fire after. Setting the same value is a no-op.