first commit
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace ClassicAssist.Launcher.ValueConverters
|
||||
{
|
||||
public class InverseBooleanConverter : IValueConverter
|
||||
{
|
||||
public object Convert( object value, Type targetType, object parameter, CultureInfo culture )
|
||||
{
|
||||
try
|
||||
{
|
||||
bool testValue = (bool) value;
|
||||
return !testValue; // or do whatever you need with this boolean
|
||||
}
|
||||
catch
|
||||
{
|
||||
return true;
|
||||
} // or false
|
||||
}
|
||||
|
||||
public object ConvertBack( object value, Type targetType, object parameter, CultureInfo culture )
|
||||
{
|
||||
return Convert( value, targetType, parameter, culture );
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user