相关疑难解决方法(0)

图像UriSource和数据绑定

我正在尝试将自定义对象列表绑定到WPF图像,如下所示:

<Image>
    <Image.Source>
        <BitmapImage UriSource="{Binding Path=ImagePath}" />
    </Image.Source>
</Image>
Run Code Online (Sandbox Code Playgroud)

但它不起作用.这是我得到的错误:

必须设置"Property'UriSource'或属性'StreamSource'."

我错过了什么?

.net data-binding wpf xaml

64
推荐指数
6
解决办法
13万
查看次数

标签 统计

.net ×1

data-binding ×1

wpf ×1

xaml ×1