I have to import text from a legacy system with a custom format. This format codes break lines as a row of 21 blank spaces. How can I format this text to see the break lines in RichtTextBox?
2 Answers, 1 is accepted
0
Ivailo Karamanolev
Telerik team
answered on 02 Dec 2010, 10:49 AM
Hi DanĂ,
You basically have 2 options.
Use string.Replace to replace occurrences of 21 blank spaces with "\r\n" sequences and then use the TxtFormatProvider. Probably this will be easier, but will only work if you don't require any styling to be applied based on some custom format.
Parse the string from the legacy system and create a RadDocument and a Section with Paragraphs, Spans with your own code. This will require some greater effort, but will give you the option to parse not only basic line breaks, but any additional information contained in the string being imported.
Get back to us if you experience any issues.
All the best,
Ivailo
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight