using System; using System.Windows.Controls; using System.Windows.Data; namespace MuchInfo.Chart.App.Converters { public class ComparisonGoodsCommandConverter : IMultiValueConverter { public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture) { if (values == null || values.Length != 2) return null; return new ComparisonGoodsCommandArgs { Chart = values[0] as WPF.Chart, ComparisonListBox = values[1] as ListBox }; } public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } public class ComparisonGoodsCommandArgs { public WPF.Chart Chart { get; set; } public ListBox ComparisonListBox { get; set; } } }