title: Formatting text in a TextBlock
body: <p>How do I achieve formatting of a text inside a <code>TextBlock</code> control in my WPF application?</p>
  
  <p>e.g.: I would like to have certain words in bold, others in italic, and some in different colors, like this example:</p>
  
  <p><img src="https://i.stack.imgur.com/zGUuD.png" alt="enter image description here"></p>
  
  <p>The reason behind my question is this actual problem:</p>
  
  <pre><code>lblcolorfrom.Content = "Colour From: " + colourChange.ElementAt(3).Value.ToUpper();
  </code></pre>
  
  <p>I would like the second part of the string to be bold, and I know that I could use two controls (Labels, TextBlocks, etc.) but I'd rather not, due the vast amount of controls already in use.</p>