Hi,
In our application, we are using Richtextbox from system.windows.controls as content control to store formatted text. When we retrieve formatted text from this content control it doesn't returning us formatted text (skipping carriage return symbol).
To retrieve text from content control we are using below code,
rtb as RichTextBox
Code Snippet 1 -
rtb.SelectAll();
rtb.Selection.Text;
Code Snippet 2 -
TextRange textRange = new TextRange(
rtb.Document.ContentStart,
rtb.Document.ContentEnd);
textRange.Text;
Can you please let me know how to retrieve formatted text (with carriage return) from Rich text box control.
Regards,
Nitesh Gat