另一方面,我可以理解一些UI元素可以像素一样指定,如Page layout guidelines所示.
但是,在XAML中,字体大小以像素为单位指定,这取决于设备(据我所知).因此,在具有更高分辨率的显示器上,字体大小看起来很小!有关更多详细信息,请参见post.该帖子的答案是“通过这种方式,您获得了一致的字体大小”.当分辨率发生变化时,我无法看到它是如何变化的?
我应该根据设备的分辨率以编程方式加载不同的字体大小吗?
我看到here Windows根据DPI进行了一些缩放调整.这种调整是否足以让我的用户在平板电脑和20英寸显示器上获得良好的体验(或者我应该根据设备分辨率以编程方式更改字体大小)?
额外问题:当软件工具不使用积分时(例如,他们在想什么),为什么使用积分编写字体指南?
您还将看到如何自动缩放像素密度:
For those who buy these higher pixel-density screens,we want to ensure that their apps,text,and images will look both beautiful and usable on these devices. Early on,we explored continuous scaling to the pixel density,which would maintain the size of an object in inches,but we found that most apps use bitmap images,which could look blurry when scaled up or down to an unpredictable size. Instead,Windows 8 uses predictable scale percentages to ensure that Windows will look great on these devices. There are three scale percentages in Windows 8:
100% when no scaling is applied 140% for HD tablets 180% for quad-XGA tablets
The percentages are optimized for real devices in the ecosystem. 140% and 180% may seem like odd scale percentage choices,but they make sense when you think about how this will work on real hardware.
For example,the 140% scale is optimized for 1920×1080 HD tablets,which has 140% of the baseline tablet resolution of 1366×768. These optimized scale factors maintain consistent layouts between the baseline tablet and the HD tablet,because the effective resolution is the same on the two devices. Each scale percentage was chosen to ensure that a layout that was designed for 100% 1366×768 tablets has content that is the same physical size and the same layout on 140% HD tablets or 180% quad-XGA tablets.