private ScreenOrientation MapOrientation(InterfaceOrientationTypes orientation) { switch (orientation) { case InterfaceOrientationTypes.All: return(ScreenOrientation.FullSensor); case InterfaceOrientationTypes.AllButUpsideDown: return(ScreenOrientation.FullSensor); case InterfaceOrientationTypes.Portrait: return(ScreenOrientation.Portrait); case InterfaceOrientationTypes.Landscape: return(ScreenOrientation.Landscape); } return(ScreenOrientation.Portrait); }
private static UIInterfaceOrientationMask MapOrientation(InterfaceOrientationTypes orientation) { switch (orientation) { case InterfaceOrientationTypes.All: return(UIInterfaceOrientationMask.All); case InterfaceOrientationTypes.AllButUpsideDown: return(UIInterfaceOrientationMask.AllButUpsideDown); case InterfaceOrientationTypes.Portrait: return(UIInterfaceOrientationMask.Portrait); case InterfaceOrientationTypes.Landscape: return(UIInterfaceOrientationMask.Landscape); } return(UIInterfaceOrientationMask.Portrait); }
private void NewOrientationRequested(object sender, InterfaceOrientationTypes arg) { RequestedOrientation = MapOrientation(arg); }
public RotationAwarePage(InterfaceOrientationTypes requestedOrientation) { RequestedOrientation = requestedOrientation; }