<Image>
  <Image.Source>
    <Binding Path="ImageUri">
      <Binding.TargetNullValue>
        <ImageSource>/Assets/PlaceHolder.png</ImageSource>
      </Binding.TargetNullValue>
    </Binding>
  </Image.Source>
</Image>

以上代码可以将 ImageUri 属性所指定图片展示出来,并在该属性为空时自动展示 /Assets/PlaceHolder.png 这张图片。

相关文章:

  • 2022-12-23
  • 2021-11-11
  • 2022-12-23
  • 2021-11-28
  • 2021-11-03
  • 2022-12-23
  • 2021-10-23
猜你喜欢
  • 2021-07-16
  • 2022-12-23
  • 2021-12-22
  • 2021-12-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案