title: How to format superscript string in C#?
body: <p>I need to format some string in Superscript (code behind) in c#, </p>
  
  <p>for example,</p>
  
  <p>Input => 100
    Output => 10^2</p>
  
  <p>where <code>Output&lt;string&gt;</code> is a <code>Clr Property</code></p>
  
  <p>I have tried with the below code snippet,</p>
  
  <pre><code> TextBlock _textBlock = new TextBlock();
      _textBlock.Text = "10";
      _textBlock.Inlines.Add(new Run() { BaselineAlignment  = BaselineAlignment.Superscript, Text = "2"});
  </code></pre>
  
  <p>As <code>Typography</code> is Read Only property in the above case, i can't set the <code>Typography.Variants</code> in code behind.</p>
  
  <p><strong>Note:</strong> Please do note that this question is not about rendering, this is about reading the <code>Text</code> as <code>string</code>. Expected value is <code>10^2</code>. While suggesting duplicates please check other question addresses this. </p>
  
  <p>Could any one guide me on this?</p>
  
  <p>And also while set <code>BaselineAlignment.Superscript</code> like the above mentioned code snippet, it doesn't render like the superscript (small font) instead it renders in the same <code>FontSize</code> (instead it looks like setting the Margin property for the superscript content alone like <code>new Thickness(0,0,0,FontSize)</code> )</p>