1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| using System;
using System.Globalization;
using System.Windows.Data;
namespace Test
{
public class IsNullOrEmptyTester : IValueConverter
{
object IValueConverter.Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return string.IsNullOrEmpty(value as string);
}
object IValueConverter.ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
return (this as IValueConverter).Convert(value, targetType, parameter, culture);
}
}
} |