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
Hyperlink()
Creates a link.
public Hyperlink()
Hyperlink(string, string?)
Creates a link with a text and a URL.
public Hyperlink(string text, string? url = null)
Parameters
Properties
AlwaysUnderline
Underlines the text permanently (otherwise only on hover).
public bool AlwaysUnderline { get; set; }
Property Value
LinkColor
Link color (null = theme accent).
public Color? LinkColor { get; set; }
Property Value
Text
Displayed text.
public string Text { get; set; }
Property Value
TextStyle
Text style (null = theme normal text).
public TextStyle? TextStyle { get; set; }
Property Value
Url
Target opened with Open(string) (null = only raise Clicked).
public string? Url { get; set; }
Property Value
VisitedColor
Color after the link was opened once (null = same as LinkColor).
public Color? VisitedColor { get; set; }
Property Value
Methods
Activate()
Opens the link and raises Clicked.
public void Activate()
LayoutParts(VectorStyle, out Rect, out Rect, out Rect)
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
styleVectorStylelabelRectwidgetRectvalueRect
MeasureOverride(Size)
Natural size of the content for the available size (margins excluded).
protected override Size MeasureOverride(Size available)
Parameters
availableSize
Returns
OnCaptureLost()
The mouse capture was lost without a button release.
protected override void OnCaptureLost()
OnKeyDown(KeyEventArgs)
Key pressed while focused (bubbles to parents).
protected override void OnKeyDown(KeyEventArgs e)
Parameters
OnMouseDown(MouseEventArgs)
Mouse button pressed over the element (or captured).
protected override void OnMouseDown(MouseEventArgs e)
Parameters
OnMouseUp(MouseEventArgs)
Mouse button released.
protected override void OnMouseUp(MouseEventArgs e)
Parameters
RenderVector(DrawingContext, Rect, VectorStyle)
Vector rendering of the widget area.
protected override void RenderVector(DrawingContext dc, Rect widget, VectorStyle style)
Parameters
dcDrawingContextwidgetRectstyleVectorStyle
Events
Clicked
Raised when the link is activated (click, Enter or Space).
public event Action<Hyperlink>? Clicked