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(); } }
Copyright © dotNetHell.it 2002-2025
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5