首页 > 代码库 > WP Store APP 设置页面横竖屏的方法
WP Store APP 设置页面横竖屏的方法
在 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, }
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。