Search code examples
wpfflowdocument

Convert FlowDocument to simple text


what is the most simple and elegant way how convert flowdocument to simple text?


Solution

  • How about this?

    string text = new TextRange(FlowDoc.ContentStart, FlowDoc.ContentEnd).Text;