WPF RichTextBox
作者:互联网
以块的派生类进行显示
使用继承自System.Windows.Documents.Block以获取块状显示方式示例 整个行
t.Document.Blocks.Add(new BlockUIContainer(new TextBlock() { Text = "AADAA", Foreground = Brushes.Red }));示例 长度为内容长度
t.Document.Blocks.Add(new Paragraph(new InlineUIContainer(new TextBlock() { Text = "Auto" })));标签:Blocks,示例,RichTextBox,TextBlock,Add,new,WPF,Document 来源: https://www.cnblogs.com/QuXingBai-Blog/p/14092578.html