22 lines
551 B
C#
22 lines
551 B
C#
using System;
|
|
using System.Globalization;
|
|
using System.Linq;
|
|
using Microsoft.Maui.Controls;
|
|
|
|
namespace Jugenddienst_Stunden.Converter;
|
|
|
|
public class AnyTrueMultiConverter : IMultiValueConverter {
|
|
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) {
|
|
foreach (object value in values) {
|
|
if (value is bool b && b) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) {
|
|
throw new NotSupportedException();
|
|
}
|
|
|
|
} |