init
This commit is contained in:
27
Common/DTS.Common/Converters/ErrorToBooleanConverter.cs
Normal file
27
Common/DTS.Common/Converters/ErrorToBooleanConverter.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace DTS.Common.Converters
|
||||
{
|
||||
class ErrorToBooleanConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
// For a more sophisticated converter, check also the targetType and react accordingly..
|
||||
if (value is string)
|
||||
{
|
||||
|
||||
return string.IsNullOrEmpty(value.ToString());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
// If necessary, here you can convert back. Check if which brush it is (if its one),
|
||||
// get its Color-value and return it.
|
||||
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user