title: Executing viewmodels command on enter in TextBox
body: <p>I want to execute a command in my viewmodel when the user presses enter in a TextBox.
  The command works when bound to a button.</p>
  
  <pre><code>&lt;Button Content="Add" Command="{Binding Path=AddCommand}" /&gt;
  </code></pre>
  
  <p>But I can't bring it to work from the TextBox.
  I tried an Inputbinding, but it didn't work.</p>
  
  <pre><code>&lt;TextBox.InputBindings&gt;
      &lt;KeyBinding Command="{Binding Path=AddCommand}" Key="Enter"/&gt;
  &lt;/TextBox.InputBindings&gt;
  </code></pre>
  
  <p>I also tried to set the working button as default, but it doesn't get executed when enter is pressed.</p>
  
  <p>Thanks for your help.</p>