You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
643 B

  1. using System;
  2. using System.Globalization;
  3. using System.Windows.Data;
  4. namespace BPA.UIControl.Converters
  5. {
  6. /// <summary>
  7. /// The get width converter.
  8. /// </summary>
  9. public class GetWidthConverter : IMultiValueConverter
  10. {
  11. /// <inheritdoc/>
  12. public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
  13. {
  14. return (double)values[0] - (double)values[1] * 2;
  15. }
  16. /// <inheritdoc/>
  17. public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
  18. {
  19. return null;
  20. }
  21. }
  22. }