title: Read Key in Wpf
body: <p>I am working on the game "2048". How can I wait till the user pressed one of the arrows and than identify what arrow did he pressed.
  Thank You</p>
  
  <pre><code>            bool game = true;
  
              while (Game)
              {
              //Read The Key Here
              if ()//The Key is Up
              {
  
              }
              else if ()//The Key is down
              {
  
              }
              }
  </code></pre>