XAMARIN +VS2015 ANDROID 开发禁止屏幕自动转动 Portrait,Nosensor

  网上有很多java的写法,但是放在C#中都无法使用,其实有时候还是安下心来认真的去看官网文档比在百度或者google来的快的多

 this.RequestedOrientation = Android.Content.PM.ScreenOrientation.Portrait;//竖屏,禁止横屏

 this.RequestedOrientation = Android.Content.PM.ScreenOrientation.Nosensor;//横屏,禁止竖屏

原文地址:https://www.cnblogs.com/lichen396116416/p/5309693.html