Refactor StundePage and StundenPage layouts: adjust grid structure, improve margin handling, and enhance visuals with new binding and triggers.
This commit is contained in:
22
Jugenddienst Stunden/Converter/AnyTrueMultiConverter.cs
Normal file
22
Jugenddienst Stunden/Converter/AnyTrueMultiConverter.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
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();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user