How To: Rotate Screen on Windows Mobile Device

Below is a snapshot that shows how to change screen orientation from normal to 90 degree rotated or from 90 degree back to normal depending on current screen state:

if (SystemSettings.ScreenOrientation == ScreenOrientation.Angle0) {
	SystemSettings.ScreenOrientation = ScreenOrientation.Angle90;
}
else {
	SystemSettings.ScreenOrientation = ScreenOrientation.Angle0;
}

To make this code compile don’t forget to import Microsoft.WindowsCE.Forms namespace.

About khymenko

Developing for Windows and Windows Phone

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

I’m Tweeting

Follow

Get every new post delivered to your Inbox.