title: MessageBox doesn't take focus
body: <p>When I click enter-button, <code>MessageBox</code> is shown. I want <code>MessageBox</code> to close when I click enter-button again as usual. Problem is - it doesn't have focus, but <code>TextBox</code> has and when I click enter-button <code>_textBox_OnKeyUp</code> eventhandler is invoked again and again. How can I solve my problem?</p>
  
  <p><strong>Markup:</strong></p>
  
  <pre><code>&lt;Grid&gt;
      &lt;TextBox Name="_textBox"
          Width="100"
          Height="30"
          Background="OrangeRed"
          KeyUp="_textBox_OnKeyUp"/&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>private void _textBox_OnKeyUp(object sender, KeyEventArgs e)
  {
      if (e.Key != Key.Enter)
          return;
  
      MessageBox.Show("Bla-bla");
  }
  </code></pre>