Files
aistudio-wpf-diagram/Util.DiagramDesigner/Converters/TrueToFalseConverter.cs
2021-07-23 09:42:22 +08:00

23 lines
611 B
C#

using System;
using System.Globalization;
using System.Windows.Data;
namespace Util.DiagramDesigner
{
/// <summary>
/// 这是一个颠倒黑白的世界
/// </summary>
public sealed class TrueToFalseConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
var v = (bool)value;
return !v;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}