title: How to inject a formatted paragraph into a TextBlock?
body: <p>I'm trying to transmit the formatted content of a paragraph to a TextBlock, but the formatting disappears:</p>
  
  <pre><code>// Create a formatted paragraph
  Paragraph para = new Paragraph();
  para.FontSize = 25;
  para.FontWeight = FontWeights.Bold;
  para.Inlines.Add(new Run("Text of paragraph."));
  
  // Create a span with the content of the paragraph (FontSize 25 and FontWeight Bold stay alive)
  Span span = new Span(para.ContentStart, para.ContentEnd);
  
  // Create a TextBlock with the span (FontSize 25 and FontWeight Bold get lost)
  TextBlock textBlock = new TextBlock();
  textBlock.Inlines.Add(span);
  </code></pre>
  
  <p>What could be done to keep the formatting? Thanks in advance.</p>
  
  <p><strong>Update</strong><br>
  The formatting of the paragraph is known at runtime, so I can't apply property values one by one manually.  </p>
  
  <p><strong>Update 2</strong><br>
  The background of the question is that I want to measure the length of formatted paragraphs if they are stretched to one line. 
  This can be done by a TextBlock. The paragraphs are located in TableCells, I want to adjust the column widths automatically.</p>