Hello Harry Pfleger,
Adding selection end is necessary and you cannot skip that step. What gets selected is the text between the selection start and the selection end. When one of these is missing, nothing gets selected.
You can refer to this help article, which deals with what I believe is the same scenario.
If you are not showing the document in a RadRichTextBox, you can use the InsertInline() method of RadDocument like this:
DocumentTextSearch search =
List<TextRange> rangesTrackingDocumentChanges =
TextRange newRange =
StyleDefinition style =
I tried running your sample code and it did not stop the application. However, this line:
inserts the text at the current caret position (which by default is in the beginning of the document and you do not set it anywhere in your code) and only once (since it is not in the body of the foreach-cycle).
Give the approach I described a try and let us know if you experience any difficulties.
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>