title: How do i adjust font size of a textblock with respect to the Text Length in Windows 8 xaml
body: <p>I am using a <code>Textblock</code> in a Listbox Template . Where i wants to vary the <code>Textblock Size</code> with respect to the <code>Content Text</code>. <br/><br/>
  Small Text --> Large FontSize &amp;&amp;
  Large Text --> Small font Size <br/><br/>
  So that it filled in the template.<br/> How do we achieve this since Letters are taking varied occupied spaces.<br/> Example: 'i' takes less space than 'w' / Capital letters took more spaces than Small letters. <br/></p>
  
  <pre><code>    &lt;StackPanel HorizontalAlignment="Left" Height="30" VerticalAlignment="Top" Width="74" Margin="355,101,0,0" Background="#FF139905"&gt;
          &lt;TextBlock TextWrapping="Wrap" Text="This is a test application" Foreground="Black" FontWeight="Bold" FontSize="12"/&gt;
      &lt;/StackPanel&gt;
      &lt;StackPanel HorizontalAlignment="Left" Height="30" VerticalAlignment="Top" Width="74" Margin="355,155,0,0" Background="#FF0FAA00"&gt;
          &lt;TextBlock TextWrapping="Wrap" Text="This is a test " Foreground="Black" FontWeight="Bold" FontSize="13.333"/&gt;
      &lt;/StackPanel&gt;
      &lt;StackPanel HorizontalAlignment="Left" Height="30" VerticalAlignment="Top" Width="74" Margin="355,204,0,0" Background="#FF0FAA00"&gt;
          &lt;TextBlock TextWrapping="Wrap" Text="test " Foreground="Black" FontWeight="Bold" FontSize="26.667"/&gt;
      &lt;/StackPanel&gt;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/1w3WK.png" alt="enter image description here"></p>