我有点困惑.我昨天得到了7.8更新,因为现在瓷砖更大,我是否需要更新我的应用程序?现在,瓷砖看起来有点模糊,不像以前那么尖锐.
根据仿真器,新的瓷砖是210 x 210像素.
解决方法
您不需要更新磁贴,因为正如您所注意到的,操作系统将缩放图像以满足新的大小要求.实际上,这种缩放可以是向上或向下,这取决于它是用于中小尺寸的瓷砖.
不幸的是,还有另一个复杂因素:新的磁贴大小取决于设备屏幕的分辨率.对于WVGA,中型磁贴为210x210px(将覆盖所有WP7.8手机),但运行720p或WXGA的手机(并且记住所有针对WP7.8的应用也可以在WP8上运行)具有336x336px的中型磁贴.您可以在此处获得所有分辨率的所有磁贴大小的完整列表:Windows Phone 8 Startscreen Tile sizes and margins.
您可以使用以下辅助方法(取自this MSDN page)发现设备的当前分辨率.
public enum Resolutions { WVGA,WXGA,HD720p }; public static class ResolutionHelper { private static bool IsWvga { get { return App.Current.Host.Content.ScaleFactor == 100; } } private static bool IsWxga { get { return App.Current.Host.Content.ScaleFactor == 160; } } private static bool Is720p { get { return App.Current.Host.Content.ScaleFactor == 150; } } public static Resolutions CurrentResolution { get { if (IsWvga) return Resolutions.WVGA; else if (IsWxga) return Resolutions.WXGA; else if (Is720p) return Resolutions.HD720p; else throw new InvalidOperationException("Unknown resolution"); } } }