public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { if (targetType != typeof(Key)) { return(null); } String s = (String)value; Key returnKey; if (KeysList.TryGetValue(s, out returnKey)) { return(returnKey); } return(null); }