4 using System.Collections;
5 using System.Globalization;
8 namespace SiliconStudio.Presentation.ValueConverters
16 public override object Convert(
object value, Type targetType,
object parameter, CultureInfo culture)
22 throw new ArgumentException(
@"The given value must implement IEnumerable",
"value");
24 var enumerable = (IEnumerable)value;
25 return enumerable.Cast<
object>().Count();
override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
This converter will take an enumerable as input and return the number of items it contains...