Windows Phone 8.1 尺寸问题 [英] Windows phone 8.1 dimensions issue

查看:32
本文介绍了Windows Phone 8.1 尺寸问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在为 Windows 手机开发应用程序时无法理解尺寸.

I am having problems understanding the dimensions while developing an App for windows phone.

我知道有 3 个分辨率:

I know there are 3 resolutions:

WVGA  480 ×  800   15:9
WXGA  768 × 1280   15:9 1.6x scale
720p  720 × 1280   16:9 1.5x scale, 80 pixels taller (53 pixels, after scaling)

问题是页面的宽度似乎总是400点;

The issue is that the Width of the page seems to be always 400 points;

当我在我的页面中定位一个项目(一个矩形)时,我将它的 Width 设置为 400.我运行 480x800 模拟器 (8.1 WVGA 4 inch 512 mb) 并且矩形完美地占据了整个屏幕.

When i am positioning an item (a Rectangle) in my Page, i set it's Width to 400. I run the 480x800 emulator (8.1 WVGA 4 inch 512 mb) and the rectangle occupies the whole screen perfectly.

但是当我尝试像 720p 这样更大的模拟器时,矩形仍然占据了页面的所有宽度.难道不应该占据400px,留下(720-480)的间隙吗??

But when i try a bigger emulator like the 720p, the rectangle is still occupyng all the width of the page. Shouldn't it occupy 400 px and leave a gap of (720-480)??

为什么所有分辨率都需要 400 为页面的全角?

Why do all the resolutions take 400 to be the fullwidth of the page?

意识到 400px 与 480 不同,因为 Visual Studio 中的设备"表示分辨率为 480x800,缩放比例为 120%.

I realized that the 400px is different from 480 because the "Device" in Visual Studio says the resolution is 480x800 at 120% scale.

为什么要用这个秤?如何删除它并使用真正的 480 宽度点?

Why does it use this scale? How can i remove this and use the real 480 width points?

EDIT 2: 我找到了关于 400 px 宽度的问题的答案 这里

EDIT 2: I found the answer to this issue about the 400 px width here

所以我的平面设计师正在使用 480x800 画布来设计应用程序页面.但我不得不改用 400x800 画布.所以很难让设计师的模型适应真正的应用程序.

So my graphic designer was working on a 480x800 canvas for designing the App pages. But i had to use a 400x800 canvas instead. So it's very difficult to adapt the designer mock ups to the real App.

设计师应该为画布使用什么尺寸?

What dimensions should the designer usa for the canvas??

推荐答案

听起来您正在使用 Windows Phone 8.1 通用应用项目.该平台与旧的 Silverlight 平台(使用 1.0/1.5/1.6 系统,其中所有设备都被视为 480 像素宽)的缩放方式不同.

Sounds like you are using Windows Phone 8.1 Universal App project. Scaling works differently on that platform vs. the old Silverlight platform (which uses the 1.0 / 1.5 / 1.6 system where all devices are considered to be 480 px wide).

对于通用应用,有效分辨率取决于设备的大小以及物理分辨率,因此(在大多数情况下)较大的手机可以显示更多内容.

For Universal Apps, the effective resolution depends on the size of the device as well as the physical resolution, so (for the most part) larger phones can show more content.

如果要填充屏幕的宽度,请使用 Horizo​​ntalAlignment=Stretch 而不是指定宽度.

If you want to fill the screen's width, use HorizontalAlignment=Stretch rather than specifying a width.

这篇关于Windows Phone 8.1 尺寸问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆