26 lines
662 B
C#
26 lines
662 B
C#
using System;
|
|
using System.Windows.Data;
|
|
|
|
namespace Torch.Server.Views.Converters
|
|
{
|
|
[ValueConversion(typeof(bool), typeof(bool))]
|
|
public class InverseBooleanConverter : IValueConverter
|
|
{
|
|
#region IValueConverter Members
|
|
|
|
public object Convert(object value, Type targetType, object parameter,
|
|
System.Globalization.CultureInfo culture)
|
|
{
|
|
return !(bool)value;
|
|
}
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter,
|
|
System.Globalization.CultureInfo culture)
|
|
{
|
|
throw new NotSupportedException();
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|