且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在特定列的WPF中的数据网格中添加图像

更新时间:2023-12-01 15:31:04

我不确定您可以使用自动生成的列,如果您的ICON属性是字符串值,则肯定无法使用.

尝试将ICON属性更改为Uri ICON = new URI(stringvalue,relativeorabsolute);,这将至少告诉数据网格期望的数据类型!
I''m not sure you can using autogenerate columns, it certainly won''t work if your ICON property is a string value.

Try changing the ICON property to a Uri ICON = new URI(stringvalue,relativeorabsolute); this will atleast tell the datagrid what datatype to expect!