I managed to find a way around this, largely by accident.
Content uploaded to my RichTextBox is simply saved (or entered) as a simple string. I have subclassed RichTextBox to allow Document properties to be bound to it.
What is relevant to the question is that I have an IValueConverter Convert () overload that looks something like this (code that is not essential for the solution has been removed):
FlowDocument doc = new FlowDocument(); Paragraph graph = new Paragraph(); Hyperlink textLink = new Hyperlink(new Run(textSplit)); textLink.NavigateUri = new Uri(textSplit); textLink.RequestNavigate += new System.Windows.Navigation.RequestNavigateEventHandler(navHandler); graph.Inlines.Add(textLink); graph.Inlines.Add(new Run(nonLinkStrings)); doc.Blocks.Add(graph); return doc;
This gives me the behavior I want (dragging and dropping simple lines into a RichTextBox and getting formatting), and also leads to links that behave like a regular link, rather than the one embedded in a Word document.
John Noonan Apr 17 '09 at 23:18 2009-04-17 23:18
source share