WPF ItemsControl stretch FontSize of ButtonContent
<p>I have a problem autosizing the (Text)Content of my buttons.</p>

<p>This is the style of my Buttons. Nothing special but notice the <em>TextWrapping</em> property!</p>

<pre><code>&lt;Style TargetType="{x:Type Button}"&gt;
  &lt;Setter Property="Template"&gt;
  &lt;Setter.Value&gt;
    &lt;ControlTemplate TargetType="Button"&gt;
      &lt;TextBlock Text="{TemplateBinding Content}" TextWrapping="Wrap"/&gt;
    &lt;/Setter.Value&gt;
  &lt;/Setter&gt;
&lt;/Style&gt;
</code></pre>

<p>I defined a ItemTemplate based on my Buttons:</p>

<pre><code>&lt;DataTemplate x:Key="MyItemTemplate"&gt;
  &lt;Button Content="{Binding Content}" Command="{Binding Command}" FontWeight="Bold" FontSize="{Binding FontSize}"/&gt;
&lt;/DataTemplate&gt;
</code></pre>

<p>I am showing a list of items in with a ItemsControl with 3 columns:</p>

<pre><code>&lt;ItemsControl ItemsSource="{Binding MyItems}" ItemTemplate="{StaticResource MyItemTemplate}"&gt;
  &lt;ItemsControl.ItemsPanel&gt;
    &lt;ItemsPanelTemplate&gt;
      &lt;UniformGrid Columns="3"/&gt;
    &lt;/ItemsPanelTemplate&gt;
  &lt;/ItemsControl.ItemsPanel&gt;
&lt;/ItemsControl&gt;
</code></pre>

<p>Until this point, this is nothing special. But now, I want the FontSize of all my Buttons stretched to maximum possible, the item with the largest content allows (all items should have the same FontSize in the end).</p>

<p>I found a <a href="https://stackoverflow.com/questions/9264398/how-to-calculate-wpf-textblock-width-for-its-known-font-size-and-characters">solution</a> to calculate the needed size of a text. So I could calculate the maximum FontSize of a Button. But therefore I need the actual size of one of my Buttons (all have the same size).</p>

<p>I have not really an idea how to get the size and solve my problem. Would be great if anybody has an idea - or a totally different approach.</p>