开发者

Windows Phone 7 - Device Independent Pixels?

Android has a nice way to make screen elements scaleable so they look good on most devices. One of those is Device Independent Pixels: basics of device-independent-pixels

开发者_如何转开发Is there anything similar to dips on Windows Phone 7?

What about autosizing a control to its contents? Such as width=wrap_content?

Thanks!


WP7 devices always have the same resolution so you shouldn't need to worry about DPI.

While devices can have different physical sizes they shouldn't differ too much. If you are really concerned you shoudl simply design and test on devices with the smallest and largest physical sizes.
If you still run into issue then it's probably due to trying to put too much on the screen. If that's the case then you should redesign the app.

One of the original design objectives for WP7 was to create a platform which did not suffer the consequences of device fragmentation such as wildly differing screen sizes and resolutions. As such there is no need to have to code for them.


NB This is the case for WP7, however WP8 supports 3 resolutions. For details on how to support WP8 see http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj206974(v=vs.105).aspx


Not sure if that answers your question, but the Grid control is usually the best approach when you want to create a layout that adapts to different sizes.

I don't know of an equivalent to Android's device-independent pixels, though.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜