Completed
Last Updated: 24 Nov 2014 09:15 by ADMIN
ADMIN
Georgi I. Georgiev
Created on: 28 Nov 2013 03:18
Category:
Type: Bug Report
3
FIX. RadRichTextBox - The SelectAll method of the Selection property of RadDocument does not select all text on rtf imported text
To reproduce:

Import a document with RtfFormatProvider: RadDocument doc = rtfFormatProvider.Import(File.ReadAllText("WordpadRTF.rtf")); 

use doc.Selection.SelectAll(); 

you will notice that the selection has skipped the first word

Workaround:

DocumentPosition firstPositionInDoc = new DocumentPosition(doc.DocumentLayoutBox, true);

DocumentPosition lastPositionInDoc = new DocumentPosition(doc.DocumentLayoutBox, true); 

firstPositionInDoc.MoveToFirstPositionInDocument();

lastPositionInDoc.MoveToLastPositionInDocument();

doc.Selection.SetSelectionStart(firstPositionInDoc);

doc.Selection.AddSelectionEnd(lastPositionInDoc); 

Resolution: 
This issue is addressed in the new version of the control - RadRichTextEditor. Please use the new control instead the RadRichTextBox. 
0 comments