如何在Windows Phone 8.1中获得屏幕(宽度和高度)的分辨率?

时间:2014-07-10 13:44:40

标签: c# .net windows-phone-8.1

我正在为Windows Phone 8.1开发一个应用程序,如果我可以获得移动屏幕的分辨率,我的应用程序可以正常工作。我尝试了很多方法,但他们只是在Windows Phone 8.0及更低级别工作。我试过这些方法:

  1. How to get screen size on Windows Phone 7 Series?

  2. How can I get a screen resolution of Device (Windows Phone)

  3. How to get Screen size of a windows phone 8 device?

  4. How to get screen resolutions on Windows Phone devices

  5. 如果有人知道如何在Windows Phone 8.1上执行此操作,请帮助我!

    如果有人可以帮助我,我有一个小问题,我正在使用Visual Studio RC2,当我选择为Windows phone开发应用时,会自动勾选操作系统版本8.1,如果我想开发操作系统版本8.0的应用程序,如何更改该设置? 编辑:我解决了第二个问题。

1 个答案:

答案 0 :(得分:9)

使用Window.Current.Bounds获取应用可在屏幕上使用的可用空间的位置和大小。

Window.Current.Bounds
相关问题