Gui-Tuning

This commit is contained in:
2025-01-02 11:59:59 +01:00
parent bfd995e46b
commit 4a6a17f729
9 changed files with 199 additions and 102 deletions

View File

@@ -0,0 +1,21 @@
using System.Globalization;
/// Gib true zurück, wenn die Collection Werte enthält
namespace Jugenddienst_Stunden.Converter {
internal class CollectionVisibilityConverter : IValueConverter {
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture) {
if (value is IEnumerable<object> collection) {
if ((string)parameter == "Invert")
return !collection.Any();
return collection.Any();
}
if ((string)parameter == "Invert")
return true;
return false;
}
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture) {
throw new NotImplementedException();
}
}
}