Files
aistudio-wpf-diagram/AIStudio.Wpf.DiagramDesigner/Converters/TrueToFalseConverter.cs
2022-10-28 22:45:39 +08:00

23 lines
619 B
C#

using System;
using System.Globalization;
using System.Windows.Data;
namespace AIStudio.Wpf.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();
}
}
}