title: WPF Enter full screen on mediaElement double clicked does not react always
body: <p>I've been searching the easy way to make my window (which contains only a mediaElement) go full screen when it's double clicked. Since I'm new to WPF/C# I did it the way it was suggested <a href="http://www.switchonthecode.com/tutorials/wpf-tutorial-getting-the-doubleclick-event" rel="nofollow">here</a>. It works, but it doesn't react always and sometimes I even have to click more than 3 times in row to get it into full screen or restored.</p>
  
  <p>Here is the event handler:</p>
  
  <pre><code> private void mediaElement1_MouseDown(object sender, MouseButtonEventArgs e)
      {
          if (e.ClickCount == 2 &amp;&amp; fullscreen==false)
          {
              this.WindowStyle = WindowStyle.None;
              this.WindowState = WindowState.Maximized;
          }
          else if (e.ClickCount == 2 &amp;&amp; fullscreen == true)
          {
  
              this.WindowStyle = WindowStyle.SingleBorderWindow;
              this.WindowState = WindowState.Normal;
          }
          fullscreen = !fullscreen;
  
      }
  </code></pre>