This commit is contained in:
BlossomiShymae
2024-08-08 21:16:02 -05:00
parent a8741cd352
commit ed89a1d543
61 changed files with 1745 additions and 338 deletions

View File

@@ -0,0 +1,22 @@
using Avalonia.Data.Converters;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
namespace Needlework.Net.Desktop.Converters
{
public class EnumerableBoolConverter : IValueConverter
{
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
if (value is IEnumerable<object> values) return values.Any();
return false;
}
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}