Commit 27646a66 by liulongfei

添加转化器

parent ae58418e
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
using System.Windows;
namespace VIZ.Framework.Core
{
/// <summary>
/// Bool --> Bool 简单转化器
/// </summary>
public class Bool2BoolConverterSimple : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (!(value is bool b))
return Binding.DoNothing;
return !b;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
if (!(value is bool b))
return Binding.DoNothing;
return !b;
}
}
}
......@@ -93,6 +93,7 @@
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="Core\Converter\Bool2BoolConverterSimple.cs" />
<Compile Include="Core\Converter\Bool2BoolConverter.cs" />
<Compile Include="Core\Converter\Bool2StringConverter.cs" />
<Compile Include="Core\Converter\ByteSizeConverter.cs" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment