title: Command Binding to Routed Event in WPF User-control
body: <p>I want to bind Viewmodel command to Usercontrol's Routed Event.
  Here is the detailed explanation of what I have.</p>
  
  <p>I have a User Control which have one <code>Image</code> (which shows image) and one <code>Button</code> at bottom (<code>Button</code> to remove <code>Image</code>). I am using a Usercontrol in a <code>ListView</code>.</p>
  
  <p>In my Usercontrol's Code behind I have a <code>RoutedEventHandler</code> to remove the <code>Image</code>:</p>
  
  <pre><code>public event RoutedEventHandler RemoveImage;
  </code></pre>
  
  <p>In the window where I use this Usercontrol, I have put:</p>
  
  <pre><code>&lt;uc:ucImageListItem x:Name="ImageListItem" RemoveImage="ImageListItem_RemoveImage"  /&gt;
  </code></pre>
  
  <p>This code works correctly if My code to remove image is in code behind. but I want to Bind command of Viewmodel to RemoveImage RoutedEvent.</p>
  
  <p>Probably like (not correct)</p>
  
  <pre><code>&lt;uc:ucImageListItem x:Name="ImageListItem" RemoveImage="{binding CommandtoRemove}"  /&gt;
  </code></pre>
  
  <p>How to achieve this?</p>
  
  <p>I found something related to <code>RoutedCommand</code> or <code>DependancyProperty</code>, but could not find any proper way, How to use them.</p>
  
  <p>Let me know if I need to further clear my question.
  Thanks in anticipation.</p>