public static NSComboBoxDataSource GenerateComboBoxDataSourceFromEnum(Type enumType) { return (new ActionComboBoxDataSource( itemCount: (cb) => Enum.GetNames(enumType).Length, objectValueForItem: (cb, i) => ( from v in DescriptionAttribute.GetValuesWithDescriptions(enumType, true) select v.Item2 ) .ElementAt(i) .ToNSString(), indexOfItem: (cb, s) => string.IsNullOrWhiteSpace(s) ? -1 : ( from v in DescriptionAttribute.GetValuesWithDescriptions(enumType, true) select v.Item2 ) .IndexOf(s) )); }