title: WPF - TextBlock - Format Text Programmatically
body: <p>In the TextBlock object you can format the text in the XAML like this:</p>
  
  <pre><code>&lt;TextBlock&gt;
      &lt;Bold&gt;bold text&lt;/Bold&gt; random non bold next
  &lt;/TextBlock&gt;
  </code></pre>
  
  <p>How do you do the "Bold" tags programmatically?</p>
  
  <p>I tried just putting them in the text property and it just printed them out (the tags were printed as text).</p>