if (result == true)
{
this.fooTextBox.IsEnabled = false;
- await this.fooTextBox.LoadFileAsync(ofd.FileName, Encoding.Default,this.cancleTokenSrc);
+ System.IO.FileStream file = System.IO.File.Open(ofd.FileName,System.IO.FileMode.Open);
+ System.IO.StreamReader sr = new System.IO.StreamReader(file, Encoding.Default);
+ await this.fooTextBox.Document.LoadAsync(sr, this.cancleTokenSrc, (int)file.Length);
+ sr.Close();
+ file.Close();
this.fooTextBox.IsEnabled = true;
this.fooTextBox.Refresh();
}