Table of Contents

Class Hyperlink

Namespace
PluginUI
Assembly
PluginUI.dll

Clickable link text: accent colored, underlined on hover, hand cursor. Opens Url in the default browser (or raises Clicked only when no URL is set). iPlug2 IURLControl.

public class Hyperlink : Control
Inheritance
Hyperlink
Inherited Members

Constructors

Creates a link.

public Hyperlink()

Creates a link with a text and a URL.

public Hyperlink(string text, string? url = null)

Parameters

text string
url string

Properties

Underlines the text permanently (otherwise only on hover).

public bool AlwaysUnderline { get; set; }

Property Value

bool

Link color (null = theme accent).

public Color? LinkColor { get; set; }

Property Value

Color?

Displayed text.

public string Text { get; set; }

Property Value

string

Text style (null = theme normal text).

public TextStyle? TextStyle { get; set; }

Property Value

TextStyle

Target opened with Open(string) (null = only raise Clicked).

public string? Url { get; set; }

Property Value

string

Color after the link was opened once (null = same as LinkColor).

public Color? VisitedColor { get; set; }

Property Value

Color?

Methods

Opens the link and raises Clicked.

public void Activate()

Splits the bounds into label (top), widget and value (bottom) areas according to the style. Override to change the arrangement (e.g. label on the left for sliders).

protected override void LayoutParts(VectorStyle style, out Rect label, out Rect widget, out Rect value)

Parameters

style VectorStyle
label Rect
widget Rect
value Rect

Natural size of the content for the available size (margins excluded).

protected override Size MeasureOverride(Size available)

Parameters

available Size

Returns

Size

The mouse capture was lost without a button release.

protected override void OnCaptureLost()

Key pressed while focused (bubbles to parents).

protected override void OnKeyDown(KeyEventArgs e)

Parameters

e KeyEventArgs

Mouse button pressed over the element (or captured).

protected override void OnMouseDown(MouseEventArgs e)

Parameters

e MouseEventArgs

Mouse button released.

protected override void OnMouseUp(MouseEventArgs e)

Parameters

e MouseEventArgs

Vector rendering of the widget area.

protected override void RenderVector(DrawingContext dc, Rect widget, VectorStyle style)

Parameters

dc DrawingContext
widget Rect
style VectorStyle

Events

Raised when the link is activated (click, Enter or Space).

public event Action<Hyperlink>? Clicked

Event Type

Action<Hyperlink>