This commit is contained in:
xyy
2026-02-27 16:03:49 +08:00
parent ff5d1b7d1d
commit 82abc41dbc
26 changed files with 1170 additions and 50 deletions

View File

@@ -0,0 +1,24 @@
using System;
using System.Globalization;
using System.Windows.Data;
namespace MembranePoreTester.Converters
{
[ValueConversion(typeof(bool), typeof(bool))]
public class InverseBooleanConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is bool b)
return !b;
return true;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is bool b)
return !b;
return true;
}
}
}