title: Create Key binding in WPF
body: <p>I need to create input binding for Window.</p>
  
  <pre><code>public class MainWindow : Window
  {
      public MainWindow()
      {
          SomeCommand = ??? () =&gt; OnAction();
      }
  
      public ICommand SomeCommand { get; private set; }
  
      public void OnAction()
      {
          SomeControl.DoSomething();
      }
  }
  </code></pre>
  
  <hr>
  
  <pre><code>&lt;Window&gt;
      &lt;Window.InputBindings&gt;
          &lt;KeyBinding Command="{Binding SomeCommand}" Key="F5"&gt;&lt;/KeyBinding&gt;
      &lt;/Window.InputBindings&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p>If I init <code>SomeCommand</code> with some <code>CustomCommand : ICommand</code> it doesn't fire. <code>SomeCommand</code> property getter is never called.</p>