Pregunta

How can i load a .txt file as FlowDocument to put it in a RichTextBox?

Otros consejos

The following is a pretty simple method.

using (var fs = new FileStream(FileName, FileMode.OpenOrCreate))
{
     var range = new TextRange(Document.ContentStart, Document.ContentEnd);
     range.Load(fs, DataFormats.Text);
}
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top