ComparisonGoodsCommandConverter.cs 956 B

123456789101112131415161718192021222324252627282930
  1. using System;
  2. using System.Windows.Controls;
  3. using System.Windows.Data;
  4. namespace MuchInfo.Chart.App.Converters
  5. {
  6. public class ComparisonGoodsCommandConverter : IMultiValueConverter
  7. {
  8. public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
  9. {
  10. if (values == null || values.Length != 2) return null;
  11. return new ComparisonGoodsCommandArgs
  12. {
  13. Chart = values[0] as WPF.Chart,
  14. ComparisonListBox = values[1] as ListBox
  15. };
  16. }
  17. public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
  18. {
  19. throw new NotImplementedException();
  20. }
  21. }
  22. public class ComparisonGoodsCommandArgs
  23. {
  24. public WPF.Chart Chart { get; set; }
  25. public ListBox ComparisonListBox { get; set; }
  26. }
  27. }