How do I show image in wpf datagrid column programmatically?

前端 未结 3 684
春和景丽
春和景丽 2020-12-11 22:33

I want to add two columns in wpf datagrid one image & one text columns dynamically.

Xaml code :

 

        
3条回答
  •  生来不讨喜
    2020-12-11 22:52

    Use DataGridTemplateColumn. Define cell template in Window.Resources and use FindResource() to set column's CellTemplate property.

    Hope this helps.

提交回复
热议问题