title: wpf create image button
body: <p>my control template and style:</p>
  
  <pre><code> &lt;ControlTemplate TargetType="{x:Type Button}" x:Key="ImageButtonTemplate"&gt;
          &lt;Image Source="..//..//images//ok.png" 
                             Width="{TemplateBinding Width}" 
                             Height="{TemplateBinding Height}"/&gt;
  
    &lt;/ControlTemplate&gt;
  
    &lt;Style TargetType="{x:Type Button}" x:Key="ImageButton"&gt;
          &lt;Setter Property="Template" Value="{StaticResource ImageButtonTemplate}"/&gt;                        
    &lt;/Style&gt;
  
    &lt;Button Style="{StaticResource ImageButton}" /&gt;
  </code></pre>
  
  <p>the button isn't visible ... 
  what am i missing ?</p>
  
  <p>EDIT : </p>
  
  <p>tried defining panel with height and width , button image is still not visible ..
   little help .</p>
  
  <pre><code>    &lt;ControlTemplate TargetType="{x:Type Button}" x:Key="ImageButtonTemplate"&gt;
          &lt;Grid&gt;
              &lt;Image Source="..//images//ok.png"  Width="{TemplateBinding Width}"  Height="{TemplateBinding Height}" /&gt;              
          &lt;/Grid&gt;
      &lt;/ControlTemplate&gt;
  </code></pre>
  
  <p>and aren't i suppose to put a  in there ?<br>
  what am i doing wrong ?</p>