Search This Blog

Monday, January 12, 2015

Extract the Text Content from a RichTextBox

WPF > Windows > Documents > TextRange

TextRange is a selection of content between two TextPointer positions.

Example

Extract the Text Content from a RichTextBox

 TextRange textRange = new TextRange(richTB.Document.ContentStart,   richTB.Document.ContentEnd);