AnnotateFontSizeConverter.cs 853 B

12345678910111213141516171819202122232425262728293031
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Globalization;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using System.Windows.Data;
  8. namespace PDF_Office.DataConvert
  9. {
  10. public class AnnotateFontSizeConverter : IValueConverter
  11. {
  12. //用于注释列表的字体 作者和日期的日期比正文日期小两个规格
  13. public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
  14. {
  15. if ((double)value <= 0)
  16. {
  17. return null;
  18. }
  19. else
  20. {
  21. return (double)value - 2;
  22. }
  23. }
  24. public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
  25. {
  26. throw new NotImplementedException();
  27. }
  28. }
  29. }