title: WPF calling commands via events
body: <p>Is it possible to call a command via an event in WPF?</p>
  
  <p>I have a save button that when pressed calls a command, this is pressed when you have finished editing a textbox, it also passes an object as a command parameter</p>
  
  <pre><code> &lt;Button Content="Save"  Command="{Binding DataContext.SaveQueueTimeCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ItemsControl}}}" CommandParameter="{Binding}" /&gt;
  </code></pre>
  
  <p>What I would ideally like to do is call this command and pass the object as a parameter when the textbox loses focus, rather than having to press the button, something like:</p>
  
  <pre><code> &lt;Button LostFocus="{Binding SaveQueueTimeCommand}" /&gt;
  </code></pre>
  
  <p>And still somehow pass the object as a parameter.
  Is there a way to acheive this without using code behind as I am using the MVVM pattern</p>
  
  <p>Thanks for your time</p>