title: TextBlock won't display the rest of it's text even when it's resized
body: <p>An app I'm working on retrieves information from the Internet and displays it in-app in a series of Grids inside of a StackPanel, itself nested inside of a ScrollViewer.</p>
  
  <p>My problem is this: The app shows a short summary of the content, and the idea is that clicking the content makes the Grid and TextBlock expand to show the rest of the content, however resizing the TextBlock doesn't show the text that was cut off by being too short originally. The TextBlock is created dynamically in c# code.</p>
  
  <p>Additionally, but not vital: I don't know how to get the full required height from the TextBlock to change it's text to, and without it I have to set the new size to a static number, which I feel detracts from the UX of my app.</p>
  
  <p>Thanks,
  Jase</p>
  
  <hr>
  
  <p><strong>Update:</strong> This is the code used to generate the TextBlock:</p>
  
  <pre><code>this.message = new TextBlock()
  {
      VerticalAlignment = VerticalAlignment.Top,
      TextWrapping = TextWrapping.Wrap,
      MaxWidth = getWidth()
  };
  if(post.message != null) { message.Text = post.message; }
  </code></pre>
  
  <p><strong>Update 2:</strong> This is the code that creates the StackPanel (XAML):</p>
  
  <pre><code>&lt;ScrollViewer Grid.Column="1" Style="{StaticResource MainColumn}" VerticalScrollBarVisibility="Auto" SizeChanged="Feed_SizeChanged"&gt;
      &lt;StackPanel x:Name="Feed"/&gt;
  &lt;/ScrollViewer&gt;
  </code></pre>
  
  <p>This is where the parent Grid is generated:</p>
  
  <pre><code>Post grid = new Post() { Margin = new Thickness(0, 0, 0, 5) };
  Feed.Children.Add(grid);
  grid.layoutPost(oldCount, count--, post, Feed, this);
  </code></pre>
  
  <p>The height of the Grid is set in the layoutPost method, and ends up at 75px, Post is a class that extends Grid, and is defined here:</p>
  
  <pre><code>class Post : Windows.UI.Xaml.Controls.Grid
  </code></pre>