title: WPF TextBlock highlight certain parts based on search condition
body: <p>I have TextBlock that has Inlines dynamicly added to it (basically bunch of Run objects that are either italic or bold).</p>
  
  <p>In my application I have search function.</p>
  
  <p>I want to be able to highlight TextBlock's text that is in being searched for.</p>
  
  <p>By highlighting I mean changing certain parts of TextBlock text's color (keeping in mind that it may highlight several different Run objects at a time).</p>
  
  <p>I have tried this example <a href="http://blogs.microsoft.co.il/blogs/tamir/archive/2008/05/12/search-and-highlight-any-text-on-wpf-rendered-page.aspx" rel="noreferrer">http://blogs.microsoft.co.il/blogs/tamir/archive/2008/05/12/search-and-highlight-any-text-on-wpf-rendered-page.aspx</a></p>
  
  <p>But it seams very unstable :(</p>
  
  <p>Is there easy way to solve this problem?</p>