How to get the resolution of screen (width and height) in Windows Phone 8.1?

一曲冷凌霜 提交于 2019-12-22 08:18:27

问题


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:

  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

If someone knows how to do it on Windows Phone 8.1, please help me!

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? Edit: I solved the second question.


回答1:


Use Window.Current.Bounds to get the position and size of the available space your app can use on the screen.

Window.Current.Bounds


来源:https://stackoverflow.com/questions/24678191/how-to-get-the-resolution-of-screen-width-and-height-in-windows-phone-8-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!