Disable Portrait in app
2013-09-24 16:04
405 查看
I had this problem as well as I wanted to constrain my game to only landscape mode. I put this in my OnLaunched handler for App.xaml:
However I noted that in the simulator it seemed to ignore this whereas on the hardware tablet I tested on it seemed to behave appropriately. The AutoRotationPreferences are bit flags so you can or together all the orientations you want to allow.
from : http://stackoverflow.com/questions/12614508/how-to-limit-orientation-in-metro-apps
Windows.Graphics.Display.DisplayProperties.AutoRotationPreferences=Windows.Graphics.Display.DisplayOrientations.Landscape;
However I noted that in the simulator it seemed to ignore this whereas on the hardware tablet I tested on it seemed to behave appropriately. The AutoRotationPreferences are bit flags so you can or together all the orientations you want to allow.
from : http://stackoverflow.com/questions/12614508/how-to-limit-orientation-in-metro-apps
相关文章推荐
- Spring ClassPathXmlApplicationContext和FileSystemXmlApplicationContext
- unity3D相机缓慢看向目标物体
- Android 学习笔记
- Android之遮罩功能的实现
- IOS开发中@2x图片等适应不同分辨率手机
- IOS用CGContextRef画各种图形(文字、圆、直线、弧线、矩形、扇形、椭圆、三角形、圆角矩形、贝塞尔曲线、图片)
- android手把手教你开发launcher(五)——设置壁纸
- 【笔记】niosII与win7兼容性解决方法
- Android:权限大全
- Phonegap 3.0 设置APP是否全屏
- VMWare启动速度过快导致无法按F2进入BIOS解决方法
- unity动态加载远程资源
- Android编程心得-FragmentActivity与Fragment两者交互方法简介
- android audiorecord初始化失败相关资料收集
- 显式与隐式Intent及AndroidManifest.xml文件中intent-filter参数说明
- 如何判断当前系统是不是IOS 7(宏定义)
- Android异步处理特性之AsyncTask
- Linphone iOS客户端编译时打开G729支持
- android获取音频、视频、图片信息
- 【学习笔记】Cocos2d-x 重力加速计的使用