title: XAML - Create really long TextBlock
body: <p>I'm writing an app that calculates all prime numbers from 0 to a number specified by the user. My algorythm works fine, but it seems that the TextBlock is limited in height: round about at the 500 it doesn't continue to write the numbers. I can still scroll down but the numbers don't appear any longer.
  XAML:</p>
  
  <pre><code>&lt;Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"&gt;
          &lt;ScrollViewer&gt;
              &lt;StackPanel Name="stack"&gt;
                  &lt;TextBlock&gt;Calculate prime numbers from&lt;/TextBlock&gt;
                  &lt;TextBox Name="from"&gt;&lt;/TextBox&gt;
                  &lt;TextBlock&gt;to&lt;/TextBlock&gt;
                  &lt;TextBox Name="to"&gt;&lt;/TextBox&gt;
                  &lt;Button Name="Run" Click="run"&gt;Calculate prime numbers!&lt;/Button&gt;
  
                  &lt;TextBlock Name="result"&gt;Hallo&lt;/TextBlock&gt;
              &lt;/StackPanel&gt;
          &lt;/ScrollViewer&gt;
      &lt;/Grid&gt;
  </code></pre>
  
  <p>C#:</p>
  
  <pre><code>public void run(object sender, RoutedEventArgs e)
      {
          int min; int.TryParse(from.Text, out min);
          int max; int.TryParse(to.Text, out max);
          List&lt;int&gt; numbers = new List&lt;int&gt;();
          for (int i = min; i &lt;= max; i++)
          {
              numbers.Add(i);
          }
          int checknext = 2;
          while (checknext &lt; Math.Sqrt(max))
          {
              for (int i = numbers.Count - 1; i &gt;= 0; i--)
              {
                  if (!(numbers[i] == checknext))
                  {
                      if (numbers[i] % checknext == 0)
                          numbers.RemoveAt(i);
                  }
              }
              checknext++;
          }
          result.Text = "";
          result.MaxHeight = double.MaxValue;
          for (int i = 0; i &lt; numbers.Count; i++)
          {
              result.Text += numbers[i].ToString() + "\n";
          }
  }
  </code></pre>