title: Silverlight InlineCollection.Add(InlineUIContainer) missing?
body: <p>I'm having difficulty adding the inline of specific type InlineUIContainer into the InlineCollection (Content property) of a TextBlock. It appears the .Add() method of InlineCollection doesn't accept this type, however you can clearly set it through XAML without explicitly marking the content as a InlineContainer, as demonstrated in many examples:</p>
  
  <p><a href="http://msdn.microsoft.com/en-us/library/system.windows.documents.inlineuicontainer.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/system.windows.documents.inlineuicontainer.aspx</a></p>
  
  <p>Is it possible to programatically add one of these as in the following?</p>
  
  <pre><code>Target.Inlines.Add(new Run() { Text = "Test" });
  Target.Inlines.Add(new InlineUIContainer() { 
  Child = new Image() { Source = new BitmapImage(new Uri("http://example.com/someimage.jpg")) } });
  Target.Inlines.Add(new Run() { Text = "TestEnd" });
  </code></pre>
  
  <p>I have a feeling what's going on is that Silverlight is using a value converter to create the runs when specified in XAML as in the example which doesn't use InlineContainer, but I'm not sure where to look to find out. </p>
  
  <p>The specific error I'm getting is as follows:</p>
  
  <pre><code>Cannot add value of type 'System.Windows.Documents.InlineUIContainer' to a 'InlineCollection' in a 'System.Windows.Controls.TextBlock'.
  </code></pre>