How do I change RichTextBox paragraph spacing?
I did it with style (pun indented)
<RichTextBox Margin="0,51,0,0" Name="mainTextBox" > <RichTextBox.Resources> <Style TargetType="{x:Type Paragraph}"> <Setter Property="Margin" Value="0"/> </Style> </RichTextBox.Resources> </RichTextBox>
Using Line Height
RichTextBox rtb = new RichTextBox(); Paragraph p = rtb.Document.Blocks.FirstBlock as Paragraph; p.LineHeight = 10;
Close, so you got the points. Actually it turned out to be setting the margin,
p.Margin = new Thickness(0);