Question: I am using a RichTextBox in WPF, and am trying to set the default paragraph spacing to 0 (so that there is no paragraph spacing). While I could do this in XAML, I would like to achieve it programmatically if possible. Any ideas?

Answer: 
```
RichTextBox rtb = new RichTextBox();
rtb.SetValue(Paragraph.LineHeightProperty, 1.0);

```
```
<RichTextBox  Height="250" Width="500" VerticalScrollBarVisibility="Auto" TextWrapping="Wrap" IsReadOnly="True" >
    <Paragraph>
        XYZ
        <LineBreak />
    </Paragraph>
</RichTextBox>

```