Back to API Reference
Class
LinkModifier
Inherits:InteractiveModifierBase
Marks text ranges as clickable hyperlinks and dispatches their click/hover events.
Remarks
Visual styling and state feedback are configured with ordinary modifiers and parameter changes in a CompositeModifier, as in the built-in Link preset. The primary parameter is the URL. 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
protected override void OnApply(in RangeApplyContext context)Adds the source range with its primary value and resolved interaction parameters.
protected override void HandleInteraction(RangeInteraction interaction)Receives routed target events that public handlers have not marked as handled.
protected override void HandleDefaultAction(RangeInteraction interaction)Performs built-in behavior after all capture, channel, modifier and bubble handlers. It is skipped when a handler calls RangeInteraction.PreventDefault.
