问题
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