1234567891011121314151617181920212223242526272829 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Data;
- namespace AwInitilizer.Converter
- {
- public class BooleanAndConverter : IMultiValueConverter
- {
- public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- foreach (object value in values)
- {
- if ((value is bool) && (bool)value == false)
- {
- return false;
- }
- }
- return true;
- }
- public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
- {
- throw new NotSupportedException("BooleanAndConverter is a OneWay converter.");
- }
- }
- }
|