110,536
社区成员
发帖
与我相关
我的任务
分享
FileStream fs;
if (File.Exists(open.FileName))
{
fs = new FileStream(open.FileName, FileMode.Open, FileAccess.Read);
StreamReader streamReader = new StreamReader(fs,System.Text.Encoding.UTF8);
using (fs)
{
TextRange text = new TextRange(richMain.Document.ContentStart, richMain.Document.ContentEnd);
text.Load(fs, DataFormats.Text);
}
}