Is the image coming from a Byte() property or will it be a relative resource in your project?
I'm assuming you're using a TemplateColumn with an Image control in the DataGrid.
Assuming you're providing a byte array to the converter here's how you'd set up the converter to return a BitmapImage. This also returns a generic N/A image from the images folder if the value you pass is Nothing.
Code:
Public Class ImageConverter
Implements IValueConverter
Public Function Convert(ByVal value As Object, ByVal targetType As Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo) As Object _
Implements IValueConverter.Convert
If value IsNot Nothing Then
Dim bi As New Imaging.BitmapImage()
bi.SetSource(New IO.MemoryStream(DirectCast(value, [Byte]())))
Return bi
Else
Return New Imaging.BitmapImage(New Uri("../images/ImageNotAvailable.png", UriKind.Relative))
End If
End Function
Public Function ConvertBack(ByVal value As Object, ByVal targetType As Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo) As Object _
Implements System.Windows.Data.IValueConverter.ConvertBack
Throw New NotImplementedException()
End Function
End Class
Here's the msdn link for IValueConverter for further reading: http://msdn.microsoft.com/en-us/libr...8VS.95%29.aspx