Torna al Thread
public class PathConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
string name = value.ToString();
BitmapImage result = null;
if (!string.IsNullOrWhiteSpace(name))
{
result = new BitmapImage(new Uri(string.Format("../images/{0}.png", name), UriKind.Relative));
}
return result;
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
throw new NotImplementedException();
}
}