public class ImageConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
string uri = (string)value;
if (string.IsNullOrEmpty(uri))
return new BitmapImage(new Uri(uriToMyDefaultImage));
return new BitmapImage(new Uri(uri));
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
throw new NotImplementedException();
}
}