我正在尝试在UWP自定义组件中使用RichEditBox,该组件将通过XamlIslands添加到WPF应用程序中:
<RichEditBox x:Name="editor" PointerPressed="editor_PointerPressed" Tapped="editor_Tapped" PointerReleased="editor_PointerPressed">
我通过以下方式添加超链接:
editor.Document.Selection.Link = "\"[the link]\"";
它可以正常工作,并且在按住Ctrl + Click的同时在浏览器中打开链接,但是如何捕获该click事件?
我没有在RichEditBox中将其定义为参数触发任何回调,因此根本不会触发PointerPressed,PointerReleased和Tapped事件。
如何在UWP RichEditBox中捕获超链接点击?
恐怕您无法检测到超链接单击事件,当前,没有可以检测到单击操作的api,如果您想要此功能,请通过Windows反馈中心应用发布您的要求。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句