WidthConverter.cs 499 B

12345678910111213141516171819202122
  1. using System;
  2. using System.Globalization;
  3. using System.Windows;
  4. using System.Windows.Data;
  5. namespace Aitex.Sorter.UI.Converter
  6. {
  7. public class WidthConverter : IValueConverter
  8. {
  9. public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
  10. {
  11. if (value == null) return null;
  12. return (int)value - 10;
  13. }
  14. public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
  15. {
  16. throw new NotImplementedException();
  17. }
  18. }
  19. }