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.