Float2String.cs 729 B

1234567891011121314151617181920212223242526
  1. using System;
  2. using System.Windows.Data;
  3. namespace Venus_Themes.Converters
  4. {
  5. public class Float2String : IValueConverter
  6. {
  7. public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
  8. {
  9. if (value == null) return string.Empty;
  10. if (value == null)
  11. return string.Empty;
  12. if (double.IsNaN((double)value))
  13. return string.Empty;
  14. else
  15. return value;
  16. }
  17. public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
  18. {
  19. throw new NotImplementedException();
  20. }
  21. }
  22. }