CaptionHeightConverter.cs 646 B

1234567891011121314151617181920212223242526
  1. using System;
  2. using System.Globalization;
  3. using System.Windows.Data;
  4. namespace ComPDFKit.Controls.Common
  5. {
  6. public class CaptionHeightConverter : IMultiValueConverter
  7. {
  8. public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
  9. {
  10. try
  11. {
  12. return (double)values[0] + (double)values[1];
  13. }
  14. catch
  15. {
  16. return 6.0;
  17. }
  18. }
  19. public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
  20. {
  21. return null;
  22. }
  23. }
  24. }