Files
DP44/Common/DTS.CommonCore/Converters/BooleanOrMultiConverter.cs

20 lines
638 B
C#
Raw Normal View History

2026-04-17 14:55:32 -04:00
using System;
using System.Linq;
using System.Windows.Data;
namespace DTS.Common.Converters
{
public class BooleanOrMultiConverter : IMultiValueConverter
{
public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
return !values.All(val => val is bool) ? false : (object)values.Any(val => (bool)val);
}
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
{
throw new NotImplementedException();
}
}
}