简体   繁体   English

多屏支持Windows Phone 8

[英]Multiple screen support Windows Phone 8

I used to develop for Android and iOS, and for multiple screen support we use to use mdpi, hdpi, xhdpi. 我曾经为Android和iOS开发,为了获得多屏支持,我们使用mdpi,hdpi,xhdpi。

Now I want to develop for Windows Phone, I want to set a background to a button and I don't know how to define image size to support all screen sizes. 现在,我要为Windows Phone开发,我想为按钮设置背景,但我不知道如何定义图像大小以支持所有屏幕大小。

You dont need to provide different assets. 您不需要提供其他资产。 See info from MSDN below. 请参阅下面的MSDN中的信息。 There is a way to support different assets/resources. 有一种方法可以支持不同的资产/资源。 But we have never done this bevore in our apps. 但是我们从来没有在我们的应用程序中做到这一点。

From MSDN: 从MSDN:

Assets such as graphics, video, audio, and icons make up a large percentage of an app's size. 图形,视频,音频和图标等资产占应用程序大小的很大比例。 Including assets for all resolutions in your app uses a lot of space in your app. 在应用程序中包含所有分辨率的资产会占用应用程序大量空间。 For most apps, we recommend that you include only WXGA assets. 对于大多数应用程序,我们建议您仅包括WXGA资产。 WXGA assets have the highest quality, and they automatically scale to work well for other resolutions. WXGA资产具有最高的质量,它们会自动扩展以适合其他分辨率。

More info: Multi-resolution apps for Windows Phone 8 更多信息: Windows Phone 8的多分辨率应用程序

Multiple resolution handling is built-in with WP8.1. WP8.1内置了多种分辨率处理功能。 You simply need to name your images with the proper qualifier to ensure it is loaded properly by the device. 您只需要使用适当的限定符命名图像,以确保设备正确加载了图像。

You can refer to the tutorial here for more info on how to properly name your image resources: 您可以在此处参考该教程,以获取有关如何正确命名图像资源的更多信息:

Quickstart: Using file or image resources 快速入门:使用文件或图像资源

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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