title: Set Text to the RichTextBlock in code behind
body: <p>I am trying to set Text to a RichTextBlock in a universal app,this is my code in xaml:</p>
  
  <pre><code>&lt;RichTextBlock x:Name="descr"&gt;
         &lt;Paragraph&gt;
               &lt;Paragraph.Inlines&gt;
                   &lt;Run Text="{Binding Path=desc}"/&gt;
               &lt;/Paragraph.Inlines&gt;
         &lt;/Paragraph&gt;
  &lt;/RichTextBlock&gt;
  </code></pre>
  
  <p>but I dont know how to set Text in this RichTextBlock in code behind,this is my try:</p>
  
  <pre><code>Paragraph p = new Paragraph();
    p.Inlines.Add("test");//error here cannot convert from 'string' to 'Windows.UI.Xaml.Documents.Inline' 
    descr.Blocks.Add(p);
  </code></pre>
  
  <p>so how can I set Text to the RichTextBlock in code behind C#
  thanks for help      </p>