如何获取屏幕(宽度和高度)的的Windows Phone 8.1的分辨率是多少? [英] How to get the resolution of screen (width and height) in Windows Phone 8.1?
问题描述
我开发的应用Windows Phone 8.1
和我的应用程序才可以正常工作,如果我能得到手机屏幕的分辨率。我试了很多办法,但他们只是工作在的Windows Phone 8.0
低。我想这些方式从:
I am developing an app for Windows Phone 8.1
and my app just can work properly if I can get the resolution of mobile screen. I tried many ways but they just work on Windows Phone 8.0
and lower. I tried these ways from:
-
<一个href="http://stackoverflow.com/questions/2596732/how-to-get-screen-size-on-windows-phone-7-series">How让屏幕大小在Windows Phone 7系列?
<一个href="http://stackoverflow.com/questions/9852416/how-can-i-get-a-screen-resolution-of-device-windows-phone">How我可以得到设备的屏幕分辨率(Windows手机)
<一个href="http://stackoverflow.com/questions/20298631/how-to-get-screen-size-of-a-windows-phone-8-device">How得到的Windows Phone 8设备的屏幕尺寸?
<一个href="http://stackoverflow.com/questions/15304145/how-to-get-screen-resolutions-on-windows-phone-devices?rq=1">How获得在Windows Phone设备的屏幕分辨率
如果有人知道如何做到这一点的的Windows Phone 8.1
,请帮帮我!
If someone knows how to do it on Windows Phone 8.1
, please help me!
如果有人能帮助我,我有一个小问题,我使用 Visual Studio的RC2
,当我选择制定一个应用程序的Windows电话
,它会自动剔操作系统版本 8.1
,如果我要开发的操作系统版本的应用程序 8.0
,如何更改设置?
编辑:我解决了第二个问题
If somebody can help me, I have a little question, I am using Visual Studio RC2
, when I choose to develop an app for Windows phone
, it is automatically tick OS version 8.1
, if i want to develop an app for OS version 8.0
, how to change that settings?
I solved the second question.
推荐答案
使用Window.Current.Bounds获得的可用空间您的应用程序可以在屏幕上使用的位置和大小。
Use Window.Current.Bounds to get the position and size of the available space your app can use on the screen.
Window.Current.Bounds
这篇关于如何获取屏幕(宽度和高度)的的Windows Phone 8.1的分辨率是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!