title: WPF RichTextBox inside DataGrid format is messed up
body: <p>I need to use RichTextBoxes in a column of a DataGrid. This is done in xaml via</p>
  
  <pre><code>&lt;DataGrid x:Name="ui_tblInputs"
                  Grid.Row="0" Grid.Column="2" Grid.RowSpan="3"
                  AutoGenerateColumns="False"
                  HeadersVisibility="Column"
                  CanUserSortColumns="False"
                  HorizontalAlignment="Center"
                  ItemsSource="{Binding InputPorts, Mode=OneWay}"
                  SelectedItem="{Binding SelectedInputPort}"
                  SelectionMode="Single"
                  &gt;
      &lt;DataGrid.Columns&gt;
          &lt;DataGridTextColumn
                          Header="Inputs"
                          Width="SizeToCells"
                          MinWidth="50"
                          Binding="{Binding Name, Mode=TwoWay}"
                          /&gt;
          &lt;DataGridTemplateColumn
                          Header="Test Value"
                          Width="SizeToCells"
                          MinWidth="100"
                          &gt;
              &lt;DataGridTemplateColumn.CellTemplate&gt;
                  &lt;DataTemplate&gt;
                      &lt;RichTextBox
                                      IsReadOnly="True"
                                      &gt;
                          &lt;FlowDocument&gt;
                              &lt;Paragraph&gt;
                                  &lt;Run Text="some text"/&gt;
                              &lt;/Paragraph&gt;
                          &lt;/FlowDocument&gt;
                      &lt;/RichTextBox&gt;
                  &lt;/DataTemplate&gt;
              &lt;/DataGridTemplateColumn.CellTemplate&gt;
          &lt;/DataGridTemplateColumn&gt;
      &lt;/DataGrid.Columns&gt;
  &lt;/DataGrid&gt;
  </code></pre>
  
  <p>Problem is, the text inside the RichTextBox is coming out with each character on it's own line. i.e.</p>
  
  <p><img src="https://i.stack.imgur.com/74Uzq.png" alt="image output"></p>
  
  <p>Any thoughts as to why this is happening?</p>