Auto-detecting Hyperlinks in RichTextBox – Part II

In my previous post, we looked at code that auto-formats hyperlink strings while typing. The remaining part was to scan words when content is pasted in RichTextBox to auto-format any hyperlink strings. The approach to do this is quite straight forward as you can imagine. Listen to DataObject.Pasting event on RichTextBox, set a flag to remember the…

2

Replying to Messages

I received a few questions from my blog readers in email. I will try my best to answer them in this post. Question 1: Hi there! I saw that you were posting about the use of RichTextBox control and I thought you might be able to help me on my problem: how can I get the…

1

Navigate Words in RichTextBox

A commonly asked question on the WPF forum is – how can I navigate RichTextBox‘s content word by word (see http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=778441&SiteID=1). In today’s post, we will see how this can be done using the TextPointer API. What we need is a helper function which takes a TextPointer position and returns us the word start and word…

1