title: RichTextBox in WPF not resizing contents correctly
body: <p>I need to display text with colors and formatting in a <code>List</code>. I'm using a <code>ListBox</code> with a <code>RichTextControl</code> to display the data. I also need the contents to size to the window, but the text does not need to wrap.</p>
  
  <p>When I make this simple example the text appears vertical and doesn't change as I size the window. If I set the <code>Width</code> of the <code>RichTextBox</code> to a fixed size like 100 then it works. </p>
  
  <p>Any ideas?  </p>
  
  <pre><code>&lt;Window x:Class="WpfApplication19.Window1"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          Title="Window1" Height="300" Width="300"&gt;
      &lt;Grid&gt;
          &lt;ListBox HorizontalContentAlignment="Stretch"&gt;
              &lt;ListBox.Items&gt;
                  &lt;RichTextBox&gt;
                      &lt;FlowDocument&gt;
                          &lt;Paragraph&gt;
                              &lt;Run&gt;this is a  test&lt;/Run&gt;
                          &lt;/Paragraph&gt;
                      &lt;/FlowDocument&gt;
                  &lt;/RichTextBox&gt;
              &lt;/ListBox.Items&gt;                
          &lt;/ListBox&gt;
      &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p>If there is a better option for displaying text were parts of the text are different colors please let me know.</p>