using System.Windows.Documents;
richtextbox1.Document.Blocks.Clear();
string dataSTR = "测试赋值richtextbox";
Run run = new Run(dataSTR);
Paragraph p = new Paragraph();
p.Inlines.Add(run);
richtextbox1.Document.Blocks.Add(p);
r