How can you tell whether the device is oriented vertically (portrait) or horizontally (landscape)?
Is there an API that simplifies this or do you have to make the determination “by hand” using the accelerometer?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I myself just have looked at windows 7 phones(through vs2010 express phone edition).
It seems to have in the code behind this
Then the actual form has
So when the orientation changes it e.Orientation will tell you what orientation it is. Like for instance LandscapeRight.