Convert FlowDocument to simple text

2019-04-20 17:39发布

问题:

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

回答1:

How about this?

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