title: SizeToContent Fills Screen with RichTextBox and FlowDocumentScrollViewer
body: <p>I'm trying to show a FlowDocument in a WPF form and have tried both RichTextBox and FlowDocumentScrollViewer.  I also require that the window resizes to be able to show all text.
  Unfortunately, when I set SizeToContent="WidthAndHeight" for the Window itself, no matter what content I put in the FlowDocument, the window expands to the full width of all my displays!  The height seems to resize fine, however.</p>
  
  <p>Anyone know how to get it to resize properly? Looked all over and cannot figure out how to get this going...<br>
  XAML below:</p>
  
  <pre><code>&lt;Window x:Class="CustomControls.SecureConfirmationDialog"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          Title="SecureConfirmationDialog" 
          MinHeight="120" MinWidth="200" 
  
          Height="120" Width="300" 
          ResizeMode="NoResize" 
          SizeToContent="WidthAndHeight"
          WindowStyle="ToolWindow"
          Loaded="Window_Loaded"&gt;
      &lt;Grid&gt;
          &lt;Grid.RowDefinitions&gt;
              &lt;RowDefinition Height="*" /&gt;
              &lt;RowDefinition Height="Auto" /&gt;
          &lt;/Grid.RowDefinitions&gt;
          &lt;Grid.ColumnDefinitions&gt;
              &lt;ColumnDefinition Width="*" /&gt;
              &lt;ColumnDefinition Width="Auto" /&gt;
              &lt;ColumnDefinition Width="Auto" /&gt;
          &lt;/Grid.ColumnDefinitions&gt;
          &lt;FlowDocumentScrollViewer Name="flowMsg" Grid.Row="0" Grid.ColumnSpan="3" Margin="3" IsToolBarVisible="False" ScrollViewer.VerticalScrollBarVisibility="Hidden" /&gt;
          &lt;TextBox Name="txtConfirm" Grid.Row="1" Grid.Column="0" Text="Testing" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Margin="3" /&gt;
          &lt;Button Name="btnOK" Grid.Row="1" Grid.Column="1" Content="OK" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="3" Width="50" Click="btnOK_Click"  /&gt;
          &lt;Button Name="btnCancel" Grid.Row="1" Grid.Column="2" Content="Cancel" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="3" Width="50" Click="btnCancel_Click" /&gt;
      &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>