Код: Выделить всё
StringBuilder sb = new StringBuilder();
using (StreamReader sr = new StreamReader("test.rtf"))
{
sb.Append(sr.ReadToEnd());
}
richTextBox1.Rtf = sb.ToString();
Код: Выделить всё
StringBuilder sb = new StringBuilder();
using (StreamReader sr = new StreamReader("test.xaml"))
{
sb.Append(sr.ReadToEnd());
}
richTextBox1.AppendText(sb.ToString());
Код: Выделить всё
StringBuilder sb = new StringBuilder();
using (StreamReader sr = new StreamReader("test.xaml"))
{
sb.Append(sr.ReadToEnd());
}
richTextBox1.Document = sb.(CONVERT TO FLOW DOCUMENT?)
Код: Выделить всё
FileStream fs = new FileStream("test.xaml", FileMode.Open, FileAccess.Read);
FlowDocument content = XamlReader.Load(fs) as FlowDocument;
richTextBox1.Document = content;
Подробнее здесь: https://stackoverflow.com/questions/797 ... ichtextbox
Мобильная версия