title: Getting keyboard input to a control based on a WPF Grid (System.Windows.Controls.Grid)
body: <p>I have created a control that inherits from the WPF System.Windows.Controls.Grid.</p>
  <p>I would like it to respond to key presses, but it doesn't.</p>
  <p>It responds to Mouse input fine.</p>
  <p>This is my constructor in part:</p>
  <pre class="lang-cs prettyprint-override"><code>public ChDynamicGridProgrammer() : base()
  {
      MouseLeftButtonDown += ChDynamicGridProgrammer_MouseLeftButtonDown_EventHandler;
      MouseMove += ChDynamicGridProgrammer_MouseMove;
      MouseRightButtonUp += ChDynamicGridProgrammer_MouseRightButtonUp;
  
      KeyDown += ChDynamicGridProgrammer_KeyDown;
  }
  </code></pre>
  <p>I have also tried to bind a key to a command on my parent UserControl, this works but only when another control has focus.</p>
  <p>I'm guessing this is a focus related issue and the Grid doesn't get focus, but I could do with some help getting it to work.</p>