【发布时间】:2013-07-20 00:06:18
【问题描述】:
这个真的把我逼疯了。默认情况下,RichTextBox 在新段落的开头插入额外的一行。我收集将 Paragraph Margin 属性设置为零将防止这种行为,但只能在 xaml 中看到示例......我已经尝试过
.Selection.ApplyPropertyValue(Paragraph.MarginProperty, 0.0)
但这会引发一个错误,告诉我 '0' 不是属性 'Margin' 的有效值
和
.Resources.Add(Paragraph.MarginProperty, 0.0)
但这没有任何效果......
【问题讨论】:
标签: wpf richtextbox