简体   繁体   中英

Windows Universal density indepentent pixels

In Windows Store and Windows Phone (Windows Universal) 8.1 applications is there something that is similar to using DP to indicate object sizes, like in android? In android it works like this: DP is density indepentent pixels. Which means that on every screen, independent of size of the screen, DP is rougly the same. In this way you can create your application in such a way that it looks the same on every screen.

So far I haven't been able to find something similar for Windows Store and Windows Phone (Windows Universal) applications. So far I've just been using grids with either "auto" or " (number here)*" sizes. However I need a static size for my buttons, because that is how it has been designed. I can not simply put them on 10 pixels (for example), because then the physical size would vary per screen.

Source on android DP: http://developer.android.com/design/style/metrics-grids.html

Apparently there is no such thing. However in Windows Phone there is something similar. Windows Phones can have a couple of resolutions, but apps assume that the screen is 400x800 (in most cases, sometimes it's actually 400x856 or something).

For applications running on your windows pc or windows tablet, however, this is not the case.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM