Back to API Reference
Class

LinkModifier

Marks text ranges as clickable hyperlinks and dispatches their click/hover events.

Remarks

Carries no base visual styling — colour and underline are separate modifiers. Combine it with ColorModifier and UnderlineModifier in a CompositeModifier (as the built-in Link preset does) so a link's appearance is fully author-controlled. Parameter: the URL. State feedback follows web convention: no hover background (underline / colour composition already reads as hover affordance), a subtle grey rounded pressed/activation flash is composed through the same ModifierRule graph available to every interactive range. Subscribe to LinkClicked to handle activation (a confirmed click / tap — raised from the interaction machine's Activated event), or let the modifier open the URL via OpenURL when AutoOpenUrl is set.

Example

csharp
[ctor]public LinkModifier()
protected override void OnApply()
protected override void HandleInteraction()
protected override void HandleDefaultAction()
public Action<string> LinkClicked

Occurs when a link has been clicked, providing the URL.

public Action<string> LinkEntered

Occurs when the pointer has entered a link, providing the URL.

public Action LinkExited

Occurs when the pointer has exited a link.

See Also