【问题标题】:How to check if image contains source?如何检查图像是否包含源?
【发布时间】:2013-11-27 20:39:05
【问题描述】:

如何检查图片是否包含源代码?

在执行一段代码之前,我会检查图像是否有来源。

【问题讨论】:

  • “图像”中的“来源”是什么?
  • 我的意思是 Windows Phone 中的图像控制。

标签: c# .net oop windows-phone-7 windows-phone-8


【解决方案1】:

您应该检查Source 属性是否等于null。

if(img.Source != null)
{

}
else
{

}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-02-08
    • 1970-01-01
    • 1970-01-01
    • 2013-12-17
    • 2012-05-02
    • 1970-01-01
    相关资源
    最近更新 更多