IMultiValueConverter.cs 1.2 KB

123456789101112131415161718192021222324252627282930
  1. // Copyright (c) The Avalonia Project. All rights reserved.
  2. // Licensed under the MIT license. See licence.md file in the project root for full license information.
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Globalization;
  6. namespace Avalonia.Data.Converters
  7. {
  8. /// <summary>
  9. /// Converts multi-binding inputs to a final value.
  10. /// </summary>
  11. public interface IMultiValueConverter
  12. {
  13. /// <summary>
  14. /// Converts multi-binding inputs to a final value.
  15. /// </summary>
  16. /// <param name="values">The values to convert.</param>
  17. /// <param name="targetType">The type of the target.</param>
  18. /// <param name="parameter">A user-defined parameter.</param>
  19. /// <param name="culture">The culture to use.</param>
  20. /// <returns>The converted value.</returns>
  21. /// <remarks>
  22. /// This method should not throw exceptions. If the value is not convertible, return
  23. /// <see cref="AvaloniaProperty.UnsetValue"/>. Any exception thrown will be treated as
  24. /// an application exception.
  25. /// </remarks>
  26. object Convert(IList<object> values, Type targetType, object parameter, CultureInfo culture);
  27. }
  28. }