public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { string source = (string)value; if (!string.IsNullOrEmpty(source)) { return this.WhenNotEmpty; } else { return this.WhenNullOrEmpty; } }