title: Determine the current orientation
body: <p>I would like to determine the current orientation of the device in a WP7 app. I do not want to handle the OrientationChange event, because I need the current orientation when the page is opened.</p>
  
  <p>I've been trying to do it with this piece of code I found in a forum:</p>
  
  <pre><code>((PhoneApplicationFrame)Application.Current.RootVisual).Orientation
  </code></pre>
  
  <p>However, this always returns with PortraitUp, even if I turn the device sideways. And by the way, I am trying to do this with the emulator, so it might be an emulator-bug.</p>
  
  <p>Thanks</p>