using System.Globalization;
namespace HKW.WPF.Converters;
///
/// 相等转换器
/// 示例:
///
///
///
///
/// ]]>
///
public class EqualsConverter : CanInverterMultiValueConverter
{
///
///
///
///
///
///
///
///
///
public override object Convert(
object[] values,
Type targetType,
object parameter,
CultureInfo culture
)
{
if (values.Length != 2)
throw new NotImplementedException("Values length must be 2");
return values[0].Equals(values[1]) ^ Inverter;
}
}