CSharp examples for Windows.Devices.Sensors:SimpleOrientation
Convert Simple Orientation To Clockwise Degrees
using Windows.Storage.FileProperties; using Windows.Media.Capture; using Windows.Graphics.Display; using Windows.Devices.Sensors; using Windows.Devices.Enumeration; using System;/*from w w w . j a v a2 s . c o m*/ public class Main{ public static int ConvertSimpleOrientationToClockwiseDegrees(SimpleOrientation orientation) { switch (orientation) { case SimpleOrientation.Rotated90DegreesCounterclockwise: return 270; case SimpleOrientation.Rotated180DegreesCounterclockwise: return 180; case SimpleOrientation.Rotated270DegreesCounterclockwise: return 90; case SimpleOrientation.NotRotated: default: return 0; } } }