using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Runtime.CompilerServices; using System.Windows.Data; namespace Gestor.Application.Converters { public class MultiBoolReadOnly : IMultiValueConverter { public MultiBoolReadOnly() { } public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) { object obj; try { obj = !((IEnumerable)values).All((object value) => (bool)value); } catch { obj = false; } return obj; } public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) { return null; } } }