title: Creating Button using GeometryDrawing WPF
body: <p>Hi I am trying to create a Button with a semi arc form something like this:</p>
  
  <p><a href="http://www.freeimagehosting.net/uploads/6f804323db.jpg" rel="nofollow noreferrer">alt text http://www.freeimagehosting.net/uploads/6f804323db.jpg</a></p>
  
  <p>I am using xaml and Control templates, it works fine but, the button recives the click event even if i click in any part into the rectangle form by the geometry, it launch the click event, I want the event to be catch only inside the geomtry...
  here is the xaml </p>
  
  <pre><code>&lt;ControlTemplate x:Key="ButtonTemplate" TargetType="{x:Type Button}"&gt;
      &lt;Grid&gt;
         &lt;Image&gt;
          &lt;Image.Source&gt;
                     &lt;DrawingImage&gt;
                    &lt;DrawingImage.Drawing&gt;
              &lt;GeometryDrawing x:Name="X"Geometry= "M 0,0 
                  A .8,.8 180 1 1 0,4
                  L 0,3
                  A .6,.6 180 1 0 0,1
                  L 0,0"&gt;
                  &lt;GeometryDrawing.Pen&gt;
                  &lt;Pen Brush="Black" Thickness=".1" /&gt;
                  &lt;/GeometryDrawing.Pen&gt;
                  &lt;GeometryDrawing.Brush&gt;
                  &lt;LinearGradientBrush StartPoint="0,0" EndPoint="0,1"&gt;
                    &lt;GradientStop Offset="0" Color="Blue"/&gt;
                    &lt;GradientStop Offset="1" Color="Red"/&gt;
                  &lt;/LinearGradientBrush&gt;
                  &lt;/GeometryDrawing.Brush&gt;
              &lt;/GeometryDrawing&gt;
                &lt;/DrawingImage.Drawing&gt;
                   &lt;/DrawingImage&gt;
                &lt;/Image.Source&gt;
                 &lt;/Image&gt;
                 &lt;Viewbox&gt;
              &lt;ContentControl Margin="20" Content="{TemplateBinding Content}"/&gt;
          &lt;/Viewbox&gt;
      &lt;/Grid&gt;
  &lt;/ControlTemplate&gt;
  
  ...
  
  &lt;Button Template="{StaticResource ButtonTemplate}" Click="Button_Click" HorizontalAlignment="Right"&gt;OK&lt;/Button&gt;
  </code></pre>
  
  <p>Thanks for any Comments </p>