title: Creating an image+text button with a control template?
body: <p>I am tired of creating the same image+text button over and over again, and I would like to move the markup to a control template. Here is my problem: I need to provide template bindings to add the image and text to the templated button, and the Button control doesn't seem to have properties that I can bind to.</p>
  
  <p>My template looks like this so far (with '???' for the unknown template bindings):</p>
  
  <pre><code>&lt;ControlTemplate x:Key="ImageButtonTemplate" TargetType="{x:Type Button}"&gt;
      &lt;StackPanel Height="Auto" Orientation="Horizontal"&gt;
          &lt;Image Source="{TemplateBinding ???}" Width="24" Height="24" Stretch="Fill"/&gt;
          &lt;TextBlock Text="{TemplateBinding ???}" HorizontalAlignment="Left" Foreground="{DynamicResource TaskButtonTextBrush}" FontWeight="Bold"  Margin="5,0,0,0" VerticalAlignment="Center" FontSize="12" /&gt;
      &lt;/StackPanel&gt;
  &lt;/ControlTemplate&gt;
  </code></pre>
  
  <p>Is it possible to create this image+text button using a control template, or do I have to go to a user control to do it? If it can be done with a control template, how do I set up the template bindings?</p>