首页 > 移动平台 > 详细

WP Store APP 设置页面横竖屏的方法

时间:2014-06-30 15:11:18      阅读:475      评论:0      收藏:0      [点我收藏+]

在 windows phone store app 中,判断和设置页面横竖屏的方法,与 silverlight 中的 Page 类

不同,不能直接通过 Page.Orientation 进行设置。而是通过 DisplayInformation 类,方法如下:

// 横屏
Windows.Graphics.Display.DisplayInformation.AutoRotationPreferences = Windows.Graphics.Display.DisplayOrientations.Landscape; 

 

 

枚举值分别:

    [SupportedOn(100794368, Platform.Windows)]
    [SupportedOn(100794368, Platform.WindowsPhone)]

    public enum DisplayOrientations
 {None = 0,  Landscape = 1,Portrait = 2, LandscapeFlipped = 4, PortraitFlipped = 8, }

 

WP Store APP 设置页面横竖屏的方法,布布扣,bubuko.com

WP Store APP 设置页面横竖屏的方法

原文:http://www.cnblogs.com/hebeiDGL/p/3816281.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!