显示与屏幕分辨率有关的图像 [英] Displaying images with respect to the screen resolutions

查看:97
本文介绍了显示与屏幕分辨率有关的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的Windows 8应用程序中,我们使用WCF服务来获取数据,在应用程序图像中显示图像网址,如http://mysite.com/images/sample.png。



在xaml我使用图片标签来显示这样的图像。

In my windows 8 app we are using WCF service to fetch the data, in the app images are displaying with the image urls like "http://mysite.com/images/sample.png".

In the xaml i am using image tag to display the image like this.

<Image Margin="0"  Source="http://mysite.com/images/sample.png" Height="100" Stretch="UniformToFill"   HorizontalAlignment="Left"   VerticalAlignment="Top"  Style="{StaticResource ImageFadeInStyle}"/>



i希望以这样的方式显示图像:如果分辨率发生变化,我希望显示另一个图像。你可以提出任何想法。







提前感谢。


i want to display the image in such a way that if resolution changes i want another image to be displayed. can you please suggest any ideas.



thanks in advance.

推荐答案

请参阅此链接 [ ^ ]。

从此,您可以获得图像的分辨率。

现在你需要做的是,一旦你得到特定的分辨率,检查并在其中写一些逻辑来改变图像。



希望这些信息对您有所帮助。试一试。

祝你好运:)



-KR
See this link[^].
From this, you can get Resolution of your Image.
Now what you have to do is, once you get the particular resolution, put a check and within it write some logic to change the image.

Hope this info will help you. Give it a try.
Good Luck :)

-KR


这篇关于显示与屏幕分辨率有关的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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