title: WPF Accept input without focus
body: <p>I've created a screen in WPF that accepts input from a barcode scanner. I listen to PreviewTextInput event, and the KeyUp event, which let's me determine what the scanner "typed", and when it finished. It works great. You just have to have the form displayed and it will accept barcode scans.</p>
  
  <p>The problem is, I have other controls on the page, and they're causing issues. For example, when you push a button on the form, that button then has focus. Hitting the enter key from that point on results in the button event handler being fired. It doesn't automatically give up focus.</p>
  
  <p>Does anyone know an <strong>elegant</strong> solution to this type of problem? I'd rather not add code to every event handler to focus another element, but I will do that as a last resort.</p>