public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { if (value == null) { return("{null}"); } FrameworkElement fe = value as FrameworkElement; if (fe != null && !String.IsNullOrEmpty(fe.Name)) { return(fe.Name + " (" + value.GetType().Name + ")"); } RoutedCommand command = value as RoutedCommand; if (command != null && !String.IsNullOrEmpty(command.Name)) { return(command.Name + " (" + command.GetType().Name + ")"); } return("(" + value.GetType().Name + ")"); }