using System;
using System.Globalization;
using System.Windows;
using System.Windows.Data;
namespace BPA.UIControl.Converters
{
///
/// 是否为 null 或空字符串
///
public class IsNullOrEmptyConverter : IValueConverter
{
///
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return value == null || string.IsNullOrEmpty(value.ToString());
}
///
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
return DependencyProperty.UnsetValue;
}
}
}