gpt4 book ai didi

c# - 如何禁用 Windows 8 中的纵向模式?

转载 作者:太空狗 更新时间:2023-10-29 17:49:41 24 4
gpt4 key购买 nike

我开发了一个不支持纵向模式的 XAML/C# Windows 8 应用程序。我在 Visual Studio 中打开了 Package.appxmanifest,并在“支持的旋转”下禁用了纵向和纵向翻转模式。这创建了以下旋转首选项:

        <InitialRotationPreference>
<Rotation Preference="landscape" />
<Rotation Preference="landscapeFlipped" />
</InitialRotationPreference>

但是,当我在模拟器中启动我的应用程序并旋转模拟器时,该应用程序仍会旋转到纵向模式。我怎样才能防止这种情况发生?

谢谢,

阿德里安

最佳答案

Windows 8 中的模拟器似乎不尊重您的旋转首选项。不幸的是,在连接到运行 Windows 8 的实际平板电脑之前,无法判断这些设置是否按预期工作。

查看这篇文章以获取更多信息,直接来自 MSDN:http://msdn.microsoft.com/en-us/library/windows/apps/windows.graphics.display.displayproperties.autorotationpreferences

关于c# - 如何禁用 Windows 8 中的纵向模式?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11260919/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com