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

I am developing an application for Windows Phone 8.1, and my application may work fine if I can get a screen resolution for mobile devices. I tried many ways, but they just work on Windows Phone 8.0and below. I tried these ways:

If anyone knows how to do this Windows Phone 8.1, please help me!

If someone can help me, I have a small question, I use Visual Studio RC2it when I choose application development for Windows phoneit automatically selects the OS version 8.1, if I want to develop an application for the OS version 8.0, how to change these settings? Edit: I solved the second question.

+4
source share
1 answer

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

Window.Current.Bounds
+9
source

Source: https://habr.com/ru/post/1547912/


All Articles