ObjectConvert.cs 825 B

123456789101112131415161718192021222324252627282930
  1. using System;
  2. using System.Linq;
  3. using System.Windows.Data;
  4. namespace CustomUI.Converters
  5. {
  6. /// <summary>
  7. /// CommandParameter 多参数传递
  8. /// </summary>
  9. public class ObjectConvert : IMultiValueConverter
  10. {
  11. #region IMultiValueConverter Members
  12. public static object ConverterObject;
  13. public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
  14. {
  15. ConverterObject = values;
  16. var str = values.GetType().ToString();
  17. return values.ToArray();
  18. }
  19. public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
  20. {
  21. throw new NotImplementedException();
  22. }
  23. #endregion
  24. }
  25. }