Depending on the current layout of the document, invoking SetPosition() for a specific location might result in positioning the caret on the line prior to the expected one.
Steps to reproduce:
radRichTextBox.Insert("one: ");
radRichTextBox.Insert(Environment.NewLine);
radRichTextBox.Insert("two: ");
radRichTextBox.Insert(Environment.NewLine);
radRichTextBox.Insert("tree: ");
radRichTextBox.Insert(Environment.NewLine);
radRichTextBox.Insert("four: ");
radRichTextBox.Insert(Environment.NewLine);
radRichTextBox.Insert("five: ");
radRichTextBox.Insert(Environment.NewLine);
radRichTextBox.Insert("seks: ");
radRichTextBox.Insert(Environment.NewLine);
radRichTextBox.Insert("seven: ");
radRichTextBox.Insert(Environment.NewLine);
radRichTextBox.Insert("eitgh: ");
radRichTextBox.Insert(Environment.NewLine);
radRichTextBox.Insert("nine: ");
radRichTextBox.Insert(Environment.NewLine);
radRichTextBox.Insert("ten: ");
radRichTextBox.Document.CaretPosition.SetPosition(radRichTextBox.Document.CaretPosition.Location); radRichTextBox.Focus();
Observed: The caret is positioned after "eitgh:"
Expected: The caret shouldn't change its position