boolReverseConverter.cs 806 B

123456789101112131415161718192021222324252627282930313233
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Windows.Data;
  6. using System.Windows.Media;
  7. using DataAnalysisControl.Core;
  8. namespace Aitex.UI.Charting.Converter
  9. {
  10. public class boolReverseConverter : IValueConverter
  11. {
  12. public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
  13. {
  14. try
  15. {
  16. return !(bool)value;
  17. }
  18. catch (Exception ex)
  19. {
  20. CONTEXT.WriteLog(ex);
  21. }
  22. return false;
  23. }
  24. public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
  25. {
  26. return null;
  27. }
  28. }
  29. }