Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
730
Showing Image in XamGrid bound with a DataTable
posted

Hi,

I have a XamGrid which is bound with a DataTable, one of the column of DataTable is of type Image. I've checked your sample "Embedded Image Fields" too and tried to implement the same style on my XamGrid too but without any success.

DataTable dtOutput = new DataTable();

dtOutput.Columns.Add("SeverityImage", typeof(System.Drawing.Image));

dtOutput.Columns.Add("Time", typeof(string));

dtOutput.Columns.Add("Message", typeof(string)); 

 

public DataTable OutputData

{

     get

     {     

         return dtOutput;

     }

}

 

 The Output is shown like this:

 

The Xaml code is attached with this post.

Regards,

-Ayub

 

 

 

 

 

 

 

 

 

 

 

Parents
No Data
Reply
  • 138253
    Offline posted

    Hello Ayub,

     

    It has been a while since you have made your post, in case you still need support I will be glad to assist you further. I suppose the other community members can benefit from this answer as well. I have been looking into your post and I suggest you use the System.Windows.Media.Imaging.BitmapImage class instead of System.Drawing.Image, because this is the one that is used in WPF.

     

    Feel free to write me if you have further questions.

Children
No Data