Handling Hyperlinks in WPF RichTextBox Html?

让人想犯罪 __ 提交于 2019-12-25 02:53:24

问题


I have a RichTextBox in a WPF application (C#.NET4.5). The RichTextBox is in Rtf format. I'm using a MarkupConverter to convert and save the RichTextBox.Text Rtf text back in the Db as Html. If a user opens an existing record, the markup converter converts from Html back into Rtf for display in the UI. All works well.

I have an issue trying to handle Hyperlinks. Because the Markup Converter has to convert from Rtf-Xaml-Html I don't believe that there is a Xaml tag which equates to Href or HYPERLINK as there is in Html or Rtf?

Therefore the converter is just stripping out the hyperlink.

Is there any way to handle this in Xaml?

Thanks

来源:https://stackoverflow.com/questions/23390464/handling-hyperlinks-in-wpf-richtextbox-html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!