根据if()条件显示图像 [英] Display image based on if() condition

查看:129
本文介绍了根据if()条件显示图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

//condition here
if(label.Content.ToString().Equals("someName")){
BitmapImage image = new BitmapImage(new Uri("abc.JPG", UriKind.Relative));
imageCon.Source = image;
}





但是我无法在imageCon上显示图像,有什么帮助吗?



but i cant display the image on the imageCon, any help?

推荐答案

仅回答从未答复的清单中删除 - 由OP解决。
Answered only to remove from unanswered list - solved by OP.


这篇关于根据if()条件显示图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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