title: Rich formatting of text in a TextBlock using only DataBinding in XAML
body: <p>I am trying to format a Tweet using Data Binding.  What I need to do is split the Text value of the tweet based on what type of content it is.</p>
  
  <pre><code>text = "This is a Tweet with a hyperlink http://www.mysite.com"
  </code></pre>
  
  <p>I need to add some color formatting to the http://... portion of the text value. </p>
  
  <p><strong>Here's the kicker, I'd like to do this using only XAML Data Binding.</strong></p>
  
  <pre><code> &lt;TextBlock x:Name="Tweet1" FontWeight="Bold" Height="207.236" 
      LineHeight="55" TextAlignment="Left" TextWrapping="Wrap" 
      Width="1614.646" Text="{Binding XPath=/statuses/status[2]/text}" 
      FontSize="56" FontFamily="Segoe Book" 
      Foreground="{DynamicResource TextColor-Gray}" /&gt;
  </code></pre>
  
  <p>// needs to end up looking like</p>
  
  <pre><code>&lt;TextBlock x:Name="Tweet1" FontWeight="Bold" ... FontSize="56" FontFamily="Segoe Book"&gt;
    &lt;Run Foreground="{DynamicResource TextColor-Gray}" &gt;This is a Tweet with a hyperlink&lt;/Run&gt;
  &lt;Run Foreground="{DynamicResource TextColor-Pink}" &gt;http://www.mysite.com&lt;/Run&gt;
  &lt;/TextBlock&gt;
  </code></pre>
  
  <p>Here is a Regex I could use to split the text value, but I'm trying to use strictly DataBinding.</p>
  
  <pre><code>Regex regUrl = new Regex(@"/http:\/\/\S+/g");
  </code></pre>
  
  <p>Suggestions?</p>