這是我的數據網格,我想在網格列中顯示圖像,但它顯示的是文本System.Windows.Media.Imaging.BitmapImage
,而不是顯示圖像。 如何在datagrid列中添加圖片?在Datagrid中添加圖像
這是我曾嘗試:
Dictionary dict1=new Dictionary < string,object>();
string keyimage="Image";
object a1 = new BitmapImage();
a1=Imaging.CreateBitmapSourceFromHIcon(SystemIcons.Information.Handle, Int32Rect.Empty, null);
dict1.Add(keyimage, a1);
這dict1
作爲Itemsource
爲DataGrid ...........如何使顯示在DataGrid列的圖像?
什麼列類型:
由於您使用的字典,結合值,有點像? – Dennis
這是我的問題..........我應該使用什麼列類型來顯示圖像? – Raghu
你會在這本詞典中找到什麼,只有圖片? –